{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"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":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"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":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D31","name":"IaC \u0026 Container Security","shortDescription":{"text":"IaC \u0026 Container Security"},"helpUri":"https://codehealth.canine.dev/dimensions/D31","relationships":[{"target":{"id":"CWE-1032","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-16","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1032","CWE-732","CWE-16"],"owasp":"A02: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":"AX5","name":"Architecture \u0026 structure","shortDescription":{"text":"Architecture \u0026 structure"},"helpUri":"https://codehealth.canine.dev/dimensions/AX5"},{"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":"AXR1","name":"Runtime accessibility","shortDescription":{"text":"Runtime accessibility"},"helpUri":"https://codehealth.canine.dev/dimensions/AXR1"},{"id":"GD1","name":"Unfinished \u0026 placeholder code","shortDescription":{"text":"Unfinished \u0026 placeholder code"},"helpUri":"https://codehealth.canine.dev/dimensions/GD1"},{"id":"IC1","name":"Incompleteness \u0026 stubs","shortDescription":{"text":"Incompleteness \u0026 stubs"},"helpUri":"https://codehealth.canine.dev/dimensions/IC1"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"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":"ARM64SyscallHandler.hook (cyclomatic 168): ARM64SyscallHandler.hook has cyclomatic complexity 168 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"b67d5e0a359cb36a9c5b448247ee63d0680e8d907377d1df05adb415879f0efe"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM32SyscallHandler.hook (cyclomatic 152): ARM32SyscallHandler.hook has cyclomatic complexity 152 (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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"4850e24ac117f9d0fa86d92a6dc011a02d22bd34b4d7d7f79dc424bcffcfead4"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOLoader.loadInternalPhase (cyclomatic 151): MachOLoader.loadInternalPhase has cyclomatic complexity 151 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"9746f6ec845bf09d1ff951dca27812765abd67856e2d4571e8884d554436a5c9"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM32SyscallHandler.hook (cyclomatic 137): ARM32SyscallHandler.hook has cyclomatic complexity 137 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d48e902fe60093f461aee75544de663699f018d534d1166c7e820f9c1a3a3be"}},{"ruleId":"D1","level":"warning","message":{"text":"AbstractARMDebugger.handleCommon (cyclomatic 132): AbstractARMDebugger.handleCommon has cyclomatic complexity 132 (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":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1a2ae516c63fd1bec4abe6801f7ed542b53ba28c14a7ed5a0cb99da0247b6cf"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM64SyscallHandler.sysctl (cyclomatic 124): ARM64SyscallHandler.sysctl has cyclomatic complexity 124 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1825}}}],"partialFingerprints":{"codehealthFindingId/v1":"67f02f327b98e7d6943fccdc1a9762b3cf3edf9e191e456e5646fcc3bb7bf12e"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM64SyscallHandler.mach_msg_trap (cyclomatic 123): ARM64SyscallHandler.mach_msg_trap has cyclomatic complexity 123 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":2714}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bb9411b2b165cbbfe8ba43780f3a3db1f8a2072f328eac836d257f5f997dc9f"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM.showRegs64 (cyclomatic 111): ARM.showRegs64 has cyclomatic complexity 111 (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":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"76e9f5399c6ba85577e2dfcd17bd9835b044e9c919ef3da7ce18ca65a76083f9"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM64SyscallHandler.hook (cyclomatic 109): ARM64SyscallHandler.hook has cyclomatic complexity 109 (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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"286ec818051a2cc006b72356b66b5ad9650a5cc81d4fbea6af078a23f44b926c"}},{"ruleId":"D1","level":"warning","message":{"text":"AndroidElfLoader.loadInternal (cyclomatic 105): AndroidElfLoader.loadInternal has cyclomatic complexity 105 (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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"2864adbd2de523434106df0bb0517232d0004fb53710200d136fb1da1a5710d1"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM32SyscallHandler.mach_msg_trap (cyclomatic 102): ARM32SyscallHandler.mach_msg_trap has cyclomatic complexity 102 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1796}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfe35b68003ecdca3ff8ff1932bfa68b237bfd4567d9a8172df119f55ac8b0dd"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM32SyscallHandler.sysctl (cyclomatic 82): ARM32SyscallHandler.sysctl has cyclomatic complexity 82 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1328}}}],"partialFingerprints":{"codehealthFindingId/v1":"36c6eac4848c267d9ea3ee7d39c4f4960c931721fbabe3ebeff1e779ec276ab2"}},{"ruleId":"D1","level":"warning","message":{"text":"AbstractJni.callObjectMethodV (cyclomatic 79): AbstractJni.callObjectMethodV has cyclomatic complexity 79 (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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"26473766d844474e5ac77db30c0b27bf09c7e92a23511534affca09188f30013"}},{"ruleId":"D1","level":"warning","message":{"text":"SymbolResolver.hook (cyclomatic 77): SymbolResolver.hook has cyclomatic complexity 77 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"553fec5109c2edfccd449d9f8007bc3d45134228a8ae6e3721b614d6c5f9fa12"}},{"ruleId":"D1","level":"warning","message":{"text":"Dyld64.hook (cyclomatic 75): Dyld64.hook has cyclomatic complexity 75 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"d97ad0a087f3baa9fe9eb6db82c2c9f772dd2e170eb380fc08965185d6523e34"}},{"ruleId":"D1","level":"warning","message":{"text":"ElfDynamicStructure.\u003Cinit\u003E (cyclomatic 55): ElfDynamicStructure.\u003Cinit\u003E has cyclomatic complexity 55 (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":"unidbg-android/src/main/java/net/fornwall/jelf/ElfDynamicStructure.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"16c2a222107675c82b6b60e310bb47951bc749e896fe0fa419ce85afeefab1d0"}},{"ruleId":"D1","level":"warning","message":{"text":"GnuEhFrameHeader.dwarf_get_loc (cyclomatic 55): GnuEhFrameHeader.dwarf_get_loc has cyclomatic complexity 55 (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":"unidbg-android/src/main/java/net/fornwall/jelf/GnuEhFrameHeader.java"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c0327063d971fbb324a2f263c474257518f63ce681593ea23911f3d37dd099b"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM.showRegs (cyclomatic 54): ARM.showRegs has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd5a862af581f54a5e06368e18a1b3cc3283a0dcbdf7195b2ff1f7f7cdfb15f8"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOLoader.fixupAllChainedFixups (cyclomatic 51): MachOLoader.fixupAllChainedFixups has cyclomatic complexity 51 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":932}}}],"partialFingerprints":{"codehealthFindingId/v1":"390789e280ee44b6fd85709c2286953e623b02cccb4b5d0bfecc5c65a681c5b7"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOLoader.mmap2 (cyclomatic 41): MachOLoader.mmap2 has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":2272}}}],"partialFingerprints":{"codehealthFindingId/v1":"57dec4a2b6a87b00a3ebc012474dac04bb65a0c84ae719a50fc42f07912905fa"}},{"ruleId":"D1","level":"warning","message":{"text":"AndroidElfLoader.mmap2 (cyclomatic 35): AndroidElfLoader.mmap2 has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ead8f92535ef2e35d322458b066e847e880b6f223d139662f35ba9b6b30bd81"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOModule.findClosestSymbolByAddress (cyclomatic 35): MachOModule.findClosestSymbolByAddress has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd3075b706956b61e8b6bbe305800ffeaa5e739869e4d7bfa37be4eb42e512f9"}},{"ruleId":"D1","level":"warning","message":{"text":"ArmExIdx.arm_exidx_decode (cyclomatic 33): ArmExIdx.arm_exidx_decode has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/net/fornwall/jelf/ArmExIdx.java"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"109e2b45877f80bf2c6aa97371a6217ee5d1e811d59aae385bd633660aadd353"}},{"ruleId":"D1","level":"warning","message":{"text":"McpTools.formatRegValues (cyclomatic 33): McpTools.formatRegValues has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: McpTools.dispatchTool (cyclomatic 48) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1028}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8dda74485934ed9cef5b81559ba4c224a1d748661b525745709985b3b8c3e26"}},{"ruleId":"D1","level":"warning","message":{"text":"ArmExIdx.arm_exidx_apply_cmd (cyclomatic 32): ArmExIdx.arm_exidx_apply_cmd has cyclomatic complexity 32 (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":"unidbg-android/src/main/java/net/fornwall/jelf/ArmExIdx.java"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f4381de672116004b0b9ede4fd0aed9c3d8a91cf672a66d511b8a5232aace9c"}},{"ruleId":"D1","level":"warning","message":{"text":"McpTools.searchMemory (cyclomatic 32): McpTools.searchMemory has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: McpTools.dispatchTool (cyclomatic 48) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"43feb16c7f05b9148774c483ec228fa6afcc9234b1ad113cb24762614e40c863"}},{"ruleId":"D1","level":"warning","message":{"text":"AssemblyCodeDumper.handleArm32MultipleAccess (cyclomatic 32): AssemblyCodeDumper.handleArm32MultipleAccess has cyclomatic complexity 32 (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":"unidbg-api/src/main/java/com/github/unidbg/AssemblyCodeDumper.java"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bada40b709f0963c0e2e2e2bc6850a180a697095737935d4880a2ef300d7bfd"}},{"ruleId":"D1","level":"warning","message":{"text":"McpTools.readTyped (cyclomatic 31): McpTools.readTyped has cyclomatic complexity 31 (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. This is NOT this file\u0027s highest cyclomatic complexity: McpTools.dispatchTool (cyclomatic 48) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1319}}}],"partialFingerprints":{"codehealthFindingId/v1":"29d23ea4709fc2dd21212d6d87e0bc5e7bcf149dce4ef2de18d3f20948aa26ab"}},{"ruleId":"D1","level":"warning","message":{"text":"RegAccessPrinter.print (cyclomatic 31): RegAccessPrinter.print has cyclomatic complexity 31 (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":"unidbg-api/src/main/java/com/github/unidbg/RegAccessPrinter.java"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"60286148799f1ae92d92380499999f554f077aa4844276f39fbca592e83edd8a"}},{"ruleId":"D1","level":"warning","message":{"text":"BaseDarwinFileIO.getattrlist (cyclomatic 30): BaseDarwinFileIO.getattrlist has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/file/ios/BaseDarwinFileIO.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"70401a6998e8c955fda9a6b2236f01be5c16d2e5ef3ed0af4366304b1bcb1594"}},{"ruleId":"D1","level":"warning","message":{"text":"GnuEhFrameHeader.dwarf_step (cyclomatic 29): GnuEhFrameHeader.dwarf_step has cyclomatic complexity 29 (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":"unidbg-android/src/main/java/net/fornwall/jelf/GnuEhFrameHeader.java"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"f61487fc941ca33795c591b8c7ff549af8dd2f08f55f32fb3cb48f1f8807c812"}},{"ruleId":"D1","level":"warning","message":{"text":"CDObjectiveCProcessor.findObjcSymbol (cyclomatic 29): CDObjectiveCProcessor.findObjcSymbol has cyclomatic complexity 29 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/CDObjectiveCProcessor.java"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c319143a7d14088eb0f14528181288fe5d1f8b88d7b5a26df76e4e01e9fc048"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM.appendMemoryDetails32 (cyclomatic 27): ARM.appendMemoryDetails32 has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":923}}}],"partialFingerprints":{"codehealthFindingId/v1":"1876e6d3d12e58c4bdd59a3ac1a4ea00e5cfb7e9e69d4634311c59af3274b1f6"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOModule.findSymbol (cyclomatic 27): MachOModule.findSymbol has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2f30c90704e92a100f1e5dc48188eff9a1ae74a24500fd70a46d89a65ba1ad2"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOModule.\u003Cinit\u003E (cyclomatic 27): MachOModule.\u003Cinit\u003E has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"971c7d50a24fe5dc10c45d8d69688d7a706f958b076b7d92a5187ede1cf99106"}},{"ruleId":"D1","level":"warning","message":{"text":"UnixSyscallHandler.resolve (cyclomatic 26): UnixSyscallHandler.resolve has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: UnixSyscallHandler.sigaction (cyclomatic 28) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"db911d5da09b599d5c30129f57ef5203a84a5ecd8e4ff3a6c3d27088a4caf4b6"}},{"ruleId":"D1","level":"warning","message":{"text":"McpTools.resolveRegister (cyclomatic 25): McpTools.resolveRegister has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: McpTools.dispatchTool (cyclomatic 48) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1874}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8b2d6b9fc595dd283200f69f38aa2d9422c71ea6703374c7a9f68530f1208f0"}},{"ruleId":"D1","level":"warning","message":{"text":"BindTarget.resolveSymbol (cyclomatic 25): BindTarget.resolveSymbol 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/FixupChains.java"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bc1c0b49245fee8d002bf7400118fd26ebefbf876d21b7cafe614f1d33e8e8f"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOLoader.dlopen (cyclomatic 25): MachOLoader.dlopen 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1991}}}],"partialFingerprints":{"codehealthFindingId/v1":"250a54d18a85d22a6bffff34da5390cf2216a04540c8fbb69381c3eb3d06d0b8"}},{"ruleId":"D1","level":"warning","message":{"text":"AndroidSyscallHandler.futex (cyclomatic 24): AndroidSyscallHandler.futex 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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"68f2ebfa035cf8da9b553a9a9f0adb222accf8b9e6ec38effe1453b0ddfee611"}},{"ruleId":"D1","level":"warning","message":{"text":"AssemblyCodeDumper.hookMemoryAccess (cyclomatic 24): AssemblyCodeDumper.hookMemoryAccess 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":"unidbg-api/src/main/java/com/github/unidbg/AssemblyCodeDumper.java"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b4aabf02434ba44b5114026cebfbf20dbfb8ca6358cf9d6084046589f006686"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOLoader.eachBind (cyclomatic 24): MachOLoader.eachBind 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1620}}}],"partialFingerprints":{"codehealthFindingId/v1":"a13afe98d368c970e88a7f0128225532e6d8969ba0d3cf3834bdcb55b0c40765"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM.initArgs (cyclomatic 23): ARM.initArgs has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":1187}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf61abbe65554f59c51aaea5f1343489ef88c4fc830fca3423024fa5105a923b"}},{"ruleId":"D1","level":"warning","message":{"text":"UniThreadDispatcher.run (cyclomatic 23): UniThreadDispatcher.run has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/thread/UniThreadDispatcher.java"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"61c890e5580c2fc757de24d6ea68a152f095b26f39955c41a6831574bfbacf12"}},{"ruleId":"D1","level":"warning","message":{"text":"ProxyUtils.matchMethodTypes (cyclomatic 22): ProxyUtils.matchMethodTypes has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"e09abdd6312157fa06d1d661513fd8faddf619f5c487665ca0eb8b799e32c3b2"}},{"ruleId":"D1","level":"warning","message":{"text":"AbstractJni.callObjectMethod (cyclomatic 22): AbstractJni.callObjectMethod has cyclomatic complexity 22 (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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java"},"region":{"startLine":1038}}}],"partialFingerprints":{"codehealthFindingId/v1":"63092feb2581d7e81d8b9d4eb6ce63b83fddcb8e95b57b2f6eea2f80f45503e6"}},{"ruleId":"D1","level":"warning","message":{"text":"AbstractJni.callStaticObjectMethodV (cyclomatic 22): AbstractJni.callStaticObjectMethodV has cyclomatic complexity 22 (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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"2153c76c61b11e88396aa887dfc8c8f5f223ef1378df75c498645d5a9c1870d6"}},{"ruleId":"D1","level":"warning","message":{"text":"VaList64.\u003Cinit\u003E (cyclomatic 22): VaList64.\u003Cinit\u003E has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/VaList64.java"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"5420865c87c41be7a4e7fe23d772ab820d8b97e99d9f1bb6de2235314c9fbad3"}},{"ruleId":"D1","level":"warning","message":{"text":"McpTools.inspectObjcMsg (cyclomatic 22): McpTools.inspectObjcMsg has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: McpTools.dispatchTool (cyclomatic 48) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1717}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a14fd99bd027e42298a4940bb8c765104ec2b4705bd2384cca309da968981a2"}},{"ruleId":"D1","level":"warning","message":{"text":"UnidbgStructure.toString (cyclomatic 22): UnidbgStructure.toString has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/pointer/UnidbgStructure.java"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"c725acaa3d2a8a483c795bd27f086739230342de779aa1a7bd17be9200f98d32"}},{"ruleId":"D1","level":"warning","message":{"text":"SocketIO.setsockopt (cyclomatic 21): SocketIO.setsockopt has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff530561ff1f361e15cb538127c1b6330d1807e58c60f2aa0823c4990e226efc"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM32SyscallHandler.bionic_clone (cyclomatic 21): ARM32SyscallHandler.bionic_clone has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":877}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd0cc7dde26c9581f845e979c140fac9745bd0330a06fcd65bce62e5f7821f19"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM32SyscallHandler.pthread_clone (cyclomatic 21): ARM32SyscallHandler.pthread_clone has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"0de9f00f3b896f7691b90f2f5dce7061c15258b313310dbd07c772b9bdac90a0"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM64SyscallHandler.bionic_clone (cyclomatic 21): ARM64SyscallHandler.bionic_clone has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f64b6a4341417a64b1b5915e4322b2e9926a6dd5a076a3e035d8234be4eed2d"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM64SyscallHandler.pthread_clone (cyclomatic 20): ARM64SyscallHandler.pthread_clone has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"e229db4b273dc907f98530b84404b6210078aca12b42ced981c7a6062bcb9bc8"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOLoader.rebase (cyclomatic 20): MachOLoader.rebase has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1197}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf8973f519ddf9879d8ea5fb4dc060a63ea9abb57f61571252b43f7a56c8b715"}},{"ruleId":"D1","level":"warning","message":{"text":"ProxyUtils.matchField (cyclomatic 19): ProxyUtils.matchField 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6c6f8fe1276d5881e067b26794a4a4f87b380b6ab00dbd69b0ebeab4289b126"}},{"ruleId":"D1","level":"warning","message":{"text":"ArmExIdx.arm_exidx_step (cyclomatic 19): ArmExIdx.arm_exidx_step 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":"unidbg-android/src/main/java/net/fornwall/jelf/ArmExIdx.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"a349d2b339a44613fff241a7e2c40b8dff5f6ceb030e3cda50e1672bb2ce2e7a"}},{"ruleId":"D1","level":"warning","message":{"text":"McpTools.allocateMemory (cyclomatic 19): McpTools.allocateMemory has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file\u0027s highest cyclomatic complexity: McpTools.dispatchTool (cyclomatic 48) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1610}}}],"partialFingerprints":{"codehealthFindingId/v1":"6026d08fd5eb5d4bbf813f9be86c5ffef123188c76a8f40775853e96ca04456e"}},{"ruleId":"D1","level":"warning","message":{"text":"AbstractLoader.munmap (cyclomatic 19): AbstractLoader.munmap 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":"unidbg-api/src/main/java/com/github/unidbg/spi/AbstractLoader.java"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b7969443e573c698148f8bb236a861ab390ca0de8c4f9458a173e80ef97b2bb"}},{"ruleId":"D1","level":"warning","message":{"text":"SocketIO.setsockopt (cyclomatic 19): SocketIO.setsockopt 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"72d18fbf0ec7290892132302efe957313bfe204c99c7191a21d145f4f3098115"}},{"ruleId":"D1","level":"warning","message":{"text":"FixupChains.handleChain (cyclomatic 19): FixupChains.handleChain 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/FixupChains.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"159e0000dbd0e349163a87815de52170c2f954a99f8d46cc042001175e6fa60c"}},{"ruleId":"D1","level":"warning","message":{"text":"AbstractARMDebugger.dumpMemory (cyclomatic 18): AbstractARMDebugger.dumpMemory has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"39b8e17cce074395467524b8278d9dae493bfb1c26e28871587b3c1fd0e7dceb"}},{"ruleId":"D1","level":"warning","message":{"text":"McpTools.doCallFunction (cyclomatic 18): McpTools.doCallFunction has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: McpTools.dispatchTool (cyclomatic 48) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1411}}}],"partialFingerprints":{"codehealthFindingId/v1":"30aa04a5742aeea4dee1c707c7a272502037e098595abeac3e694672a611b149"}},{"ruleId":"D1","level":"warning","message":{"text":"McpTools.listExports (cyclomatic 18): McpTools.listExports has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: McpTools.dispatchTool (cyclomatic 48) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1543}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9d94ffbc601c75826cd26c6f0bdfa0a48f509c7e9e52de4a034a72bfc8a46a5"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultWorkerPool.run (cyclomatic 18): DefaultWorkerPool.run has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/worker/DefaultWorkerPool.java"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cb3ea1b95d6a9ea31d0578408032f1264f1a48d9f09f5a621d588b0c2bbe9cc"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOLoader.notifySingle (cyclomatic 18): MachOLoader.notifySingle has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":2161}}}],"partialFingerprints":{"codehealthFindingId/v1":"84eb2daf5329e71f3cb50d014df3af98158ed42310194868e31b87dd3eb17eb3"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOLoader.setupLazyPointerHandler (cyclomatic 18): MachOLoader.setupLazyPointerHandler has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1417}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6242644444bcd527b921c7f5b07b794deabae39a0713241796485b6282523e3"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOModule.doBindFastLazySymbol (cyclomatic 18): MachOModule.doBindFastLazySymbol has cyclomatic complexity 18 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":978}}}],"partialFingerprints":{"codehealthFindingId/v1":"f14c87a4a394212adce87795ebc99bbf788d7539fbeba43cdc7cb18d6545e726"}},{"ruleId":"D1","level":"warning","message":{"text":"Uleb128._read (cyclomatic 18): Uleb128._read has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file\u0027s highest cyclomatic complexity: LoadCommand._read (cyclomatic 45) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"55b89db93bf6a7e2bda7af64a2231c4522208d9f85173882ee9fe52d109f6c40"}},{"ruleId":"D1","level":"warning","message":{"text":"DvmMethod.decodeArgsShorty (cyclomatic 17): DvmMethod.decodeArgsShorty 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmMethod.java"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"30be146a72c017ee94a0ce237bae2b220c8755f92eb26df7c93132039db6650e"}},{"ruleId":"D1","level":"warning","message":{"text":"McpTools.traceCode (cyclomatic 17): McpTools.traceCode 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. This is NOT this file\u0027s highest cyclomatic complexity: McpTools.dispatchTool (cyclomatic 48) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0418a6a9c3b73e1a97bbc9d0366c08fe4b1b1042b4b5bc9beff8fd2ce18a9f8"}},{"ruleId":"D1","level":"warning","message":{"text":"Inspector.inspectInternal (cyclomatic 17): Inspector.inspectInternal 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":"unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3948ed4e1bc804a5c1511f338f4f387f480492071a0fe191fed2d6e453212a7"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOLoader.loadInternal (cyclomatic 17): MachOLoader.loadInternal 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca7bdd6e18ab5ab36f691ff34418da940a163bd08416ffc3d408735a3d3dde1f"}},{"ruleId":"D1","level":"warning","message":{"text":"DvmField.decodeShorty (cyclomatic 16): DvmField.decodeShorty has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8dcc92bee768ed63f14cc215854b01c5680d9bda1386da1c49ce4aae7bfc9a2"}},{"ruleId":"D1","level":"warning","message":{"text":"1.handle (cyclomatic 16): 1.handle 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/LocalAndroidUdpSocket.java"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"18dbcd19530f9a02fd58c42c9c3d59fbdcbebde2e6c49243f8fc877e257dc7f8"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM32SyscallHandler.prctl (cyclomatic 16): ARM32SyscallHandler.prctl 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1665}}}],"partialFingerprints":{"codehealthFindingId/v1":"e49908a83c690e3c172043c451af6020a2a6754d4b079dece9b7499600ee31c0"}},{"ruleId":"D1","level":"warning","message":{"text":"ModuleSymbol.resolve (cyclomatic 16): ModuleSymbol.resolve 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ModuleSymbol.java"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eed31a9ce24978c5588dd670a0755b66998bd06641194751bb2e45eeec84271"}},{"ruleId":"D1","level":"warning","message":{"text":"ElfSegment.toString (cyclomatic 16): ElfSegment.toString has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/net/fornwall/jelf/ElfSegment.java"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4e3ee4cf0f27014ecdf1bd371683e527551881a7346bb17db7c65ea5fa35fab"}},{"ruleId":"D1","level":"warning","message":{"text":"ARM.assembleDetail (cyclomatic 16): ARM.assembleDetail has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":1063}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b4007eb2022a77ec79f2de5a135ae0a8b2a5d2fcc8ece63c6c19b86e1fc8490"}},{"ruleId":"D1","level":"warning","message":{"text":"TraceFunctionCall.hook (cyclomatic 16): TraceFunctionCall.hook 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":"unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"8994cea3547010b552d33b1434f7a47e1de7ddba88f24e12ae80797543c3c686"}},{"ruleId":"D1","level":"warning","message":{"text":"KEvent.processKev (cyclomatic 16): KEvent.processKev 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/kevent/KEvent.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f66b483416487db2dec99910416883a5e18ecb70c9feb223042abddbd526b55"}},{"ruleId":"D1","level":"warning","message":{"text":"Dyld64.dlopen (cyclomatic 16): Dyld64.dlopen 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. This is NOT this file\u0027s highest cyclomatic complexity: Dyld64._dyld_func_lookup (cyclomatic 22) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"387a695cf0d4deb05a76ac0eaf12b1255d0bc43651d1ab031aa5a5b4e4143c7c"}},{"ruleId":"D1","level":"warning","message":{"text":"MachOLoader.doBindAt (cyclomatic 16): MachOLoader.doBindAt 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1849}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b5e2bb516467f89a34be791e56d0973466ad828c9f65abdb395efec39677e4a"}},{"ruleId":"D1","level":"warning","message":{"text":"HypervisorBackend64.handleException (cyclomatic 16): HypervisorBackend64.handleException has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file\u0027s highest cyclomatic complexity: HypervisorBackend64.handleCommRead (cyclomatic 18) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"858aa2c704e693bfc7156a8b09f83cc5a5c07f9143200be31d7b9ce08f9b7af2"}},{"ruleId":"D1","level":"warning","message":{"text":"gpb.list_gpbs (cyclomatic 16): gpb.list_gpbs 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. This is NOT this file\u0027s highest cyclomatic complexity: gpb.buildDataTypeMsgDef (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/assets/gpb.js"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"e68c209a67c1a15406f675e43dfbc034a6bd8d6a34533dafada5fc3958a15f62"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractARMDebugger.handleCommon (cognitive 254): AbstractARMDebugger.handleCommon has cognitive complexity 254 (threshold 15). Drivers by points: if/else 90 (174 pts), ternaries 10 (31 pts), boolean chains 21, error handling 6 (16 pts), loops 4 (9 pts), match/switch 3 (nesting depth added 120). 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":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"e520f59140b09ec49b2538535683db1c83988fe5b5fa5d43377d024a877a8618"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.loadInternalPhase (cognitive 236): MachOLoader.loadInternalPhase has cognitive complexity 236 (threshold 15). Drivers by points: if/else 85 (196 pts), loops 10 (17 pts), boolean chains 11, match/switch 4 (6 pts), ternaries 3 (6 pts) (nesting depth added 123). 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcca953e7ba2301c3960f2c001fa2b862041f3b1d6b76c3c406130b47c53cb49"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM64SyscallHandler.sysctl (cognitive 221): ARM64SyscallHandler.sysctl has cognitive complexity 221 (threshold 15). Drivers by points: if/else 63 (194 pts), loops 2 (9 pts), match/switch 4 (8 pts), ternaries 1 (4 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 147). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1825}}}],"partialFingerprints":{"codehealthFindingId/v1":"06c808d62e75370f36bc86a76ddff6269c31647ce1524af2b57bbf839709e5c3"}},{"ruleId":"D2","level":"warning","message":{"text":"AndroidElfLoader.loadInternal (cognitive 186): AndroidElfLoader.loadInternal has cognitive complexity 186 (threshold 15). Drivers by points: if/else 61 (144 pts), loops 11 (19 pts), boolean chains 11, ternaries 3 (7 pts), match/switch 2 (4 pts), error handling 1 (nesting depth added 97). 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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fdb45089ed60690a5b68f3de62f895ffc66cd058f5657832c25a62bd753f503"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM64SyscallHandler.mach_msg_trap (cognitive 186): ARM64SyscallHandler.mach_msg_trap has cognitive complexity 186 (threshold 15). Drivers by points: if/else 79 (166 pts), ternaries 3 (9 pts), loops 3 (6 pts), boolean chains 4, match/switch 1 (nesting depth added 96). 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":2714}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa9c65b5a132da555b9faaffeab931d54b07fc337ed4bbeeed340148b7f5c5bc"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM32SyscallHandler.mach_msg_trap (cognitive 154): ARM32SyscallHandler.mach_msg_trap has cognitive complexity 154 (threshold 15). Drivers by points: if/else 64 (134 pts), ternaries 3 (9 pts), loops 3 (6 pts), boolean chains 4, match/switch 1 (nesting depth added 79). 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1796}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e72c0a807f4bf71352cf47c72752326f8e53c3ec5347c2b7cbe53697680d55f"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM32SyscallHandler.sysctl (cognitive 141): ARM32SyscallHandler.sysctl has cognitive complexity 141 (threshold 15). Drivers by points: if/else 41 (121 pts), match/switch 4 (8 pts), loops 1 (4 pts), ternaries 1 (4 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 92). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1328}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e0aa6fdb91f3d8122f6a8e357302a8d4753a9db52fe94489cc6aca74f1290f6"}},{"ruleId":"D2","level":"warning","message":{"text":"Dyld64.hook (cognitive 139): Dyld64.hook has cognitive complexity 139 (threshold 15). Drivers by points: if/else 74 (139 pts) (nesting depth added 65). 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac2204c730ee667111cb9aa06e1acd8d21682ff8b87cd49ff2ca03de3c443eb3"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM.showRegs64 (cognitive 133): ARM.showRegs64 has cognitive complexity 133 (threshold 15). Drivers by points: if/else 38 (109 pts), ternaries 5 (20 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 87). 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":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1622653b55cf40af84b7fa2c407c6b4f2e07b95ca0473ac7cd526b55b8b245f"}},{"ruleId":"D2","level":"warning","message":{"text":"SymbolResolver.hook (cognitive 131): SymbolResolver.hook has cognitive complexity 131 (threshold 15). Drivers by points: if/else 60 (101 pts), ternaries 6 (17 pts), boolean chains 12, match/switch 1 (nesting depth added 52). 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"05e96785171c3a55906f60e57da2ce5327e74d59c8e40140742d4bc6fc91f3cf"}},{"ruleId":"D2","level":"warning","message":{"text":"McpTools.formatRegValues (cognitive 101): McpTools.formatRegValues has cognitive complexity 101 (threshold 15). Drivers by points: ternaries 13 (61 pts), if/else 14 (32 pts), boolean chains 7, loops 1 (nesting depth added 66). 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":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1028}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5e0bf7c37ce85c6dc61d660f8e06ba79897f0403f66bbcd13820e157da52476"}},{"ruleId":"D2","level":"warning","message":{"text":"RegAccessPrinter.print (cognitive 99): RegAccessPrinter.print has cognitive complexity 99 (threshold 15). Drivers by points: ternaries 12 (60 pts), if/else 14 (32 pts), boolean chains 6, loops 1 (nesting depth added 66). 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":"unidbg-api/src/main/java/com/github/unidbg/RegAccessPrinter.java"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"544127125c23b4e288581301a237651bc480e93e71fb7229c9d46a7b6a373f4b"}},{"ruleId":"D2","level":"warning","message":{"text":"GnuEhFrameHeader.dwarf_get_loc (cognitive 87): GnuEhFrameHeader.dwarf_get_loc has cognitive complexity 87 (threshold 15). Drivers by points: if/else 22 (67 pts), ternaries 3 (11 pts), match/switch 2 (5 pts), loops 2 (4 pts) (nesting depth added 58). 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":"unidbg-android/src/main/java/net/fornwall/jelf/GnuEhFrameHeader.java"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b8f2953f3f2ae42c28e815d8e2f1b7fe51ae2b4f277262fcfb363985f4fddd7"}},{"ruleId":"D2","level":"warning","message":{"text":"UniThreadDispatcher.run (cognitive 78): UniThreadDispatcher.run has cognitive complexity 78 (threshold 15). Drivers by points: if/else 16 (45 pts), error handling 3 (14 pts), loops 4 (10 pts), ternaries 1 (7 pts), boolean chains 2 (nesting depth added 52). 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":"unidbg-api/src/main/java/com/github/unidbg/thread/UniThreadDispatcher.java"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"5347f748c139211e8097b7fa0758771bcb4271f7d35fdda9d0fb87d297539397"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.mmap2 (cognitive 77): MachOLoader.mmap2 has cognitive complexity 77 (threshold 15). Drivers by points: if/else 31 (63 pts), boolean chains 7, loops 3 (6 pts), error handling 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":2272}}}],"partialFingerprints":{"codehealthFindingId/v1":"d101e3aa10b7ed0a122f68a332b91102c2b0008bcaa614fe0ff5231b44777690"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.fixupAllChainedFixups (cognitive 75): MachOLoader.fixupAllChainedFixups has cognitive complexity 75 (threshold 15). Drivers by points: if/else 30 (57 pts), loops 7 (12 pts), match/switch 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 33). 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":932}}}],"partialFingerprints":{"codehealthFindingId/v1":"e25718ae35728ba45144623c1fb78d08f074f8e943d51e19cda50f16a753aba8"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOModule.\u003Cinit\u003E (cognitive 75): MachOModule.\u003Cinit\u003E has cognitive complexity 75 (threshold 15). Drivers by points: if/else 20 (63 pts), boolean chains 5, ternaries 3, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 45). 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7974c0a09bba214099108940df814fdb0ce4537f7f7149971503f6eddd05474"}},{"ruleId":"D2","level":"warning","message":{"text":"GnuEhFrameHeader.dwarf_step (cognitive 68): GnuEhFrameHeader.dwarf_step has cognitive complexity 68 (threshold 15). Drivers by points: ternaries 9 (36 pts), if/else 10 (25 pts), match/switch 2 (5 pts), loops 1 (2 pts) (nesting depth added 46). 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":"unidbg-android/src/main/java/net/fornwall/jelf/GnuEhFrameHeader.java"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8e098620d3df6f4711738225576ac430659c877743d8fd569151846bea8d268"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.setupLazyPointerHandler (cognitive 65): MachOLoader.setupLazyPointerHandler has cognitive complexity 65 (threshold 15). Drivers by points: if/else 12 (54 pts), loops 3 (9 pts), match/switch 1 (2 pts) (nesting depth added 49). 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1417}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e0fcca34cdf988692a79ee57888219730a044ec8c45a80ef54881ef78c92529"}},{"ruleId":"D2","level":"warning","message":{"text":"AndroidElfLoader.mmap2 (cognitive 59): AndroidElfLoader.mmap2 has cognitive complexity 59 (threshold 15). Drivers by points: if/else 24 (47 pts), boolean chains 6, loops 2 (4 pts), error handling 2 (nesting depth added 25). 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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9cc2ada878eaabd01c8b7e6ed486fac83a12ec600436495c38feabff56d7ff2"}},{"ruleId":"D2","level":"warning","message":{"text":"McpTools.searchMemory (cognitive 59): McpTools.searchMemory has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (36 pts), loops 7 (13 pts), boolean chains 4, error handling 2 (4 pts), ternaries 2 (nesting depth added 25). 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":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"6416985bfbaa67671d9977c22425edc34f65cbe60b97d632b11e190648926ae4"}},{"ruleId":"D2","level":"warning","message":{"text":"BindTarget.resolveSymbol (cognitive 59): BindTarget.resolveSymbol has cognitive complexity 59 (threshold 15). Drivers by points: if/else 14 (42 pts), loops 3 (11 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/FixupChains.java"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"3357ac50565fefb9f81c2f66ece67c575bc6046181efd785cc8886a29f49cb53"}},{"ruleId":"D2","level":"warning","message":{"text":"ArmExIdx.arm_exidx_decode (cognitive 57): ArmExIdx.arm_exidx_decode has cognitive complexity 57 (threshold 15). Drivers by points: if/else 28 (46 pts), boolean chains 7, loops 2 (4 pts) (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":"unidbg-android/src/main/java/net/fornwall/jelf/ArmExIdx.java"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeb209037b62b35127d0bb5cfdd3a2c879855575df522954fead8802b203328d"}},{"ruleId":"D2","level":"warning","message":{"text":"CDObjectiveCProcessor.findObjcSymbol (cognitive 57): CDObjectiveCProcessor.findObjcSymbol has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (39 pts), loops 6 (11 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/CDObjectiveCProcessor.java"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"504f0bd169266f8140fde7aebac6b1168dbb6a9568c2476517ed48f862ab76b1"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM.showRegs (cognitive 56): ARM.showRegs has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (52 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"10194c8e120ab868c3d70ba59ad14b923e0cb5bab762f069c54f24a9c92257e4"}},{"ruleId":"D2","level":"warning","message":{"text":"FixupChains.handleChain (cognitive 56): FixupChains.handleChain has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (47 pts), ternaries 2 (8 pts), match/switch 1 (nesting depth added 33). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/FixupChains.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"9398321a31abd23e92c1eaadfdfe56117812bd1aa9e4cf1c668992ef95f72566"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOModule.findClosestSymbolByAddress (cognitive 56): MachOModule.findClosestSymbolByAddress has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 9, loops 3 (4 pts), error handling 2 (3 pts) (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"a972441852bd14ec471dd50d2c05a4d0ea5bd70257a520405448e11bd529d3dc"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM.appendMemoryDetails32 (cognitive 50): ARM.appendMemoryDetails32 has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 7 (22 pts), if/else 12 (21 pts), boolean chains 7 (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":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":923}}}],"partialFingerprints":{"codehealthFindingId/v1":"199a7842df4a57a85478685147482d3f64140508fab4221675ce5592bbe05e66"}},{"ruleId":"D2","level":"warning","message":{"text":"VaList64.\u003Cinit\u003E (cognitive 49): VaList64.\u003Cinit\u003E has cognitive complexity 49 (threshold 15). Drivers by points: if/else 21 (46 pts), match/switch 1 (2 pts), loops 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/VaList64.java"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d1313257a74ceddfa9dd6b8dd76e4ad61b8386307daa74dd51da2b5fdce062b"}},{"ruleId":"D2","level":"warning","message":{"text":"ArmExIdx.arm_exidx_apply_cmd (cognitive 49): ArmExIdx.arm_exidx_apply_cmd has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (39 pts), loops 4 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 26). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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":"unidbg-android/src/main/java/net/fornwall/jelf/ArmExIdx.java"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d8ec762cae1bdd9bb680bd925e35ab87093c8ef3bf8b9cf6a57d4784678260b"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.dlopen (cognitive 47): MachOLoader.dlopen has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 8 (12 pts), error handling 1 (3 pts), ternaries 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1991}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d729269d0ccc8855bf7d5e08e9da5a5b78ec4914db850ac45d0b5d3ce6b1027"}},{"ruleId":"D2","level":"warning","message":{"text":"AndroidSyscallHandler.futex (cognitive 46): AndroidSyscallHandler.futex has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (38 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"c313cfca0e7553bb7a9a8c4c29946c333db977287b824fc17e44b5ffe9da631a"}},{"ruleId":"D2","level":"warning","message":{"text":"Uleb128.value (cognitive 46): Uleb128.value has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 9 (45 pts), if/else 1 (nesting depth added 36). 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":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"49aaa827341d65eaeb58c0cf6163dea49e99fd643126a4db7603815653ae7967"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM.initArgs (cognitive 45): ARM.initArgs has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (39 pts), boolean chains 3, loops 3 (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":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":1187}}}],"partialFingerprints":{"codehealthFindingId/v1":"503834e402308abe168c21e9c2f7b1011b984c8908628c7e08307ab0d0751797"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractARMDebugger.dumpMemory (cognitive 45): AbstractARMDebugger.dumpMemory has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (29 pts), ternaries 2 (7 pts), error handling 2 (6 pts), loops 1 (3 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":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"dddcb9351c53d7e41691973059da6619fe270197a89485f9234c9c5c974d7e33"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.notifySingle (cognitive 43): MachOLoader.notifySingle has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (33 pts), loops 4 (9 pts), match/switch 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":2161}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e273033f6ee536f61077bf339bfd5e8dbb418ac1c2d529d492d3a2fe2ea7836"}},{"ruleId":"D2","level":"warning","message":{"text":"AssemblyCodeDumper.hookMemoryAccess (cognitive 42): AssemblyCodeDumper.hookMemoryAccess has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (24 pts), ternaries 6 (11 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/AssemblyCodeDumper.java"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fcc4d45ca9b0b4a2264490c1e5a37200e2d1eebca9eee4ecc4cf45cb3c75b1f"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseDarwinFileIO.getattrlist (cognitive 42): BaseDarwinFileIO.getattrlist has cognitive complexity 42 (threshold 15). Drivers by points: if/else 24 (35 pts), loops 3 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/file/ios/BaseDarwinFileIO.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"5042cf2af91f243d866512f7c96a2afe87c8df844c81d3f97f1faf2f949ec6c0"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractLoader.munmap (cognitive 41): AbstractLoader.munmap has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (38 pts), loops 1 (3 pts) (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":"unidbg-api/src/main/java/com/github/unidbg/spi/AbstractLoader.java"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"e21027a95196346434585e11b19b9e5e1890944a956d0afe989d482a2f5f1ed1"}},{"ruleId":"D2","level":"warning","message":{"text":"Dyld64.dlopen (cognitive 40): Dyld64.dlopen has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 3 (8 pts), boolean chains 1, ternaries 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a733faf2272b5e73e6fcc0a029df55af38e62b9a8071483e98726e8a48b8df4"}},{"ruleId":"D2","level":"warning","message":{"text":"UnidbgStructure.toString (cognitive 39): UnidbgStructure.toString has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/pointer/UnidbgStructure.java"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c27a2bd9e056d19abe580f9f4adff5d8fe22fca615f251b29b09420d5959d17"}},{"ruleId":"D2","level":"warning","message":{"text":"UnixSyscallHandler.resolve (cognitive 39): UnixSyscallHandler.resolve has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 8, loops 3 (6 pts), error handling 1 (5 pts) (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":"unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9eeb3854dce306eecdd2d03ebf517702351e868ed5fb05e7d225b29ab275950"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM32SyscallHandler.hook (cognitive 39): ARM32SyscallHandler.hook has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (26 pts), ternaries 2 (6 pts), boolean chains 3, error handling 3, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b15531a2e25e6e30deb91830089ac78594f7d2e154021f82b3d453faa8a501f"}},{"ruleId":"D2","level":"warning","message":{"text":"Dyld32.dlopen (cognitive 39): Dyld32.dlopen has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 3 (8 pts), ternaries 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"030750e8865153b66ff05314ecb42c7474620118aca7f93f4b87b76c8bf49b7b"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOModule.findSymbol (cognitive 39): MachOModule.findSymbol has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 3 (7 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 25). 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"b667d18f105b25f656cfefbdd365b6dd3f4bac2c7df9386faf24d2b72718bbed"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultWorkerPool.run (cognitive 38): DefaultWorkerPool.run has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (24 pts), error handling 2 (5 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (2 pts) (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":"unidbg-api/src/main/java/com/github/unidbg/worker/DefaultWorkerPool.java"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cb87a4f7f7b6351ca607da3101796f5e430c81f87c23d30a8997acd80540b33"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM64SyscallHandler.hook (cognitive 38): ARM64SyscallHandler.hook has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 4, error handling 3, ternaries 1 (2 pts), match/switch 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c46822fae243f4e773429f4177e92d734d33291e7e08d8f480bf068e6cffd80"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractJni.callObjectMethodV (cognitive 37): AbstractJni.callObjectMethodV has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 7 (13 pts), error handling 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2f145faaae5456ef4a4c9f3d727d100ceeb4b8c51873df3d3aacd8fc2d3e426"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM32SyscallHandler.hook (cognitive 35): ARM32SyscallHandler.hook has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (24 pts), ternaries 2 (4 pts), boolean chains 3, error handling 3, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"6712c80e8577651dae44e8d884458544db4ce5549fdcb70cb7bd965ff71b98a8"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractDebugServer.runServer (cognitive 35): AbstractDebugServer.runServer has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (28 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 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":"unidbg-api/src/main/java/com/github/unidbg/debugger/AbstractDebugServer.java"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"35baab77a4517768405aade0d16f8bb0571476176baed4bc7364e0b8d310e22c"}},{"ruleId":"D2","level":"warning","message":{"text":"Inspector.inspectInternal (cognitive 35): Inspector.inspectInternal has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 5 (14 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"18a85cf6f1f954733f6e7d221f365f106eef953ff0b43664bb47edee6a658134"}},{"ruleId":"D2","level":"warning","message":{"text":"ProxyUtils.matchMethodTypes (cognitive 34): ProxyUtils.matchMethodTypes has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 6 (9 pts), boolean chains 4, error handling 1 (2 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdfd3bca943a2f7e03772ae9400d90f1b319d222cbb47af87119fe12425f2438"}},{"ruleId":"D2","level":"warning","message":{"text":"McpTools.inspectObjcMsg (cognitive 34): McpTools.inspectObjcMsg has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (20 pts), error handling 4 (9 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1717}}}],"partialFingerprints":{"codehealthFindingId/v1":"d04b25cb954bb43dca51005f7be042a3f440b1315369eb0c2df8e44b37811b09"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.loadInternal (cognitive 34): MachOLoader.loadInternal has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f8aad371fd56b751f9bdeaf6e8d84ef36dcccb2832d0847089b14b25b50027b"}},{"ruleId":"D2","level":"warning","message":{"text":"gpb.list_gpbs (cognitive 34): gpb.list_gpbs has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (7 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/assets/gpb.js"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"beaa20001a7032749e0e9d9015428a15160d5ed58d53c836eee3bbaa523c0f35"}},{"ruleId":"D2","level":"warning","message":{"text":"ArmExIdx.arm_exidx_step (cognitive 33): ArmExIdx.arm_exidx_step has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 3 (8 pts), match/switch 1 (3 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":"unidbg-android/src/main/java/net/fornwall/jelf/ArmExIdx.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"d769d6dee19b487eee93ddd369adf049533c1ff47d6cc70c1f738bb074bda812"}},{"ruleId":"D2","level":"warning","message":{"text":"AssemblyCodeDumper.handleArm32MultipleAccess (cognitive 33): AssemblyCodeDumper.handleArm32MultipleAccess has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 9 (11 pts), boolean chains 5, match/switch 2 (3 pts), loops 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":"unidbg-api/src/main/java/com/github/unidbg/AssemblyCodeDumper.java"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8376cd7a1df00c03ffde854aff8e321f78be355de6a7b437b8a5f6c3c36f742"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM64SyscallHandler.hook (cognitive 32): ARM64SyscallHandler.hook has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (21 pts), ternaries 2 (4 pts), boolean chains 3, error handling 3, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"e40772c983480dbc148fb86fa00c722431c76a8cd0803fa096e3ad56e2043ce6"}},{"ruleId":"D2","level":"warning","message":{"text":"gpb.buildMsgDef (cognitive 32): gpb.buildMsgDef has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 5 (10 pts), error handling 1 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/assets/gpb.js"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"65569ba917559e1bedb49547591bfeba5aa72a40ca7f94bf1d8fb0cd0219e9b4"}},{"ruleId":"D2","level":"warning","message":{"text":"ModuleSymbol.resolve (cognitive 31): ModuleSymbol.resolve has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (8 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ModuleSymbol.java"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"d29111119d6b676d934a6f99ff6d0e435b55df64d52e81ce576186c0a6f596ab"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.processSection (cognitive 31): MachOLoader.processSection has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 1, 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1553}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c350f06e5f6caa35b084125ee5e5bee0996d7d7da06360d02a7c00009c73aca"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.rebase (cognitive 31): MachOLoader.rebase has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 4 (10 pts), match/switch 1 (2 pts), boolean chains 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1197}}}],"partialFingerprints":{"codehealthFindingId/v1":"3aadffefd7397bd470d2caff045ce617fa461ec370adbd649057d0ab13157914"}},{"ruleId":"D2","level":"warning","message":{"text":"KEvent.processKev (cognitive 30): KEvent.processKev has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 1, match/switch 1 (nesting depth added 16). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/kevent/KEvent.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"b04e1ffc21441e93878198bd98eec0a69b81cfb3886fca92c98d3be7a564d65c"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.eachBind (cognitive 30): MachOLoader.eachBind has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (7 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1620}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce1ad10a13f6b4d5dc50f1bf0b13e3ef1847a4fdccf9b316000e9b19489f4ee4"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOModule.findSymbolByNameInternal (cognitive 30): MachOModule.findSymbolByNameInternal has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (4 pts) (nesting depth added 16). 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":724}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d8958b0f4bdd89af36cf4314e891181327f6c47dfb3262c3ba3235a70ef10de"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractARMDebugger.disassemble (cognitive 29): AbstractARMDebugger.disassemble has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":1198}}}],"partialFingerprints":{"codehealthFindingId/v1":"0416ce2515bb77a3cef415a481ff748f259cd0cb9bd4c5375e8ce90238042a22"}},{"ruleId":"D2","level":"warning","message":{"text":"McpTools.resolveRegister (cognitive 29): McpTools.resolveRegister has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (22 pts), match/switch 2 (4 pts), boolean chains 3 (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":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1874}}}],"partialFingerprints":{"codehealthFindingId/v1":"19b8c83fffc6147bf5b23eacc992bd5914b58c08de75b14afe2182477fc57b82"}},{"ruleId":"D2","level":"warning","message":{"text":"ProxyUtils.matchField (cognitive 28): ProxyUtils.matchField has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (7 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"da383b000dbc5ea141babae1f674258929a65a500ce4109249547e6a31cc9994"}},{"ruleId":"D2","level":"warning","message":{"text":"AndroidResolver.createFileIO (cognitive 28): AndroidResolver.createFileIO has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 1 (3 pts), error handling 1 (nesting depth added 17). 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidResolver.java"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"527e2a809f846c4a41cfcf1638a45938049e50b1f550da442e9b26f2fd042807"}},{"ruleId":"D2","level":"warning","message":{"text":"DarwinResolver.createFileIO (cognitive 28): DarwinResolver.createFileIO has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 1 (3 pts), error handling 1 (nesting depth added 17). 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinResolver.java"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc461e2777613d0094924493fd83ab41d1bd40a5addb79312980dded3c84e6a5"}},{"ruleId":"D2","level":"warning","message":{"text":"SocketIO.setsockopt (cognitive 27): SocketIO.setsockopt has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (21 pts), match/switch 3 (5 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"919a4b58d8c87b947dcdeee983f5224be748012782f2789ef6be97219f680339"}},{"ruleId":"D2","level":"warning","message":{"text":"ElfDynamicStructure.\u003Cinit\u003E (cognitive 27): ElfDynamicStructure.\u003Cinit\u003E has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 4 (6 pts), match/switch 1 (2 pts), ternaries 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/net/fornwall/jelf/ElfDynamicStructure.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ed30b0a84a07851c41ff645e6c2f6b49fb1767f48632bc03ad164c73a81f475"}},{"ruleId":"D2","level":"warning","message":{"text":"McpTools.doCallFunction (cognitive 27): McpTools.doCallFunction has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 3 (6 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1411}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7e41c4204287e6392823377480808e52c7c9c10c291ae5e3e647c84b5ac6ff6"}},{"ruleId":"D2","level":"warning","message":{"text":"IpaResolver.resolve (cognitive 27): IpaResolver.resolve has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (2 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaResolver.java"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"73aa8f325ea55d70692157e9af48eabdd02060c3460a68aaf03eed58e4614e83"}},{"ruleId":"D2","level":"warning","message":{"text":"ProxyUtils.unpack (cognitive 26): ProxyUtils.unpack has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (7 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b7e8601a39f77dae93bc1b48201ef4cd8d3c312be5ec6f2b00ccfc86e580869"}},{"ruleId":"D2","level":"warning","message":{"text":"TraceFunctionCall.hook (cognitive 26): TraceFunctionCall.hook has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 2, error handling 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":"unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"b04aef793afca79e3979ac153acedca4bf8beb9c0f07ea127c2edcb98aca409d"}},{"ruleId":"D2","level":"warning","message":{"text":"McpTools.readPointer (cognitive 26): McpTools.readPointer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (9 pts), ternaries 3, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1269}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b6d4dac7e6f3e150eb2b45c422e1dff69da9e39c848aad1aa940b189d602207"}},{"ruleId":"D2","level":"warning","message":{"text":"GPBDescriptor.buildMsgDef (cognitive 26): GPBDescriptor.buildMsgDef has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (10 pts), ternaries 3 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/gpb/GPBDescriptor.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"36357e3f4bcafc7d51cf16725432319fd64daf2ca3b789b392dee19947a5a9bc"}},{"ruleId":"D2","level":"warning","message":{"text":"McpTools.traceCode (cognitive 24): McpTools.traceCode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, error handling 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"692462368ccbde8575689fbd1f50ca16ee6b44520a2fc9d6e88e80327124d75a"}},{"ruleId":"D2","level":"warning","message":{"text":"SocketIO.setsockopt (cognitive 24): SocketIO.setsockopt has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 3 (5 pts), error handling 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e910b8bd64914519d6b22ee3ced9edc6cb8b6424aa527c7bdaae7ead00dd53f"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractARMDebugger.setupTraceMemory (cognitive 23): AbstractARMDebugger.setupTraceMemory has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 3, ternaries 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"a64c5072d0a045668e10af561616341c7df83df3f06e5e170b448c20efbc877a"}},{"ruleId":"D2","level":"warning","message":{"text":"McpTools.listExports (cognitive 23): McpTools.listExports has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 3 (5 pts), loops 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1543}}}],"partialFingerprints":{"codehealthFindingId/v1":"744e2ed436bcff18ec8f09025d23223929b70cd26fdcb5902c047e9e3e7ab293"}},{"ruleId":"D2","level":"warning","message":{"text":"dyld_chained_import_addend64.resolve (cognitive 23): dyld_chained_import_addend64.resolve has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (3 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/FixupChains.java"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b746b129b3d886ea3289c913b35566937d89e147fd69826c1df56be5c061968"}},{"ruleId":"D2","level":"warning","message":{"text":"AndroidElfLoader.dlsym (cognitive 22): AndroidElfLoader.dlsym has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts), ternaries 2 (4 pts), boolean chains 2 (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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"9735b63ef380260cbd38823c61dbae5dda73b472aef681b6de8f8cdf4d23ce39"}},{"ruleId":"D2","level":"warning","message":{"text":"SimpleARM64Debugger.loop (cognitive 22): SimpleARM64Debugger.loop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (3 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a61f9c220b6c6ab7e4e0956f240a85b6c70f04229fa4939beac5988d3afab3d"}},{"ruleId":"D2","level":"warning","message":{"text":"SimpleARMDebugger.loop (cognitive 22): SimpleARMDebugger.loop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (3 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARMDebugger.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"f413bd8ad82fba0b5e94057a71c8009f70bc807de2bf49159f3b2790b7caa54f"}},{"ruleId":"D2","level":"warning","message":{"text":"GdbStub.processInput (cognitive 22): GdbStub.processInput has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/debugger/gdb/GdbStub.java"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef8d776e7186f1e585dd90316e1ecb5f5551b0ffdc9e199c960287ef66cc5fe4"}},{"ruleId":"D2","level":"warning","message":{"text":"McpTools.allocateMemory (cognitive 22): McpTools.allocateMemory has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 4 (5 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1610}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5260ad85d97975f4fd962b5a0526fff56243048f3d70f8c05e28c3733724f08"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM32SyscallHandler.bionic_clone (cognitive 21): ARM32SyscallHandler.bionic_clone has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20 (21 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":877}}}],"partialFingerprints":{"codehealthFindingId/v1":"eec2b9c86eb5d1ea2e5c2380ef986e2861dc1c8ab7cec1fce4916fc8cb8b48c8"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM32SyscallHandler.pthread_clone (cognitive 21): ARM32SyscallHandler.pthread_clone has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20 (21 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee7657255ac23dd4b5b99b7ab8b62203cd9b23a2f3239b7c236b68817806bb81"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM64SyscallHandler.bionic_clone (cognitive 21): ARM64SyscallHandler.bionic_clone has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20 (21 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee711aadf19ace4bffc224df7a9de0cafca244f884aadfabb815b705d24e01ee"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM64SyscallHandler.openat (cognitive 21): ARM64SyscallHandler.openat has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (20 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":1429}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8be5e536faac58cc2ac7d127eb9996bd541ceab92f1999d3459463bc7daac59"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM.appendAddrValue (cognitive 21): ARM.appendAddrValue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (5 pts), error handling 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":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"e834abea20d9540587dc47b7377552561dc5fbd8e453eff2d0c1ac83bd3616ad"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM.appendMemoryDetails64 (cognitive 21): ARM.appendMemoryDetails64 has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (6 pts), boolean chains 4 (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":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":997}}}],"partialFingerprints":{"codehealthFindingId/v1":"26effd8ecccde6719551e3c05a83a215475a4ce4ef2b8477f41e1ce35fd49369"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM64SyscallHandler._kernelrpc_mach_vm_allocate_trap (cognitive 21): ARM64SyscallHandler._kernelrpc_mach_vm_allocate_trap has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (20 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":2626}}}],"partialFingerprints":{"codehealthFindingId/v1":"3525d9a655b4a1e4040c4b9f109eb9578a53adaed681279c2c6ed44218c59d15"}},{"ruleId":"D2","level":"warning","message":{"text":"UnidbgPointer.toString (cognitive 20): UnidbgPointer.toString has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (2 pts), ternaries 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/pointer/UnidbgPointer.java"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"cec69f53dc1c275eaad76c0a035687b7ebebcd41949a60220c141e7812a9ee76"}},{"ruleId":"D2","level":"warning","message":{"text":"IpaResolver.createDirectoryFileIO (cognitive 20): IpaResolver.createDirectoryFileIO has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaResolver.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fff3b989400a0efe5a1035055f31d360deaa87347dec5995dcdc4854e7c67c2"}},{"ruleId":"D2","level":"warning","message":{"text":"Objc2Category.read (cognitive 20): Objc2Category.read has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 1 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/Objc2Category.java"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e011e4347ee74cfac6740a9c50739eb5b59edcf0e42d3d1a74ebf1114de7a75"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.bindExternalRelocations (cognitive 20): MachOLoader.bindExternalRelocations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1336}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e5b44ca2077ee6dbe8d5e834e654de9baca80e12507a2c93869b8988ce16270"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.bindIndirectSymbolPointers (cognitive 20): MachOLoader.bindIndirectSymbolPointers has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (10 pts), if/else 6 (7 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1497}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad1a341963ce0b945f510a5a70bb66326fd190b22fa33344e1da04c2505902cf"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.doBindAt (cognitive 20): MachOLoader.doBindAt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1849}}}],"partialFingerprints":{"codehealthFindingId/v1":"362ffec3002f54628b5a44b0e65232200b4d2ef49379e283320c84f40f24f7ab"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemPropertyHook.hook (cognitive 19): SystemPropertyHook.hook has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (19 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb0a9229cfa459f5a9802cb99d50a7194b198a34eccc022b38577b9f5fae0124"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM64SyscallHandler.pthread_clone (cognitive 19): ARM64SyscallHandler.pthread_clone has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"496bc494a82757bfb4b75700aa2828fddac59f90509538f8623c684abd020691"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM.assembleDetail (cognitive 19): ARM.assembleDetail has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (6 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":1063}}}],"partialFingerprints":{"codehealthFindingId/v1":"58f2abbac5625a2e17d92149ab559d3e4d7d8df4c66f5faaec9db4df5ad60922"}},{"ruleId":"D2","level":"warning","message":{"text":"UniThreadDispatcher.sendSignal (cognitive 19): UniThreadDispatcher.sendSignal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, 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":"unidbg-api/src/main/java/com/github/unidbg/thread/UniThreadDispatcher.java"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d2de112e45a02e13efa12b6e4b9fb2bc92cc2821bc7d597a42d6e8a210f6556"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM64SyscallHandler.newselect (cognitive 19): ARM64SyscallHandler.newselect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 1 (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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ae666d055ff009b3cdd12a640b74687ce553ab8e15ed8d453220d3a2828382c"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOModule.processExportNode (cognitive 19): MachOModule.processExportNode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1d8aee927fe790fa09b084a370f9958277f2c96b69ae7aee942fa6a04fab36f"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractJni.getObjectField (cognitive 18): AbstractJni.getObjectField has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (4 pts), boolean chains 2 (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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"e48034dfc9d788a9e8f7543d64ed5a76c41e5dea5c9f0564b4a29f7366a32df5"}},{"ruleId":"D2","level":"warning","message":{"text":"ArmLD.dlopen (cognitive 18): ArmLD.dlopen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"5335826ee19f34e5fd92380e58603f70025bc2c8c893f6d4eddd7a482de27f1f"}},{"ruleId":"D2","level":"warning","message":{"text":"ArmLD64.dlopen (cognitive 18): ArmLD64.dlopen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"39ac48a8363b63fccf3a449743d7cfc2808be0ceabb3602fc589aa588490345e"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractARMDebugger.handleWriteCommand (cognitive 18): AbstractARMDebugger.handleWriteCommand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ded48bd1064ebb4a26271b9f60cc50e50407b7af53552a06243fa9a9d40bba7"}},{"ruleId":"D2","level":"warning","message":{"text":"RegistersCommand.processCommand (cognitive 18): RegistersCommand.processCommand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/debugger/gdb/RegistersCommand.java"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"478e61dfc999d78a9d6812514ab0973ee9b9325b2f37dda42e472e0d21eab20b"}},{"ruleId":"D2","level":"warning","message":{"text":"McpTools.getRegisters (cognitive 18): McpTools.getRegisters has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 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":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":557}}}],"partialFingerprints":{"codehealthFindingId/v1":"206fae94cc600a45feabbace27aaa879e6286763cd161b9cfa2b86f82e450994"}},{"ruleId":"D2","level":"warning","message":{"text":"McpTools.listMemoryMap (cognitive 18): McpTools.listMemoryMap has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 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":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"b07cd61c6ed13b60630642780d6f5ddc7dac58ba60586191bbd148202858e43e"}},{"ruleId":"D2","level":"warning","message":{"text":"ARM64SyscallHandler.proc_info (cognitive 18): ARM64SyscallHandler.proc_info has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1651}}}],"partialFingerprints":{"codehealthFindingId/v1":"f40becb014014b13b1baf8d3edc49b18e7c8cef2761d53c681c26327c8f1e5c0"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.findSymbolInternal (cognitive 18): MachOLoader.findSymbolInternal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1 (nesting depth added 9). 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1816}}}],"partialFingerprints":{"codehealthFindingId/v1":"74f6c3ce7228d9dec79cc53d6fa100d572c7ab428d0b12ad3aaa0c595b9388ef"}},{"ruleId":"D2","level":"warning","message":{"text":"DvmObject.callJniMethod (cognitive 17): DvmObject.callJniMethod has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 1 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmObject.java"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d499a108df07eb4bda46c07922cbd6aaaa48776cdc7c81a5f5b8c54762cadbb"}},{"ruleId":"D2","level":"warning","message":{"text":"SocketIO.getNetworkIFs (cognitive 17): SocketIO.getNetworkIFs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d603e7733cb4ed8c5ceb3a86952e4f27bd108b5755a2587c8aa8026dc81f76c"}},{"ruleId":"D2","level":"warning","message":{"text":"GnuEhFrameHeader.dwarf_get_cie (cognitive 17): GnuEhFrameHeader.dwarf_get_cie has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/net/fornwall/jelf/GnuEhFrameHeader.java"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eaa59ba5e3713131e4b176138fc503312ef9a718a9d2b7aab5995754c612380"}},{"ruleId":"D2","level":"warning","message":{"text":"ARMSvcMemory.registerSvc (cognitive 17): ARMSvcMemory.registerSvc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARMSvcMemory.java"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"29d6f82f14dff9dac0af805510285a7016631ac7be437772357514d344f5e434"}},{"ruleId":"D2","level":"warning","message":{"text":"DarwinSyscallHandler.bsdthread_create (cognitive 17): DarwinSyscallHandler.bsdthread_create has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"abefe9f7ef84cf5df0143c9839666a3bb2124b184f77664dcddc7c774e3aea02"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOLoader.doBindAt (cognitive 17): MachOLoader.doBindAt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1719}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b046d3c959c04210bf2ca7af27e6424d8aba5c60330373cd0a556344d81718d"}},{"ruleId":"D2","level":"warning","message":{"text":"Uleb128._read (cognitive 17): Uleb128._read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"21f19f4bbc19f64e5c1a27753ae330856e3db01eaed8452bebd21c92a313865b"}},{"ruleId":"D2","level":"warning","message":{"text":"gpb.buildDefaultValue (cognitive 17): gpb.buildDefaultValue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. 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":"unidbg-ios/assets/gpb.js"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"eec4b2e96a5701d5f009fcd8c4841ceea94a19625e749714e8c8f7216fcf94ef"}},{"ruleId":"D2","level":"warning","message":{"text":"Shorty.decodeType (cognitive 16): Shorty.decodeType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 2 (4 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/Shorty.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb09e46056f531930bf389445eb2b3dc322ff307005d345cb417846e02323266"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractARMDebugger.handleMemoryCommand (cognitive 16): AbstractARMDebugger.handleMemoryCommand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c4e66e3bf8c279408a5b568d4c52ed2763275b0f6a0e6828547e2c3a1cc8891"}},{"ruleId":"D2","level":"warning","message":{"text":"McpTools.readTyped (cognitive 16): McpTools.readTyped has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 2 (4 pts), match/switch 2 (3 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1319}}}],"partialFingerprints":{"codehealthFindingId/v1":"473f670377e5007c660390d96a805d50c2a7f77428d45a4c202c87aa73363841"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryTracker.printReport (cognitive 16): MemoryTracker.printReport has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/memory/MemoryTracker.java"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"acbed5608f0700202678d2a6bd1cda3120678f020709825b243e3c12a1bf227d"}},{"ruleId":"D2","level":"warning","message":{"text":"Utils.readFile (cognitive 16): Utils.readFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 1, loops 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":"unidbg-api/src/main/java/com/github/unidbg/Utils.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ec538bb1ffdb453ad0702631759dad4b4760b5a91bc87994a7a82ca452cac5c"}},{"ruleId":"D2","level":"warning","message":{"text":"Dyld.generateDyldImageInfo (cognitive 16): Dyld.generateDyldImageInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld.java"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c51e29dc5b8e92812ec4ff9a322a8c57b624032247a8cd51a423e18afba71a4"}},{"ruleId":"D2","level":"warning","message":{"text":"IndirectSymbol.resolveSymbol (cognitive 16): IndirectSymbol.resolveSymbol has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (16 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/IndirectSymbol.java"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d7222841bdabe6ce1ef94d52969225b9fc3ebd55af69108b8c28dce8ed8cfb8"}},{"ruleId":"D2","level":"warning","message":{"text":"MachOModule.bindAt (cognitive 16): MachOModule.bindAt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":1077}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eea0b05466063f6417582800503a79e7242052cb593b36f7a3bb06cee038a7b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DalvikVM64.\u003Cinit\u003E: MethodTooLong \u2014 \u003Cinit\u003E runs 2907 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2807 over it, 29.07\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"03097873f4f6ff904c26f339cc83eee2ce08d4bde5f97d9199897c35bdf2ac17"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DalvikVM.\u003Cinit\u003E: MethodTooLong \u2014 \u003Cinit\u003E runs 2807 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2707 over it, 28.07\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"14bed618eb76c217d19c35d885ba2d40e57d3e57c12726a9f7d2ae3f1555d436"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MachO: ClassTooLong \u2014 3250 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 2850 over it, 8.13\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"e799b545eeded2540ddbf2e398ddd504adb1747b54b546002a3dbe2d9908600f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ARM64SyscallHandler.mach_msg_trap: MethodTooLong \u2014 mach_msg_trap runs 806 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 706 over it, 8.06\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":2714}}}],"partialFingerprints":{"codehealthFindingId/v1":"f94c29ab65edafb4f44019b15155961793fbe7aa56c652387d9b750e04a27e00"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ARM64SyscallHandler: ClassTooLong \u2014 3149 significant lines (blank, comment-only and punctuation-only lines excluded), 118 methods. The bar is 400 significant lines; this is 2749 over it, 7.87\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fa61efd1cf46b098efefb24fdefba13a02f867b09085d3402411892e24e477b"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DalvikVM64: ClassTooLong \u2014 2925 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 2525 over it, 7.31\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"c332e9ddcd2dc30e55e9b0a87edd0428bbda2daa92a2348fcd30b9d6622035c8"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DalvikVM: ClassTooLong \u2014 2827 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 2427 over it, 7.07\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"03bfbd7bac8c5eec5f2af7da4f64dbe8f3684910a9e75982cea3f0587abba2f2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ios/ARM64SyscallHandler.java: FileTooLong \u2014 3276 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: ARM64SyscallHandler (132-4155). The bar is 500 significant lines; this is 2776 over it, 6.55\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f397470082ff80014cc71546e26b02cfb5a7f3ccb51ed04448b158f8537d0b4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: kaitai/MachO.java: FileTooLong \u2014 3260 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: MachO (15-4322). The bar is 500 significant lines; this is 2760 over it, 6.52\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":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a481ee4286789039ceb1786028818d69de590e8991770479b16c1480f97e1891"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ARM32SyscallHandler.mach_msg_trap: MethodTooLong \u2014 mach_msg_trap runs 628 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 528 over it, 6.28\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1796}}}],"partialFingerprints":{"codehealthFindingId/v1":"6028a9e4cf1ae7a0379c2af53cd619aa1a36181cc40f5dbfc79cc3ae87c473eb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: dvm/DalvikVM64.java: FileTooLong \u2014 2950 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: DalvikVM64 (29-4037). The bar is 500 significant lines; this is 2450 over it, 5.90\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"41a4102bd756ac0604d3c5765bb5d4e4bc2473319d115485d3efc4d2207fa350"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: dvm/DalvikVM.java: FileTooLong \u2014 2857 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: DalvikVM (34-3919). The bar is 500 significant lines; this is 2357 over it, 5.71\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"33fa8ea273b9e87aeb3aba36f9be031ec7e469fa481eddb7c76ffc8d3c67b701"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ARM32SyscallHandler: ClassTooLong \u2014 2241 significant lines (blank, comment-only and punctuation-only lines excluded), 93 methods. The bar is 400 significant lines; this is 1841 over it, 5.60\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"64f170dd8abedb9a5f8f0040af81ea3795351418ef8fea331b764419f0bbba82"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ARM64SyscallHandler.hook: MethodTooLong \u2014 hook runs 481 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 381 over it, 4.81\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f0a73737526231cc9446a0492307278d96ab122b3c29f514b2ebe7e830ad6c6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ios/ARM32SyscallHandler.java: FileTooLong \u2014 2352 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: ARM32SyscallHandler (119-2986). The bar is 500 significant lines; this is 1852 over it, 4.70\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f6235655852f7f48769e9811802a8539575c959d3a21601ed58f9e17c2aab3e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Dyld64.hook: MethodTooLong \u2014 hook runs 465 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 365 over it, 4.65\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aa6aa87b92636d2b9733d7e448468ea640cedc17d69b7c067960b6b9adb535b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ARM32SyscallHandler.hook: MethodTooLong \u2014 hook runs 444 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 344 over it, 4.44\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"3620056a4320d2b80dd1572cd455cd8c88f0e5eeadda943f72e5de515101e5b7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ARM64SyscallHandler.sysctl: MethodTooLong \u2014 sysctl runs 435 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 335 over it, 4.35\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1825}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf2c0e3c828d9ec90c6db42e81bcd994e80f7c6c1cb0a501a3a7c17a43851e4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MachOLoader.loadInternalPhase: MethodTooLong \u2014 loadInternalPhase runs 420 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 320 over it, 4.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5fbd1ba85d4bae9d31a11e418b323c514f1804fc1d8248a522cc27cbad717c7"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MachOLoader: ClassTooLong \u2014 1657 significant lines (blank, comment-only and punctuation-only lines excluded), 58 methods. The bar is 400 significant lines; this is 1257 over it, 4.14\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccf883f6154d419c8f67d641450bd3c49ef905b3f16e5ed09cc036aa540d07d7"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ARM32SyscallHandler: ClassTooLong \u2014 1604 significant lines (blank, comment-only and punctuation-only lines excluded), 96 methods. The bar is 400 significant lines; this is 1204 over it, 4.01\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"026de6fbb71ceea90eb3f2de1632034a99ff0b392b7020c9eda06371d4803974"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ARM64SyscallHandler: TooManyMethods \u2014 118 methods. The bar is 30 methods; this is 88 over it, 3.93\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a21cd95138757cd94296e585da830c575b0d89ab8f8557440565dee72ca5927"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ARM32SyscallHandler.hook: MethodTooLong \u2014 hook runs 393 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 293 over it, 3.93\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7fff3c3473c24d1dbd9a9f331dde8c456cb25058aa9d8f214c4a56d6a021a97"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: McpTools: ClassTooLong \u2014 1535 significant lines (blank, comment-only and punctuation-only lines excluded), 75 methods. The bar is 400 significant lines; this is 1135 over it, 3.84\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b2bcfee7d865d529a17f49097558aaac12943db1059960fff5289e0bcf60466"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SymbolResolver.hook: MethodTooLong \u2014 hook runs 371 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 271 over it, 3.71\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbd8a32046c9c8250426aa32d1ea3776953a683a1f6843223ab312265a9d5af7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Dyld64.\u003Cinit\u003E: MethodTooLong \u2014 \u003Cinit\u003E runs 368 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 268 over it, 3.68\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dce2ee498a8a21187e0880bab1d477261b5b1f34653d47a895092c7925ca3df"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: JniFunction: TooManyMethods \u2014 110 methods. The bar is 30 methods; this is 80 over it, 3.67\u00D7 the bar. Most of these members implement dvm.Jni (56 of 57 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/JniFunction.java"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"f12f08b99d8ce4500fdf69ebcb7bcac11a6c4a32df60ee94ab30fd1bddb6195d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AbstractJni: TooManyMethods \u2014 109 methods. The bar is 30 methods; this is 79 over it, 3.63\u00D7 the bar. Most of these members implement dvm.Jni (56 of 56 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6f91be87284411f67cced0ed349678ce2529b82fdcf8615d566c321b5e47d36"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AbstractARMDebugger.handleCommon: MethodTooLong \u2014 handleCommon runs 361 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 261 over it, 3.61\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d7a541e261d7eae118bd5fb0d0657fd9f8587f41eaecaa40b4db2615d43b21d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ARM.showRegs64: MethodTooLong \u2014 showRegs64 runs 356 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 256 over it, 3.56\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"878f0d65954ee77cc7f535bd5cc8a212b18b3ebe01a9e20682ef00ad698ed613"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ios/MachOLoader.java: FileTooLong \u2014 1724 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: MachOLoader (72-2415). The bar is 500 significant lines; this is 1224 over it, 3.45\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c8b6e802c09e06957810219d69de9651c2ea4c45ad6f2ba3979d9291edf1d7a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: linux/ARM32SyscallHandler.java: FileTooLong \u2014 1653 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ARM32SyscallHandler (56-2132). The bar is 500 significant lines; this is 1153 over it, 3.31\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0267b926686c114952914cf42064f7e2a9f0f59b9be60b17d0d4e710297dfcc5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ARM32SyscallHandler: TooManyMethods \u2014 96 methods. The bar is 30 methods; this is 66 over it, 3.20\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"17c8886d9edf45c10fa7ba74be5d681f382a7b6ada358576ae8798cead8bc6d7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ARM64SyscallHandler.hook: MethodTooLong \u2014 hook runs 320 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 220 over it, 3.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0ca631228f0a51419ca998fb7c614eb17f9bb7e8408d0e24a7b77699f15aee1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: mcp/McpTools.java: FileTooLong \u2014 1574 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: McpTools (43-2049). The bar is 500 significant lines; this is 1074 over it, 3.15\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":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b54a452884390ea1f55afdf054c25dd7c5cc0ee230342d1c5df00b6925e1885"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ARM32SyscallHandler: TooManyMethods \u2014 93 methods. The bar is 30 methods; this is 63 over it, 3.10\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"13bf4ded1e61cc86b302d02f9ed7dd50f6cebe27ff8bb342eb2f3e384e54b5be"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ARM64SyscallHandler: ClassTooLong \u2014 1212 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods. The bar is 400 significant lines; this is 812 over it, 3.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b939b68d19d001df8db15d126ea277698ceb98f67cc49861a5a1a22b7f57805"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Dyld32.\u003Cinit\u003E: MethodTooLong \u2014 \u003Cinit\u003E runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.88\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf205cec84d67ea7fd01e79f0b5d949064d6512418c9d6d9e7ecfe42bc60faed"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ARM32SyscallHandler.sysctl: MethodTooLong \u2014 sysctl runs 283 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 183 over it, 2.83\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1328}}}],"partialFingerprints":{"codehealthFindingId/v1":"d75c0ba9f63f9bebed0e23b75418274ce4d3c5539bf5b65b8e9b8ffef4a4b6c8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Hypervisor: TooManyMethods \u2014 84 methods. The bar is 30 methods; this is 54 over it, 2.80\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"af0d230c9ff121f4a3a97a7893e38bc79451f5c919a432b43e4e40ffd766f975"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AndroidElfLoader.loadInternal: MethodTooLong \u2014 loadInternal runs 273 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 173 over it, 2.73\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b21debb4f22c642ddee937337372d6f1e2dce0e290c940153f451fb54ae78c6"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AbstractARMDebugger: ClassTooLong \u2014 1063 significant lines (blank, comment-only and punctuation-only lines excluded), 58 methods. The bar is 400 significant lines; this is 663 over it, 2.66\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"0818b6cf8e4aa1f21e6e645c4f908a88e7b3117bf29bdf54212c9cbddb065e0f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Dyld64: ClassTooLong \u2014 1029 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 629 over it, 2.57\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"402b61bb83e5c243d6eadad033c7c6c912a16dc2dcb162a9d932216f7026ed70"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ARM: ClassTooLong \u2014 1011 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 611 over it, 2.53\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"a932f6fea196fe97b1865b61e1e5adfbab0a6a1f23193a1b3dcdf74ff18240e0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: linux/ARM64SyscallHandler.java: FileTooLong \u2014 1260 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: ARM64SyscallHandler (55-1624). The bar is 500 significant lines; this is 760 over it, 2.52\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd0b96e148a487b8a5862b59686c2b214c5c6c7611ec6e9d769ab4007548c3f4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: McpTools: TooManyMethods \u2014 75 methods. The bar is 30 methods; this is 45 over it, 2.50\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"03db45461d31d72a19851cd8fa675b2b0853c7d2dcd4ee5fb78f5dc4cd03deb9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ArmLD64.hook: MethodTooLong \u2014 hook runs 244 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 144 over it, 2.44\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1312f182508347ed75e53e2b1800f24db77d1f1c911eb1f2ee220f62336d258"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Unicorn: TooManyMethods \u2014 69 methods. The bar is 30 methods; this is 39 over it, 2.30\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/unicorn/Unicorn.java"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8af3b2cf58c5a5c99f3d58d62d8f5f5157e55f9c59348233dbc48bb6136c307"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LoadCommand._read: MethodTooLong \u2014 _read runs 226 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 126 over it, 2.26\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":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":3758}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d29aafd7da732faccfc2e35093ee19913e79b63592c690ee1be87ad1ab84ee7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AbstractJni.callObjectMethodV: MethodTooLong \u2014 callObjectMethodV runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.24\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"06a6b5ab3219a295ea2b5b7c2e76ca9761f58ba2fa097a319fa54ee2d2b36fe8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: arm/AbstractARMDebugger.java: FileTooLong \u2014 1104 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: AbstractARMDebugger (46-1468). The bar is 500 significant lines; this is 604 over it, 2.21\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":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8de3be6a14161e4d01f6959e8828598cdcb172892a026a4938a436c7ea6022e5"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AbstractJni: ClassTooLong \u2014 864 significant lines (blank, comment-only and punctuation-only lines excluded), 109 methods. The bar is 400 significant lines; this is 464 over it, 2.16\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7678c053481cd56b30330ca8d3274e90063dde0a015bfff2237dbc9dac2c93a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ios/Dyld64.java: FileTooLong \u2014 1058 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Dyld64 (33-1401). The bar is 500 significant lines; this is 558 over it, 2.12\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c499c904865a5e8201b8d869d39e61fea92418d6bcfa01c5a782e3b5917fbb60"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ARM64SyscallHandler: TooManyMethods \u2014 63 methods. The bar is 30 methods; this is 33 over it, 2.10\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"98883b907de10dfea631b4698d807223aefa2c994542125095dcd240980d55e9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: arm/ARM.java: FileTooLong \u2014 1039 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ARM (37-1304). The bar is 500 significant lines; this is 539 over it, 2.08\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":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"712ae785ce95ef59081f0be9e8f5bc6f1e4792eaecbbabe8c714a9f0615f7e47"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Dynarmic: TooManyMethods \u2014 61 methods. The bar is 30 methods; this is 31 over it, 2.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c170ba98b41aa21645f0d11fceaacfe9f09b842ccd9731d6e6be5d035608787"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MachOModule: ClassTooLong \u2014 806 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 406 over it, 2.02\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"859b0a8ca20abbdc6121a17bbfdb6c31283d6713c89cad61733d62d83cac0c73"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Kvm: TooManyMethods \u2014 58 methods. The bar is 30 methods; this is 28 over it, 1.93\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"299446e596bbb01dbaf7d9d03e0789c109fe903fbd48798421eba50e82d552fd"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AbstractARMDebugger: TooManyMethods \u2014 58 methods. The bar is 30 methods; this is 28 over it, 1.93\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaac2bd72b38bc044499c0f4da4327ea832a2414ecec50cba3c0257a25659429"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Arm32HookContext: TooManyMethods \u2014 58 methods. The bar is 30 methods; this is 28 over it, 1.93\u00D7 the bar. Most of these members implement context.Arm32RegisterContext (39 of 58 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/hook/Arm32HookContext.java"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"492df2a83d1584b6f5d678cce673cd415a582fd4b9cf7148e186220408028e9d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MachOLoader: TooManyMethods \u2014 58 methods. The bar is 30 methods; this is 28 over it, 1.93\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cd8a8ad071252501acd9bfbd9e9c53dfa954a01885cbeafb3f8dac49b36c8d8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ArmLD.hook: MethodTooLong \u2014 hook runs 193 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 93 over it, 1.93\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1516700cbe0bbf4e52ef772e23f2b193dee4ae3f42071ea3ec4d91292d1ef6e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GnuEhFrameHeader.dwarf_get_loc: MethodTooLong \u2014 dwarf_get_loc runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91\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":"unidbg-android/src/main/java/net/fornwall/jelf/GnuEhFrameHeader.java"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c8a0f506c6d23e57a4beb7e4a06fcce81928699a0b26422d34532739bf6032f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ElfDynamicStructure.\u003Cinit\u003E: MethodTooLong \u2014 \u003Cinit\u003E runs 188 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 88 over it, 1.88\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":"unidbg-android/src/main/java/net/fornwall/jelf/ElfDynamicStructure.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a2680cd4b0727a4bfb476cd55b0093997ae14fcf83349cfd39396b5fcae2295"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ProxyJni: TooManyMethods \u2014 55 methods. The bar is 30 methods; this is 25 over it, 1.83\u00D7 the bar. Most of these members implement dvm.Jni (54 of 55 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd4123f9ea7c17a308dc97bb778f3af6ca66ab049a4e0f9e44dbb87226eef33d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AbstractEmulator: TooManyMethods \u2014 55 methods. The bar is 30 methods; this is 25 over it, 1.83\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/AbstractEmulator.java"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"27e49d774337797a556be47fa0905a1c725d9e1f77758e55d6b18d16f2dd8987"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BackendArm32RegisterContext: TooManyMethods \u2014 55 methods. The bar is 30 methods; this is 25 over it, 1.83\u00D7 the bar. Most of these members implement context.Arm32RegisterContext (39 of 55 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/context/BackendArm32RegisterContext.java"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"9be034f5d935b5af4a8f039e4de5b7c52107b157da2714fd07df2256b527de02"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: dvm/AbstractJni.java: FileTooLong \u2014 909 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: AbstractJni (49-1263). The bar is 500 significant lines; this is 409 over it, 1.82\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e15d85d408a81e4685ca5cfe21b999a09d1f9719d4de892a0b29c6a763d0236"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ARM.showRegs: MethodTooLong \u2014 showRegs runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77\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":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c2a15d4f03df3e4cf7b5e7d099dfc562002af5bf56dd16b738e79a329d674dc"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: HookZzArm32RegisterContextImpl: TooManyMethods \u2014 53 methods. The bar is 30 methods; this is 23 over it, 1.77\u00D7 the bar. Most of these members implement context.Arm32RegisterContext (39 of 53 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/HookZzArm32RegisterContextImpl.java"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ba15feb8e69ef0b37e4ed153de1e8ce90b8e8e37cd0e63a1147b90e0fb5b5e1"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: UnidbgPointer: TooManyMethods \u2014 52 methods. The bar is 30 methods; this is 22 over it, 1.73\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/pointer/UnidbgPointer.java"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"6486aba499d78f77e6636d40653604717273a29b42bde5cfd9285dc6529d6581"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ios/MachOModule.java: FileTooLong \u2014 855 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: MachOModule (53-1178). The bar is 500 significant lines; this is 355 over it, 1.71\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa90a808422beb195cecd8a10c62c92876685ba2bed1621bda41c1eb877c7378"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DvmMethod: TooManyMethods \u2014 49 methods. The bar is 30 methods; this is 19 over it, 1.63\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmMethod.java"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"c646c9a69c73bc95070aca933a6b1788e112c4c2ed7d01d44b3f4c60fea6d078"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ProxyJni: ClassTooLong \u2014 623 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 400 significant lines; this is 223 over it, 1.56\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8af9ebeb5343de081f28863ac753445e8d82aa7c9f43a35a95b2f8979e9377c"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: HypervisorBackend64: ClassTooLong \u2014 614 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 214 over it, 1.54\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"a260d827264db005bcaeea72fe77d27c6aff9ae5e58820995e79509192c79d9e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MachOLoader.fixupAllChainedFixups: MethodTooLong \u2014 fixupAllChainedFixups runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":932}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bbee6231705ad61176e8b856f23b19e2d5ea39f630524bc64192c8ccfc90e53"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DarwinSyscallHandler: ClassTooLong \u2014 593 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 400 significant lines; this is 193 over it, 1.48\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"7749f5c367c0d9247fa57c29bf20bd626bb6489c0734debee2ae6004b0545a66"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AndroidElfLoader: ClassTooLong \u2014 591 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 191 over it, 1.48\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"da114842deafc54c288bba1be8a97dcfeff81c71825b616618056f3bac42612d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: FallbackJni: TooManyMethods \u2014 44 methods. The bar is 30 methods; this is 14 over it, 1.47\u00D7 the bar. Most of these members implement dvm.Jni (42 of 43 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/FallbackJni.java"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"55ea152d3e888ff605980d6e0305bcd339540ad7d591a969d47ef89337fa88e1"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DarwinSyscallHandler: TooManyMethods \u2014 44 methods. The bar is 30 methods; this is 14 over it, 1.47\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"a40d7103844bf96894693072047c68f3755f1423d923e60aacc4dce4cf38366b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: UnixSyscallHandler: TooManyMethods \u2014 42 methods. The bar is 30 methods; this is 12 over it, 1.40\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"51eaaff05ca1b653980896fcc55b9ac95390c3fbde69bc339e699934f8ed41c1"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: GnuEhFrameHeader: ClassTooLong \u2014 548 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 148 over it, 1.37\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/net/fornwall/jelf/GnuEhFrameHeader.java"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d839062c3f223ef6e257ba7f68bc0843f5d38e8dac1f5445b03ad5ef959ddef"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AndroidSyscallHandler: ClassTooLong \u2014 538 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 138 over it, 1.35\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0748235a0bf311d6a11320f56489f976015c97f21f9a22b57ec525839d5afbb"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BaseVM: TooManyMethods \u2014 40 methods. The bar is 30 methods; this is 10 over it, 1.33\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/BaseVM.java"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"53931b6e111a18802c26e80f1cfcdfcb7ac82ba5f0399f29e38b34b450a73136"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AbstractLoader: TooManyMethods \u2014 40 methods. The bar is 30 methods; this is 10 over it, 1.33\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/spi/AbstractLoader.java"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5d43126092c0fc82589ddd9a133a1a71c07ae13ae236ad77f7a3c996990a8de"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MachOModule: TooManyMethods \u2014 40 methods. The bar is 30 methods; this is 10 over it, 1.33\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"7790cf7ee352c1d4e134431773705e2693f1e70299326217b5bb0a4e04673d79"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AndroidSyscallHandler: TooManyMethods \u2014 39 methods. The bar is 30 methods; this is 9 over it, 1.30\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fa101da0116cceed870e45bbbd708c5989c1b6c34bcdd0887a2536a7e9c0657"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: McpTools.getToolSchemas: MethodTooLong \u2014 getToolSchemas runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\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":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f7d621d781f88c279dde38b6e3d950746bc27a7f2c3eef7b988559e47a0324e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: linux/AndroidElfLoader.java: FileTooLong \u2014 644 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: AndroidElfLoader (58-900). The bar is 500 significant lines; this is 144 over it, 1.29\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8517deb92e3ec58fe2dedb10e8dccb058bfa9ff706f1966f2a9091eba68828f7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: hypervisor/HypervisorBackend64.java: FileTooLong \u2014 642 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: HypervisorBackend64 (32-946). The bar is 500 significant lines; this is 142 over it, 1.28\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c305e68ea9795cf1869f2ee2be9ebc5d8ddf23ba2f27e40b0d7d91440c294cd7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: jni/ProxyJni.java: FileTooLong \u2014 641 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ProxyJni (22-849). The bar is 500 significant lines; this is 141 over it, 1.28\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb0f4b130e2c141426aef5915fe96bb3b2e60a1521b09957f0497b66e70cb06b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ios/DarwinSyscallHandler.java: FileTooLong \u2014 638 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: DarwinSyscallHandler (49-877). The bar is 500 significant lines; this is 138 over it, 1.28\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"71f6631945c98778a6057a62eb2f14565c5e53be21d0ce639d0265df4404baa7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Unicorn2Backend: TooManyMethods \u2014 37 methods. The bar is 30 methods; this is 7 over it, 1.23\u00D7 the bar. Most of these members implement backend.Backend (30 of 32 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"78e200487bef437284d2b44441ea657dc12e667d1e4502cf56b7bc1c678e48f0"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: JniFunction: ClassTooLong \u2014 491 significant lines (blank, comment-only and punctuation-only lines excluded), 110 methods. The bar is 400 significant lines; this is 91 over it, 1.23\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/JniFunction.java"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e7a6f0b1e95238918f6bab610abb740c95b23832d55c04c0ad748fb8a805c31"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: HypervisorBackend64: TooManyMethods \u2014 36 methods. The bar is 30 methods; this is 6 over it, 1.20\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c3c51a62840b2c19fa0fd18b2ba8bff2aa970f952dedb22e01e3deebc7b53d0"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ByteArrayBackend: TooManyMethods \u2014 36 methods. The bar is 30 methods; this is 6 over it, 1.20\u00D7 the bar. Most of these members implement backend.Backend (30 of 31 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/pointer/ByteArrayBackend.java"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9482dcefcfe75754fcaa8931aaf6fd520adc500fad78f69bb39865bcb691232"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: linux/AndroidSyscallHandler.java: FileTooLong \u2014 590 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: AndroidSyscallHandler (56-789). The bar is 500 significant lines; this is 90 over it, 1.18\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7d3202b2d0b17fa3e19a422e2277d78455411c1aecbf8d0be5e8fcf3c361903"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Dyld32: ClassTooLong \u2014 460 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 60 over it, 1.15\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"e55abe9eeb62c27bd917d31cd2b8af9b9eb2994d85f36cb57dc8f7a7c30a283b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AndroidServer: TooManyMethods \u2014 34 methods. The bar is 30 methods; this is 4 over it, 1.13\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dcb80a5dde55ee1d06b506a13e0dd580a946798c2a653af696919133d4c12c9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: jelf/GnuEhFrameHeader.java: FileTooLong \u2014 560 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: GnuEhFrameHeader (16-806). The bar is 500 significant lines; this is 60 over it, 1.12\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":"unidbg-android/src/main/java/net/fornwall/jelf/GnuEhFrameHeader.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1652a0d1e1ea8493a0dabe57eeeb71f3ea59406c117fc1a05c391902c55bcdf7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: UnicornBackend: TooManyMethods \u2014 33 methods. The bar is 30 methods; this is 3 over it, 1.10\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"6362d0c82fbb2b02bc62e8f2359de4203c8bc8f471eb3125c865d2d614cd54d2"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MachoFlags: TooManyMethods \u2014 33 methods. The bar is 30 methods; this is 3 over it, 1.10\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":1482}}}],"partialFingerprints":{"codehealthFindingId/v1":"aea392d3dadc1f2b8db1b2bf6302dbb5fbe286ed1a446612e0d4697ae5a07f5b"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AndroidServer: ClassTooLong \u2014 434 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 34 over it, 1.09\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b2ecc164392c15e0c395cfd3010a5afdb58409ac864801b24e969898320f77c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BaseDarwinFileIO.getattrlist: MethodTooLong \u2014 getattrlist runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\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":"unidbg-ios/src/main/java/com/github/unidbg/file/ios/BaseDarwinFileIO.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfb23245f36e7a2ef8a4d51ae62f0f896724ee91bec528acc733e4ddc8e26fa6"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DvmField: TooManyMethods \u2014 32 methods. The bar is 30 methods; this is 2 over it, 1.07\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcb0646a928124660c620c50262ca7bddbd3d1fd8a02991815d1513a5fcba707"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: UnixSyscallHandler: ClassTooLong \u2014 413 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 13 over it, 1.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"a54c6b21852c8323ac3ce36923668cb2cf5a8ffbc2d15c6d005763ea9eb97e17"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Section64.data: MethodTooLong \u2014 data runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":2367}}}],"partialFingerprints":{"codehealthFindingId/v1":"805629ea5784c70f3dee740a3e17797df4d1117f23bdb35664f8f0525f6dc4b8"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SymbolResolver: ClassTooLong \u2014 405 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 5 over it, 1.01\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5ef243052f06597ce1bcf6b062bef0b53d6324fceaa3221acb2213cd4b43046"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 6 shared lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1552-1573 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1453-1472 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1477-1496 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1515-1534 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1539-1558 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1563-1586 \u2014 These 6 members are variants of one another: a block of 6 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1552}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a804fbb3cc2eefa512389d7572804c8bee767940956edb99deafcbe997e38fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 11 shared lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1828-1848 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1902-1922 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2039-2059 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2113-2133 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2271-2291 \u2014 These 5 members are variants of one another: a block of 11 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":1828}}}],"partialFingerprints":{"codehealthFindingId/v1":"4453f3692cccc07cac4b349553ddc8f27588a604c2b6e0707495a0f23b19f391"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 15 shared lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3423-3447 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3452-3471 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3522-3546 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3551-3570 \u2014 These 4 members are variants of one another: a block of 15 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3423}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdc2bb8a08fa7e62962f2dccfc1f1e7df8a4d1a21f083ac39943400d4a594bb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 10 shared lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:677-698 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:717-738 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:757-778 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1991-2011 \u2014 These 4 members are variants of one another: a block of 10 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":677}}}],"partialFingerprints":{"codehealthFindingId/v1":"c71a73315d73a841a972e0abd56412777c2aaae05d42aeee78f2c57adf24462f"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 8 shared lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1552-1573 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1625-1645 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1650-1671 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1676-1700 \u2014 These 4 members are variants of one another: a block of 8 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1552}}}],"partialFingerprints":{"codehealthFindingId/v1":"a185117510a7012037fc720a73416954e6744723e7236a7fa71590124db3d6b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 8 shared lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1598-1619 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1671-1691 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1696-1716 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1721-1745 \u2014 These 4 members are variants of one another: a block of 8 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":1598}}}],"partialFingerprints":{"codehealthFindingId/v1":"e34da7e1a0b4e2c936c9fc987a4b23d868a71c437b84fdb372b5cc3dfa6dd1d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 6 shared lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1423-1442 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1468-1487 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1517-1540 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1598-1619 \u2014 These 4 members are variants of one another: a block of 6 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1423}}}],"partialFingerprints":{"codehealthFindingId/v1":"66fd84f00f209339edef8202a169ed836298d725fc51fd922a65daece1c0ee21"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (996 shared lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:41-3893 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:36-4014 \u2014 These two members are variants of one another: 996 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd49b9f797d357c3fad7c10496b3ac05e217d1951429166ebf97ba3659d5b030"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (654 shared lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1796-2636 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2714-3786 \u2014 These two members are variants of one another: 654 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1796}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb37595aaa6ec925f04e165f533354d17bd7147ee0b2428644d1097126c55913"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (101 shared lines): unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:63-275 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:277-703 \u2014 These two members are variants of one another: 101 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d4a58e85c243ba6f16054af27d811c89a0ad807cbef9ac9368e1e224b418471"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (47 shared lines): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:530-606 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:654-732 \u2014 These two members are variants of one another: 47 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e7914033807520700594a13ec247e8c503ccc9107c03d31e29194b4c129b445"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (44 shared lines): unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java:41-90 | unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARMDebugger.java:41-91 \u2014 These two members are variants of one another: 44 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"afd9721a0f088653e2f06511dc7d3b96fbd2a3f8138439446986f718ec5196c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (38 shared lines): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1620-1717 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:508-599 \u2014 These two members are variants of one another: 38 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1620}}}],"partialFingerprints":{"codehealthFindingId/v1":"52fd5ef67dfb59cd0a1736c3fcba9566c57d3d312d51d26abc72b2fda252d1a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (37 shared lines): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:762-865 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2272-2398 \u2014 These two members are variants of one another: 37 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a568e1f905dffdf56976e547dccf2859cf59e80cd105dbc65a924f4fa0c0a23"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2096-2121 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1588-1613 \u2014 These two members are one piece of code written twice and then edited apart: 26 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":2096}}}],"partialFingerprints":{"codehealthFindingId/v1":"69d72a8fd04c22bb581d02bd805e96b929b4dc897032a532388055323312ff2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1222-1248 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:740-768 \u2014 These two members are one piece of code written twice and then edited apart: 24 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1222}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab3ff7251efe134f73efc166af30c144f5c0bd36c95f6a3738a4f7de4aad9bcc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1010-1034 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:669-689 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1010}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f32790bd015192ecc3b5162c0a4d82cca05791f7aa84f720f55475827c5ad57"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java:72-101 | unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadClonePatcher32.java:61-91 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaec3b4f44913e053efcd1b327e8dabba3f971b8e92b7eb99edffc55157778ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/patch/LibDispatchPatcher.java:26-64 | unidbg-ios/src/main/java/com/github/unidbg/ios/patch/NewObjcPatcher.java:21-40 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/patch/LibDispatchPatcher.java"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"b49293d44e73b021e46a6c296bc9c781b5667e0d2eacda046e777fa68a53953c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:212-233 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:238-259 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b383034a5ef2fa076afe258ea5b88e19520821c7ef342edd4fc65fc29387550"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (15 members, 50\u002B identical tokens): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:231-245 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:248-262 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:265-279 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:282-296 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:299-313 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:316-330 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:333-347 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:350-364 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:367-381 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:384-398 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:401-416 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:419-433 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:436-450 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:453-467 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:470-484 \u2014 These 15 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 15 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 15 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b476d4439262308965167b73baba3c6228657763eddc23eed704a29b0921bc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (12 members, 50\u002B identical tokens): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:507-522 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:525-539 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:542-556 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:559-572 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:575-588 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:591-604 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:607-621 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:624-638 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:641-655 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:658-672 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:675-689 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:692-706 \u2014 These 12 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 12 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 12 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5201ece6aa88712d2300aa83165801b9004e28b2c070d7187b1810efe336be9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:970-988 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1364-1382 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1487-1503 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:928-945 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:947-964 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":970}}}],"partialFingerprints":{"codehealthFindingId/v1":"076ac957a1e9973d5bc3ee392d617509be386670e5b87b01eca7e39a6de6b6dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:209-218 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:711-731 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:556-565 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:905-914 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:964-976 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"139e64501bd6dece6ebdb4bdff63e5986d727b61f29728984db86a612ab274b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:611-637 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:639-665 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2375-2405 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2407-2435 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2437-2469 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":611}}}],"partialFingerprints":{"codehealthFindingId/v1":"8744d7b6fcdd6dd40d67f0bc03d87a227b21d87c60b23a90d34dc94e451f8b92"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend32.java:36-67 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend32.java:70-106 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend32.java:87-120 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend32.java:123-165 \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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend32.java"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a55dd1bfb771e80b102561f6cddd4c03b29c5004adac9f7a5ac11e361ebdb4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java:36-85 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java:88-146 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:187-270 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:273-367 \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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"141f3a59f542cb6956fa9813aa8e880328118f276781ca6753f1bb0604d317fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:70-541 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:69-418 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:133-554 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:146-657 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f4503ef61f50f6cc611ee8e149e76f381f73bcba25975875237269cf1d7bf63"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:798-875 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:877-950 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:485-558 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:584-657 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d3b9e0044437061a37af5f7908e41ee03ab3a722f48188eed54d96ec028f050"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1117-1157 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1159-1200 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:801-842 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:659-708 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1117}}}],"partialFingerprints":{"codehealthFindingId/v1":"29891a04db36addfe9fb1b3cc8bc3096303d6da050279d03bd845bc2c3f3a068"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1523-1582 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1017-1075 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2900-2942 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:4069-4111 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1523}}}],"partialFingerprints":{"codehealthFindingId/v1":"73da9d36fcc9606c60226d8d516912218bc045831e4f8e5f625d8ecc1cba0c51"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1764-1791 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1284-1312 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2686-2714 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3889-3917 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1764}}}],"partialFingerprints":{"codehealthFindingId/v1":"c06120dcdf52b236c72c6a82f4a4d5d838b6d3c0ed15addf0b01abb2246baebb"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1889-1923 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1373-1388 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1429-1470 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:503-514 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1889}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc3d60088b21ca7e86a48e7ea8c28dc1cc499f097864e7a00a8e2473de4728cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2025-2044 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1552-1571 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:684-703 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3846-3865 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":2025}}}],"partialFingerprints":{"codehealthFindingId/v1":"46616f92b85d3a8c31d7045ba9c3ac539ee7a63e2cb3d2cbbe5c4135216365e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/AttachExecutableEvent.java:14-32 | unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/DetachEvent.java:12-21 | unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/LoadExecutableEvent.java:14-32 | unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/LoadModuleEvent.java:19-32 \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":"unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/AttachExecutableEvent.java"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"42b41fc831dc37fd908d0ce563e9f6edd1f10e17418e555bd8403a61209bd965"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1700-1737 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1739-1783 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2591-2624 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2626-2672 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1700}}}],"partialFingerprints":{"codehealthFindingId/v1":"133f2fd6097d2f87d7d4e4587a25cb5ee0676bce5b816d62c34a5110ebd3c5f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (398 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:40-437 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:37-545 \u2014 These two members are one piece of code written twice and then edited apart: 398 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"b330f1ec51b6368cffa30cac75ae13e79b8d0e21b3b5b533fcf3ccf1a64fd0c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (240 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:52-291 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:50-348 \u2014 These two members are one piece of code written twice and then edited apart: 240 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d9d013ce38ed2b1cd7a8498c1d4d0d02de061e59e4a65123f9bc1f323734fb4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (49 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/RegAccessPrinter.java:25-87 | unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:1028-1076 \u2014 These two members are one piece of code written twice and then edited apart: 49 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":"unidbg-api/src/main/java/com/github/unidbg/RegAccessPrinter.java"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"b739bd54ba90681c98da21c09e307da478915d9aa8fb7788d7e186d24a058ce0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (66 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:93-158 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:150-215 \u2014 These two members are one piece of code written twice and then edited apart: 66 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"83fe488f79f1fee475b82d805344a37adf55734a7fa90be986f184ac648ea17f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (45 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidResolver.java:124-168 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinResolver.java:154-198 \u2014 These two members are one piece of code written twice and then edited apart: 45 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidResolver.java"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"e879673125f5cbce473953465e7a94b12acc84edf6be312452d773412296ee36"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (45 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java:41-85 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:921-969 \u2014 These two members are one piece of code written twice and then edited apart: 45 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":"unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"54d43eece477d571d37d70166d999a14e9651cc8bff508e7dc73b0e3f1220503"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (55 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java:214-268 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:317-373 \u2014 These two members are one piece of code written twice and then edited apart: 55 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":"unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fb9aedd06434b5df56af7b69cf1f0d6a0fd51d9b45573c1ee15562636aa5996"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:953-987 | unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:989-1023 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":953}}}],"partialFingerprints":{"codehealthFindingId/v1":"eed4f253d8c5eaaea3716c08ed7dd85668dbc4b3dc8cf57f1461e295e3c12395"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (41 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:187-227 | unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:229-269 \u2014 These two members are one piece of code written twice and then edited apart: 41 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":"unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec9728a43dd32d448bc852546667355032ec757a5da88c6353be8eb4076503b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (51 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:143-193 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:168-218 \u2014 These two members are one piece of code written twice and then edited apart: 51 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddc7bb9755940817ccb8ca9e93aad258ec0cf31defb5e99d166c5b111eeb8da1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (43 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/InlineHook.java:30-77 | unidbg-api/src/main/java/com/github/unidbg/arm/InlineHook.java:82-124 \u2014 These two members are one piece of code written twice and then edited apart: 43 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":"unidbg-api/src/main/java/com/github/unidbg/arm/InlineHook.java"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ea6736cf0317aa26cf896bd143e6646d8dcbcc4044f97c99b12a7e054606aad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (54 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1849-1908 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:1077-1130 \u2014 These two members are one piece of code written twice and then edited apart: 54 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1849}}}],"partialFingerprints":{"codehealthFindingId/v1":"92895937cfe878d30b55b5f3a7c8af8991fa5bab294d70f17bdf34fc3ad0cf55"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (46 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:293-338 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:350-395 \u2014 These two members are one piece of code written twice and then edited apart: 46 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ea19dc2a3e666f708c941ffc8cf4f65556c13c288afb1bd7f54379748aba6d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (61 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java:142-208 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java:95-155 \u2014 These two members are one piece of code written twice and then edited apart: 61 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"90de2930cdbe0bd5c8a2aefab5fa9b6df3cefc85fa36e3d2a7e523342dcef71a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (60 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:466-525 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:580-652 \u2014 These two members are one piece of code written twice and then edited apart: 60 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"830d0321a9f70c64a46f077506a4aa1e17334dd2400444a0229d3d43ebd05f12"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2495-2524 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2526-2552 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":2495}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f79b2219e36b2d0488ec171cc09d06ef0e6fdd0d805e790691852497a2512d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (44 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java:164-218 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java:272-315 \u2014 These two members are one piece of code written twice and then edited apart: 44 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8800b1dd47b2dfc6607e6f9a2a2a23a80aeeb0232afbf4143055754553719cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1300-1334 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1336-1382 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1300}}}],"partialFingerprints":{"codehealthFindingId/v1":"f435802ac62992f2252f22e92a5df4476a35c803ce01690b1c9fe618c8a7ea9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (59 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java:56-114 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmMethod.java:261-322 \u2014 These two members are one piece of code written twice and then edited apart: 59 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"4658ef9034d3564848244cb3d2f0e23689d40acda72f8de89bcdcce8dc14671c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:656-687 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1139-1170 \u2014 These two members are one piece of code written twice and then edited apart: 32 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":656}}}],"partialFingerprints":{"codehealthFindingId/v1":"297d44c6a02572f48eb666a076a2683abb148759d053c905fe8e9ac1d449a6e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (41 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:242-282 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:257-297 \u2014 These two members are one piece of code written twice and then edited apart: 41 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7b2e83a5cc1bf71a24153e812b1189bec99c6f55c548bfaa3412d6bb3412c32"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/TaskDyldInfo.java:69-102 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/TaskDyldInfo.java:104-137 \u2014 These two members are one piece of code written twice and then edited apart: 34 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/TaskDyldInfo.java"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"6306bfae8b3701b193ab864d476111c223bde3b6290fc3392fbb5f195a28846e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1719-1757 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:1038-1075 \u2014 These two members are one piece of code written twice and then edited apart: 38 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1719}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb0b7fc9b98fdd277838879c136596dff4fdffa9b2a37a210c1ae3e6c9c79fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java:37-69 | unidbg-ios/src/main/java/com/github/unidbg/ios/thread/BsdThreadCreatePatcher64.java:41-80 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fac2d86340808b429bf89898e49651ebaefa9b146971f9e6145bdd5c789d201"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/signal/SignalTask.java:55-82 | unidbg-ios/src/main/java/com/github/unidbg/ios/signal/SignalTask.java:46-69 \u2014 These two members are one piece of code written twice and then edited apart: 24 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":"unidbg-android/src/main/java/com/github/unidbg/linux/signal/SignalTask.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec0902c3b0ed4b27a66d8aad110d19ebe19e1912db234fdc203910ef750ba7f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java:58-91 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMEmulator.java:58-92 \u2014 These two members are one piece of code written twice and then edited apart: 34 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":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a2c2390dac19052ead429f87b5000354f81376524a8e552ac86185d1a23d192"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/JniGraphics.java:31-67 | unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/MediaNdkModule.java:30-80 \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":"unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/JniGraphics.java"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"237c0d905015223502561aee05b582b2ffe5688422b737c210682b586c001d5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARM64Emulator.java:38-76 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARMEmulator.java:35-67 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARM64Emulator.java"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"159978fa30bb050938b049720769648c1dddd934bcf161415fdafbb651434388"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:225-264 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:669-713 \u2014 These two members are one piece of code written twice and then edited apart: 40 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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"70cf5abf210e10a81f9460d2e40a774da21e055559a29b4ea1f4a505f54d9765"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall32.java:87-112 | unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall64.java:45-70 \u2014 These two members are one piece of code written twice and then edited apart: 26 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":"unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall32.java"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"af4c60ede396da841675e38f31e866e450d2988f80b27a5cdae2f22031c93a78"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1202-1227 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1713-1738 \u2014 These two members are one piece of code written twice and then edited apart: 26 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1202}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ba21effb752c772b781c106d88a557153661a11d99af0230185f4f815202cda"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:732-753 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:755-776 \u2014 These two members are one piece of code written twice and then edited apart: 22 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":732}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d5e0549dbdf242b528da27bc38c0b2b0666d59bcb5f74ae61d64de9ec00a819"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:374-402 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:582-610 \u2014 These two members are one piece of code written twice and then edited apart: 29 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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8e18ba02008fc7d4f04a7a1390ba672624abb667341103dabf082af7bb1d52a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): unidbg-ios/src/main/java/io/kaitai/MachO.java:1976-1990 | unidbg-ios/src/main/java/io/kaitai/MachO.java:3608-3622 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":1976}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cb6d156bc089d44b0e9779ebb1760bba1b70c8bdd664d6c0e039b10387a568c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java:116-149 | unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java:413-446 \u2014 These two members are one piece of code written twice and then edited apart: 34 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":"unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cc8a2506c556a21cfd58d3a0907fa8c0104fac7561400de0039225597e80851"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): unidbg-ios/src/main/java/io/kaitai/MachO.java:2010-2023 | unidbg-ios/src/main/java/io/kaitai/MachO.java:3642-3654 \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":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":2010}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c9b5d2ed9b192f4a7a8342b91b1a9ec40302afd0af4586c842a4e89090e0132"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 22\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadJoin19.java:18-41 | unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadJoin23.java:18-42 | unidbg-ios/src/main/java/com/github/unidbg/ios/thread/ThreadJoin64.java:18-39 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 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":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadJoin19.java"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"b99839ebc89963f50982ef28c4fbf8b50fc65a82fc71085d32c5c2dbe4b95c9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java:192-217 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMEmulator.java:197-222 \u2014 These two members are one piece of code written twice and then edited apart: 26 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":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a821470c11fcbf066526680e373a437b544efcc8879bd681be3af39d9896e1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 21\u002B corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:906-926 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2471-2493 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:236-262 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":906}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc661d3a0cf17626477517ff00127f199065cb8835e31cc0f357d3fb6b3bb327"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/arm64/SimpleMemorySizeDetector.java:29-80 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/arm64/SimpleMemorySizeDetector.java:83-134 \u2014 These two members are one piece of code written twice and then edited apart: 52 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":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/arm64/SimpleMemorySizeDetector.java"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"7699cde9ae872cd3d42557a2ce05fcc856fb01925b33c76c1d07702eb440b5f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/Dobby.java:162-184 | unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/HookZz.java:182-203 \u2014 These two members are one piece of code written twice and then edited apart: 22 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":"unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/Dobby.java"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5910c004bbfa66e2c94a0e1d4eff9181f58220653a7a7342a05ea4ad2a3f3a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/file/DirectoryFileIO.java:84-108 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/DirectoryFileIO.java:118-142 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/DirectoryFileIO.java"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e9c8ff3bb83e7e94ebefc52b7ae503c6a3f7bbf3f3399d10f323bfe42356f76"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:114-137 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:140-166 \u2014 These two members are one piece of code written twice and then edited apart: 24 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e6f1bb62f0450ce193be4f5d001ae99e90328115b206df136ce17f96bde053d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): unidbg-android/src/main/java/net/fornwall/jelf/DwarfCursor32.java:13-29 | unidbg-android/src/main/java/net/fornwall/jelf/DwarfCursor64.java:13-29 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/net/fornwall/jelf/DwarfCursor32.java"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0714f01e281666eff3ccbfe0025d2136cf60b18f60209c6ad0b6ab5f38d89a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:554-576 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:339-361 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"b59ff1deaa72bfc5472a97f7d99edf8d793c3541f6cfee97ed068d4f2009b899"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 23\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:232-255 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:296-319 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:381-403 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:474-497 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"f742dc243b1409d50e97633a12abee6bf4b579f156c566cb949c98e931e8e960"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:279-303 | unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:564-589 \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":"unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"b02228e1868d1e78a0499bb6a77d4b1324175fb993c786ff32929f67f5100cfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1593-1620 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1077-1105 \u2014 These two members are one piece of code written twice and then edited apart: 28 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1593}}}],"partialFingerprints":{"codehealthFindingId/v1":"24971c048773d2307321506f95f4a3c4f34fe80f8fbb1bec964f334456b6dea7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidARM64Unwinder.java:28-47 | unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidARMUnwinder.java:29-53 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidARM64Unwinder.java"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb7597b01d212600662fb7e53268abba9ab1ade9be9e6a6d477e5141eb27ef1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java:56-77 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/UdpSocket.java:49-70 \u2014 These two members are one piece of code written twice and then edited apart: 22 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"8107128ea0bd32178cda51aae2773f47515cf4f751b1918e6b456b2faa832aa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java:80-101 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/UdpSocket.java:73-94 \u2014 These two members are one piece of code written twice and then edited apart: 22 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"79961732484881fbd52e241841a60e89707892cd4ddd3a2757167254f3592a27"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:883-904 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:209-234 \u2014 These two members are one piece of code written twice and then edited apart: 22 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":883}}}],"partialFingerprints":{"codehealthFindingId/v1":"aae26a3b618a2a71caf4e9b84c2c93acd3e9263959069a477c9e8412f8fdf4f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1540-1561 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1563-1584 \u2014 These two members are one piece of code written twice and then edited apart: 22 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1540}}}],"partialFingerprints":{"codehealthFindingId/v1":"417b57f715626d0addb2790853fe8e50900232dd4edb9b17cc9182523e09017a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 21\u002B corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1392-1412 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1414-1435 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:264-288 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:317-337 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:363-384 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 21 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1392}}}],"partialFingerprints":{"codehealthFindingId/v1":"7743ad2b9adfcd732a1de19a861150bfeea24e1d8f312c91f952bca40c9710b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/pointer/ByteArrayBackend.java:58-79 | unidbg-api/src/main/java/com/github/unidbg/pointer/ByteArrayBackend.java:82-99 \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":"unidbg-api/src/main/java/com/github/unidbg/pointer/ByteArrayBackend.java"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"da9f8a55f6426aead4b07644acc1eb431ebb48c6499434b3d689c641893b969d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:675-694 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:612-625 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fff542c181e668791d0257c8b76bcdd234de018b06f9f50d657513602b70f62"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ExternalSymbol.java:20-42 | unidbg-ios/src/main/java/com/github/unidbg/ios/IndirectSymbol.java:20-48 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ExternalSymbol.java"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"16e0693265afaa0c531462be72bb4998478799164a4b77ed621496ddf1272b4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 13\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1802-1814 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1322-1335 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2962-2975 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:4131-4144 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1802}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7931ea36526012fc491dc74003d8b2da01269b8a9d8b444d615307eff091cda"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/SystemProperties.java:34-47 | unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/SystemProperties.java:50-63 \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":"unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/SystemProperties.java"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e6b331ff7530a4b39404643eb5fbed500e3da0c0e5067f8f32c3d6ef4e32c0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:967-987 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1301-1319 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":967}}}],"partialFingerprints":{"codehealthFindingId/v1":"54757b585ac89527ea118e6c82fece4d9ad80bbbcb9518ac3d90b0bf36cb07f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java:510-526 | unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java:528-540 \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":"unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0147e2380a29d86f6e597bd464d9dffd66da9935d290f455ffeb6f84ef258b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:101-121 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:74-94 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfab0217db268831a32dcbd95c914fe8385d1d2cf1ccabe35bdc30b2b76680c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall32.java:37-54 | unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall64.java:26-42 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall32.java"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e4afca74d749920e9acc5c6192f1825d6da8139d1ae5411bca1967458df5684"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:721-740 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1169-1184 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":721}}}],"partialFingerprints":{"codehealthFindingId/v1":"0856ad45f20ea5850e11970ff4a05a6d89dd25e4bf71a9c685912134177828fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLibraryFile.java:55-77 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaLibraryFile.java:56-78 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLibraryFile.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"487dcf04b75aa4735be1176da85c08d97d587cc5b8d8c05c7261b1b1d04e1206"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java:138-156 | unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARMDebugger.java:140-159 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd9480b9ca7557729c76154a5c4c1c06abb02c3886ba768f1370f2b6b6254f58"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 20\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1731-1755 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1239-1264 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:357-376 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1731}}}],"partialFingerprints":{"codehealthFindingId/v1":"70b16a437902bfff2a761adf0e40addfdc5d2d8514c4c9836c4f4ca6e09dc7df"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1020-1038 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1343-1362 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1020}}}],"partialFingerprints":{"codehealthFindingId/v1":"54386f62a644b85c064a08c0b15844f2c01aea7ba77e37b9964ef7f042fbfaa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:186-203 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:161-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":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"2117f5ea98ec34c9c95f86c4ad9416092bd10e15b3b81e34c0c2d44a55381f84"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java:54-73 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaLoader.java:64-84 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef36ad3ffd81a55daa83247056bc3841141fe14d0c6bd1ec5887fe003907cf6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java:94-110 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaLoader.java:118-130 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaLoader.java:132-148 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad165dc0f9cf70df1c73ffce91f2c85039777a8ee636da8d250f3f040f17d8b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java:100-120 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java:282-299 \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":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a030e411d22e8cab34c6a3f07e0f24394f692c61a2aeaf27e063f043950f4e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2944-2960 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:4113-4129 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2944}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b46f49aeff14b65e2ef8233c1b65cf218592206b0667a9550b9625ef08c3cd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 27\u002B corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:134-165 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:222-255 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:369-395 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"6078f5e55e49b6389e2ea5b094fe98b42bded5a943dbbe7195a8fbd3016f23b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2787-2802 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1005-1020 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2787}}}],"partialFingerprints":{"codehealthFindingId/v1":"1818bc3d073f3fd67f111df70169af24e27929530dbf719a12594a8ffe6eb67f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1384-1393 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2816-2826 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1384}}}],"partialFingerprints":{"codehealthFindingId/v1":"c071c15f9b9d50a5b747d4664721376643d36a225aef4542e8ea6d6751e584c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:266-283 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:567-580 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"562292b1d82272bfc7e7f818e1a477f30805deec273f7cb9b29cf2380697e18f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java:233-248 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMEmulator.java:236-251 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"de36bf273922708a6ea44e93e22d6e7dd43b2d3b3b72d7e08efdcef888148f58"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARM64Emulator.java:116-129 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARMEmulator.java:102-115 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARM64Emulator.java"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"db5578ed38d5ef7e2c96ec8ac5e04fb8b8780b5cdc6f79b99d6f807832f665a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1957-1972 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1472-1487 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1957}}}],"partialFingerprints":{"codehealthFindingId/v1":"12d62274580dea77a192632cd93a7706fec651f6cfc1a92459e638330dfe7e34"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1467-1482 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:193-207 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1467}}}],"partialFingerprints":{"codehealthFindingId/v1":"04497efb6808b8ae192962ee0fb93912c0dc803fab39e23bd6316363502bc7f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2009-2023 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1536-1550 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":2009}}}],"partialFingerprints":{"codehealthFindingId/v1":"17eea8be0c1167e55f8fe0aaad6df2857d72f9d4df9e193257f5e7fa3dd8ffda"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:551-568 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:466-483 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":551}}}],"partialFingerprints":{"codehealthFindingId/v1":"586822712e1cd69099392495e7dd1ecfc8de7d8d31396b8f20f9727ed51ae058"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:696-709 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:475-488 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c60252bc826f107233b9a68c5da62ca9b83f4c38b4f678231920e579842d692"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): unidbg-android/src/main/java/net/fornwall/jelf/ElfDynamicStructure.java:347-358 | unidbg-android/src/main/java/net/fornwall/jelf/ElfDynamicStructure.java:363-374 \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":"unidbg-android/src/main/java/net/fornwall/jelf/ElfDynamicStructure.java"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cc2d99216657073257a0fce7f4cfded65e06d441962a76442470a9d105fb919"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1300-1314 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1783-1795 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1300}}}],"partialFingerprints":{"codehealthFindingId/v1":"7db270b38abe2b5fe5e0120cd0f866a30fec88bbb5ec26d0d9b0e059e52b3cbb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 15\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmClass.java:95-109 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmClass.java:129-143 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmClass.java:163-177 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmClass.java:197-211 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmClass.java"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7a619591c9753b9409e53a0dd0f697cf6a7fa27db200d1fb72fc5b1c41566f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:587-597 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:599-609 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"835082cbf244efafeaa7975ece33bce2f719baa74dfa74bd8ff2f2aff127aa5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:819-830 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:832-844 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":819}}}],"partialFingerprints":{"codehealthFindingId/v1":"52e601f2882b9cee0202888d67dd0eaf002c341579d84315fd1c99c43f021c57"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1586-1599 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1616-1632 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1586}}}],"partialFingerprints":{"codehealthFindingId/v1":"03c53424734a320239d1095f7125748c08591dcbe28f5e5304f5131bb6d26e2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:124-140 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:224-240 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:335-350 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1d23701654c8fe7c00fb440822278daa18778da2cd73e90bb9095c85229cad9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:803-817 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1797-1811 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc45e404fc54e660adb49936d29416665c8b08d1fd8bc6974f624979892d7e41"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:632-642 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:1382-1392 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"b841b75d8ce9c4cad2a4324ffa7fb5077fc948d7cc89a326b0881cfeba1d36f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:178-187 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:192-201 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"4196571d29aa35ddab29f0d5344e9e8c5f6401a096ed635e7bd49b37664c4e45"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java:112-121 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/BundleLoader.java:118-127 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaLoader.java:150-159 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f87a78e88c66b1748448b94b93723f79e0f396249a601f7cd97c7985f53d4d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:588-601 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2716-2729 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3919-3932 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ecc6d91127f8a41413c0f0742622f7c1080cf96a80dc711f990d2c4ccf89268"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:320-330 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:335-345 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"b91f5841d4c998360d9ec144647d964599d935b204bef10b7c7a5ea85d0dd027"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:240-250 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:215-225 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"c965b25e77060ce4e3cd110ae4a9bd6a0f7e9d810fc1bc7afee899c06b64844a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/unicorn/Unicorn.java:235-248 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/Backend.java:78-88 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/unicorn/Unicorn.java"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"12e838b14bdea276557c973f8280b6a3bd09d3ce87c863914bcad1a812cb8bc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:85-97 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:99-113 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e41614603db63b0625755420ef601c2ac8cdd196f713768c4733d14a3a21cee"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/unicorn/Unicorn.java:256-269 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/Backend.java:100-109 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/unicorn/Unicorn.java"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"71766e7e9a8cda9265b7fa1637c282bc9c9057151e529a481cffbb1fe8f8eb7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (8 members, 11\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:127-137 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:140-150 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:153-163 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:166-176 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:179-189 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:192-202 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:205-215 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:218-228 \u2014 These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 11 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 8 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaf5c5d3469e7b9a16ca12da92934295a2f7d031c952703e0e899deba326ce99"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:869-879 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3816-3826 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0b2765f08c2d2e0fbcb1a2fb6995c87554de263736199487705d76c9737f9dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1082-1096 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1515-1532 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1082}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3b94c7f9ff6ba0066b555bbb6025581020d15367b3fe14cef8a4413d9fe7615"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidARMEmulator.java:66-84 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:192-206 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidARMEmulator.java"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"f32a91b1cd5a8690e740ef9d1321a7e65381aa80b4eb5b853986da3f0d98399b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/signal/SignalTask.java:34-51 | unidbg-ios/src/main/java/com/github/unidbg/ios/signal/SignalTask.java:27-44 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/signal/SignalTask.java"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"e282e681cc8151d2bf367a99af98ea4d20657dfc367c488f7d0606c9112aabd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/thread/Function32.java:29-40 | unidbg-api/src/main/java/com/github/unidbg/thread/Function64.java:29-40 \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":"unidbg-api/src/main/java/com/github/unidbg/thread/Function32.java"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cdfdc3e4481b5b296cdabb099f45e43f1ec5ec82da775fed8f85bf8641d7121"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:36-46 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:49-60 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:63-74 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9c504833072701d57608dada5da2657e93f2666c699351b184df3eae0f9cc30"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:77-86 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:89-98 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"0341a78de816b2f969619cbcadeee7f7f02c2d4b41a91f8e2daedd5b24b2a7f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/file/RandomFileIO.java:17-29 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/RandomFileIO.java:17-29 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/RandomFileIO.java"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"e54871adee18d4378324608c1846e6ce8c9d59dc4045f2e3845054d565dd269c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 13\u002B corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:55-69 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:73-87 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:91-103 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:108-123 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d3571a2e07b9787dc5c3afe276307e3bd24eb050b8be7ced6aeaf995bbee719"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:101-111 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:114-124 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdc87ab32654031125b0fb2517b4e7a672fb95ac229da3de93ddd4c61a6aa046"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:778-790 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:989-1001 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cb8ad6f41558e275e432997b239d04cab18fcf39126cda629ce91f10cba3e6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/ArmSvc.java:34-44 | unidbg-api/src/main/java/com/github/unidbg/arm/ThumbSvc.java:34-44 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ArmSvc.java"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"7388325483485e1febc0d5db11c8d6cdd0985e8cc35966d56e7db8527dcd01f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/CDObjectiveC2Processor.java:25-38 | unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/CDObjectiveC2Processor.java:41-51 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/CDObjectiveC2Processor.java"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"05116c43a72c0e09543c1259c72d7e7dc3ccdd7ef1117e9927c3f8fffbad81a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1050-1063 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1944-1955 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"156f309b1c32b6518c933eccc87adc106740d9f8ddc8211be401306d2ee72bfa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java:252-260 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java:262-270 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1593213bf9059d45fb40af27f3d449a59d59a0a128ae2e14a63416a90ae6bff"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): unidbg-android/src/main/java/net/fornwall/jelf/GnuEhFrameHeader.java:115-128 | unidbg-api/src/main/java/com/github/unidbg/Utils.java:52-67 \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":"unidbg-android/src/main/java/net/fornwall/jelf/GnuEhFrameHeader.java"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"43e8a1992e0f19ae4b075a8a4353c300b0319679214ebcb1082dd6bba8b68dee"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-ios/src/main/java/io/kaitai/MachO.java:502-510 | unidbg-ios/src/main/java/io/kaitai/MachO.java:512-520 \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":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7b9f4e7907b18058dfabe19734ed0b42031d56e8a519c41c956cbcdb6ea5f43"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java:104-114 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMEmulator.java:123-133 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"2010509a01786f378be5a3b711dee8d65b497ba4adfe23ffba0ddccce2c33ee2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/BundleLoader.java:103-112 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaLoader.java:97-106 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/BundleLoader.java"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"38e0ec5cba6e1fde9cdfe9a51e7e73edfb7267a4cb5d6b446aa6ecc4839cdd5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java:123-133 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaLoader.java:161-170 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2ac9f8083299be4cfc17b7eaa831c4bf0cdc92e8bbb40beadb9a957dbd14b27"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 10\u002B corresponding lines): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:98-107 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:109-118 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:120-129 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:284-293 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:164-173 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a9f3fe5d46df95c669d1e51ac2aa777f218e5fdd7d415466c9a0407e433cb5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:295-305 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java:305-315 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:175-185 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"f20243bb0dfcfd5544c28fc1e8bf3f5ca485312bdef0e7ff2d5cce7f453cef1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:260-268 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:324-332 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"6713d4738dc1ea6eb4ab580ee974b1a56e785ed9dd7dded6d750404e430123fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:510-522 | unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:537-549 | unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:551-562 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 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":"unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2f52d7ea04999f57901ae6427ee612871c85bfc25c53d1593a256b49296b04f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:708-717 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:893-903 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1163-1173 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"be9c75bbac59909f90e1133e98d84e1af79f89916c3fcbdfcfc8d9bd4b5e1be5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java:37-51 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java:38-51 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"97ae86c9090f501d8663cf9884375bc5ef501df839aed9c9c7bb11cb7baf81a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java:162-176 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/HypervisorBackend.java:70-84 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"00aceed18baf42201f8131a8a61dca78fb44bcdf47f9d4e944bafbc7796fd718"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java:91-102 | unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java:122-132 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"c88c7150dbfe067583a901d841c5c3dfbbaf575b50c4836d32ea7f2e944cb044"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java:483-492 | unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java:494-505 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bbdf752d20f478d541e962059e859d778bc6b968f8498fbd22993443e5a0d8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:540-550 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:558-568 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"851f2268064000f3e03184f5b0bfa00a768e53e8ee98783ac51e18efd57aae1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): unidbg-ios/src/main/java/io/kaitai/MachO.java:1138-1149 | unidbg-ios/src/main/java/io/kaitai/MachO.java:2980-2991 \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":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":1138}}}],"partialFingerprints":{"codehealthFindingId/v1":"dadd7f1c737b96630bcc382c72570d9d62779dcbfdd32c80c59cae0beb261191"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 11\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:773-783 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:786-796 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:799-809 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:812-822 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:825-835 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:838-848 \u2014 These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 11 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 6 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb6a24bc78d80535e3cc9cb18a803d47a6c7e7642e34bf0f87862afff521978d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1128-1137 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1316-1326 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1813-1823 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":1128}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea4a70aff37c6993a93ba4d6ec82119966a1f86143f6493c25a5477802bea6a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 14\u002B corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/file/ios/BaseDarwinFileIO.java:311-324 | unidbg-ios/src/main/java/com/github/unidbg/file/ios/BaseDarwinFileIO.java:326-339 | unidbg-ios/src/main/java/com/github/unidbg/file/ios/BaseDarwinFileIO.java:341-355 | unidbg-ios/src/main/java/com/github/unidbg/file/ios/BaseDarwinFileIO.java:411-427 | unidbg-ios/src/main/java/com/github/unidbg/file/ios/BaseDarwinFileIO.java:429-445 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/file/ios/BaseDarwinFileIO.java"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"eca46bd1e4336e2246f849565b21ce2bf2136c5e2449f80210a5c5780f361a99"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/apk/ApkFile.java:25-36 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/apk/ApkFile.java:39-50 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/apk/ApkFile.java:97-110 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/apk/ApkFile.java"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"f204c67a62db1e7a2c7e9c556c41a6f739e6788b68aec73e1f60c30c2185630b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1106-1115 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:706-717 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1098-1106 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1106}}}],"partialFingerprints":{"codehealthFindingId/v1":"0198bdaf06b5e5502652a8ee6579ae047c93ff5b31c6a4d9094325627cae2b3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/hook/whale/Whale.java:85-92 | unidbg-ios/src/main/java/com/github/unidbg/ios/hook/Substrate.java:127-134 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/hook/whale/Whale.java"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dc478633038c6203994316b9ca1abf93c7b8a7ca3380823939d172c10777608"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1122-1134 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1136-1152 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1122}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ab18564b059fa501f88b8c6f21e7d261b70e8aaab854849517a0bf2648922a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:286-297 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:301-312 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a84d146f434aa5f0de53d02faf029b627a924bd1acf9498e82f013cd24c7a47"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:398-409 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:411-422 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"468cdc50f5b09686dfb8330c777a07c562bdbd4d5df228ce62148a772c8e5a9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/file/DirectoryFileIO.java:70-81 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/DirectoryFileIO.java:55-67 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/DirectoryFileIO.java"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"a988e375eb4c7551d6757bd223fa23bb61c964354699181a9f5090ce89c8bef3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:705-719 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:928-942 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5913b66a7b8bdb43557cbdb5fdab770cffdb00a87f3e85bd7935c0ecbccb95c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 15\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmClass.java:79-93 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmClass.java:113-127 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmClass.java:147-161 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmClass.java:181-195 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmClass.java"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"0453e0e80b1606049c266810d59e28fc4ef1a20ab9c8395d444fdfcb678a3c30"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 10\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:709-720 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:723-733 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:736-745 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:748-758 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:761-770 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"f420dcc1481032d621b277ec8fee2bb2bf29061bf4fd9cc05bce6150dec7ff71"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/InlineHook.java:52-65 | unidbg-api/src/main/java/com/github/unidbg/arm/InlineHook.java:103-112 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/InlineHook.java"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"7480e6da2c64b2eed4c7d9af4e0ffceaf2530a350b040473a3502060624f8890"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 8\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/XHookImpl.java:65-72 | unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/Dobby.java:113-123 | unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/Dobby.java:131-138 | unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/HookZz.java:101-111 | unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/HookZz.java:119-126 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/XHookImpl.java"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"c014760fa8a2321104473093cb71c29c58d4af3aaeccb33e95603b2ece0b949e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java:40-52 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmMethod.java:46-58 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"901cc9b171ef04204452d9837af30b5770e8916aa79599203432d6c6f4ab301a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:352-360 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:397-406 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"0430b5903f1d722a6eb0a0858a0f33c15d015634a5d5e74e2fa29878a2101a53"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:689-697 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:881-891 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1284-1293 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":689}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb6011ac670c9ff696379cd22af6a65cc5091f9b929885ad09d1257db0be6c28"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:84-92 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:96-104 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab47c00541024c6c7c6632346f565f203126d37528cb709059c68df93e5d9486"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 8\u002B corresponding lines): backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java:171-178 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java:180-187 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java:189-196 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java:296-303 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b9fe224b62a3244f220575cd72a2f074573e32068d3c19d811f5539ad9272e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (8 members, 9\u002B corresponding lines): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:175-183 | backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:206-214 | backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:217-225 | backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:266-274 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:150-158 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:181-189 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:192-200 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:240-248 \u2014 These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 9 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 8 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"c83e92f6bc48da58c80cbb59c3f55dd8a07573512d3a586aae62a4a7d0bcccc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java:65-71 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMEmulator.java:65-72 \u2014 These two members are one piece of code written twice and then edited apart: 7 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":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"f69eb04abacb170b1c32399378412761e6919f6c46228a778280411fd877ec73"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:926-934 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1112-1120 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":926}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd26e8b3e740518bfec82c2350b30bb0332d40f8d5a99048c6e7731ffa9c5b04"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:151-162 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:782-794 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"be4964836cafebcec1611e024a72324e53fffb778e00d0182899a52c2c452c14"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:916-924 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:845-855 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":916}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cf23b6cd3397fac156f3621a9855d4eca9a9947c68369145e0ee813811f96db"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/AndroidModule.java:101-110 | unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/JniGraphics.java:125-135 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/AndroidModule.java"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"f75f0fa46bc4478b8b9b34537d3bd7bfac9635fae3e6c3579e13e0e46b1e1835"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/AndroidModule.java:143-152 | unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/AndroidModule.java:154-163 | unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/AndroidModule.java:165-174 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/AndroidModule.java"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"05f5bd9248bdd89e9866b80dada583fe5acc4dcd3feee1a4559112b38f10e79f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:576-585 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1010-1018 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"243ef0b95f89cdf5f8765ade2c50ceb0cb92d6128a3bc74252d5c542db35c280"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-ios/src/main/java/io/kaitai/MachO.java:1354-1362 | unidbg-ios/src/main/java/io/kaitai/MachO.java:3285-3293 \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":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":1354}}}],"partialFingerprints":{"codehealthFindingId/v1":"00da9369f33530f683fbdc22760a08dac560d5c48b5b7251286c89ce5313e5a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): unidbg-ios/src/main/java/io/kaitai/MachO.java:3160-3171 | unidbg-ios/src/main/java/io/kaitai/MachO.java:3335-3346 \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":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":3160}}}],"partialFingerprints":{"codehealthFindingId/v1":"88dd00b9176eedc42e7936b810a9e3e8be56985ffe187dc306b43c5112d8934c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/DynarmicBackend.java:76-86 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/HypervisorBackend.java:214-224 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/KvmBackend.java:222-233 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/DynarmicBackend.java"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"38e060016780a9442f0c9976c83c1f77ac1aa147aa6efc961cdae07993c49b83"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 10\u002B corresponding lines): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:210-222 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:234-245 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java:198-207 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:217-228 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c8b09ff66df950cd72ba4fb40bf9966616b75a574d75c23639446168113cb53"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 9\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1086-1094 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1096-1104 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1126-1136 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1456-1465 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1086}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fd5999c1760865c13ca62c99de61aae328ee06ab3e6f11ebcd65cba66fa8ee6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 12\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/ByteArray.java:40-51 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/DoubleArray.java:39-50 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/FloatArray.java:39-50 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/IntArray.java:39-50 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/ShortArray.java:39-50 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/ByteArray.java"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8ce923c4fe7660e3e1dd5c08ead90a66efd5a6e88fba8788f0863eb70629b6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java:32-38 | unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARMDebugger.java:32-38 \u2014 These two members are one piece of code written twice and then edited apart: 7 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":"unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"70f6395e4977082d3994b3b2439deb20c2dd9fe3160d7965cb350e2e07f050ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1864-1872 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1390-1398 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1864}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe87229cf5ac7e9670dc757fa5bad9a0627268fe9cde750ea1f68630b4a31e81"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java:186-195 | unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java:472-481 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"911d659c9a85e1569654ee1e76a72a38e9a568d09338863c16211a3ee0673521"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 9\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:760-768 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1263-1271 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1282-1290 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1303-1311 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2750-2759 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ce62287e5717501eacce11237b81850b919d22c3866870adace5a8e491a88d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1757-1762 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2845-2851 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1757}}}],"partialFingerprints":{"codehealthFindingId/v1":"2de7b0d1384a2653ed284b8c78c3f39a08aae6c1427701b700ff23ec4ab6d28a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:175-184 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1279-1289 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ca72e8ddfc477985262f4afe6d0443f6ddf2addf8799909c4341897c328efd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/file/BaseFileSystem.java:158-167 | unidbg-api/src/main/java/com/github/unidbg/file/BaseFileSystem.java:176-187 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/file/BaseFileSystem.java"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"e97717b145c434b199e10b0d41486814ba44ed4bd68fbc0cf537e4e270ce880f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/service/Security.java:40-48 | unidbg-ios/src/main/java/com/github/unidbg/ios/service/Security.java:63-71 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/service/Security.java"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d579c0b75393d91d37b180856615b26a729395716afa66707ecab5f7973d079"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java:149-159 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/HypervisorBackend.java:57-67 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"3368dba75a2fcaaebe9f4c18da414605e4cf3adb7e495806c53127d5012436d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1410-1417 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:899-906 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1772-1781 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1410}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb295cc8f1725de7b22567be83dc1f8d3b8e298704eeb375ffb7b45ca3a5d6f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/XxHash32.java:107-112 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/apk/ApkSigningBlockParser.java:190-192 \u2014 These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/XxHash32.java"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"531a430d7c21e61d63c536d9df964881091fa55944d572d66cb2963ed9bfff71"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1192-1200 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1785-1793 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1192}}}],"partialFingerprints":{"codehealthFindingId/v1":"83e27ed18fd5f679c343c8b5080689b469b8e7345fa68151a3df088707b107b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/StatFS.java:42-51 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/StatFS.java:53-62 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/StatFS.java:64-73 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/StatFS.java"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"2de715d7f737637edbddf2bd97560ca5d2e2c4774ad7caa04c6d9d80b00ecb11"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/struct/objc/ObjcClass.java:43-49 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/objc/ObjcClass.java:51-57 \u2014 These two members are one piece of code written twice and then edited apart: 7 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/struct/objc/ObjcClass.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"841d36025d830802c9c721b52619902dcdd71fe36bf5a283a142e28759f1ceb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): unidbg-ios/src/main/java/io/kaitai/MachO.java:621-627 | unidbg-ios/src/main/java/io/kaitai/MachO.java:1268-1274 \u2014 These two members are one piece of code written twice and then edited apart: 7 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":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"c60603f895874432219a9e8facc6911566c918ed88ca71fa59de4e245a2f9a88"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): unidbg-ios/src/main/java/io/kaitai/MachO.java:1941-1947 | unidbg-ios/src/main/java/io/kaitai/MachO.java:2349-2358 \u2014 These two members are one piece of code written twice and then edited apart: 7 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":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":1941}}}],"partialFingerprints":{"codehealthFindingId/v1":"c053c31465fa23e7886d3cc242172b0ad03c4ab660d6152ca308fe0b65cc2740"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 6\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1395-1400 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2046-2052 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2054-2060 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1108-1114 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2828-2834 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1395}}}],"partialFingerprints":{"codehealthFindingId/v1":"490a7769b03fa10d947a633445051afc2c52db19e5e54d4d01bb6c3d985cb6d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): backend/kvm/src/main/java/com/github/unidbg/arm/backend/KvmBackend.java:197-206 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/HypervisorBackend.java:193-202 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/kvm/src/main/java/com/github/unidbg/arm/backend/KvmBackend.java"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"50bc8d1b1edd7444593f7c2ee012e9575dd89f9fb8d2da7031c5ed98b2fccdb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1690-1698 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2350-2358 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1690}}}],"partialFingerprints":{"codehealthFindingId/v1":"182c76823a519314fb12665de304c787d6de410718b85777fa7537acdf55af5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:742-749 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1444-1454 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":742}}}],"partialFingerprints":{"codehealthFindingId/v1":"50fe58eaf967952e65e08d7bc7f7bfeefc28095148adc0b995a6350ffeeece77"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:497-506 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:971-976 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"01f9792cfe66705c40e9cd4bca52c8111e08cab63de1722933662a06c358adf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/file/DriverFileIO.java:15-23 | unidbg-ios/src/main/java/com/github/unidbg/ios/simulator/CoreSimulatorResolver.java:25-37 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/file/DriverFileIO.java"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4fc30ad9abae8832e6d4f3973062b823570410583470812bb3efd2f935c16b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:762-771 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:699-706 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"03abf1939b6a6ea4159e5692f24116d674734ba1607f859767f9a504ce67a168"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:821-828 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:831-838 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":821}}}],"partialFingerprints":{"codehealthFindingId/v1":"db3f75d3ec7bf944b653162643dbdf5c27ee506cdb4934d4772c6ceaf3d9e6b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1038-1048 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1252-1261 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1038}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1b295a10d9eeb17ccb4245f45cb91b1341b69cbb52c62519315eef2bc775a9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:180-187 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:237-244 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3a40fbb89f91860ee65333fb639d0296e1674c3ff57d99ce0d80f1898de4645"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:90-102 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:82-91 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2a165cc68ee910d93e69d951a1e5f31642aa6f790ab8952ca3aa2ce314dddea"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-android/src/main/java/net/fornwall/jelf/ElfHashTable.java:42-53 | unidbg-android/src/main/java/net/fornwall/jelf/ElfGnuHashTable.java:115-123 \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":"unidbg-android/src/main/java/net/fornwall/jelf/ElfHashTable.java"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"43e0354c4602691023d188aa07da1b16c8af880e5070cef3f75a2bdeac42b254"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-android/src/main/java/net/fornwall/jelf/ElfSection.java:248-256 | unidbg-android/src/main/java/net/fornwall/jelf/ElfSection.java:259-267 \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":"unidbg-android/src/main/java/net/fornwall/jelf/ElfSection.java"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"250b1b8ca482422731f28a40dc5a86def39cef799c98e9ef1a8e9c9c798e92b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/hook/whale/Whale.java:110-114 | unidbg-ios/src/main/java/com/github/unidbg/ios/hook/Substrate.java:172-176 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/hook/whale/Whale.java"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"8264e6137a6040f0f9f21065d7387871e398c608381423562316aa43324cd90b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1960-1969 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:877-884 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1960}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2b663f95c910bbfb3c346d629da92da8cbfa4e49ef5a23cb99b697a19ce7c50"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1793-1800 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1314-1320 \u2014 These two members are one piece of code written twice and then edited apart: 7 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1793}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7df44f7eec3025f15fa557d397eaa3568c45a613ac6951f1b400e19f8ab240a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java:259-267 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java:244-253 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6e3d9d0af02f5cd53c775e14e743ea57d808d5d49fa7414004f94026ad5e937"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/unwind/SimpleARM64Unwinder.java:19-30 | unidbg-api/src/main/java/com/github/unidbg/unwind/SimpleARMUnwinder.java:20-30 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/unwind/SimpleARM64Unwinder.java"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9946278abbda39947a67ca5b61905426979dc83548aa5516aa16ba04e661c21"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1489-1496 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3942-3950 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":1489}}}],"partialFingerprints":{"codehealthFindingId/v1":"0608dc4baf8f96a2131098b2476d53a821ad37cbfc36c6911738cb291cd1a79c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1291-1299 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:951-958 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1291}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2ecac1ef356d0124278874e9c45c95257ab73bee4887a598271d37d223b46a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadJoin19.java:32-38 | unidbg-ios/src/main/java/com/github/unidbg/ios/thread/ThreadJoin64.java:30-36 \u2014 These two members are one piece of code written twice and then edited apart: 7 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":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadJoin19.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ce38990e029afcea34f340c29abfcd64d9d1c6903d2e850d7f5ccc32fd6f8fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/file/PipedSocketIO.java:32-40 | unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java:290-298 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java:235-241 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/PipedSocketIO.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"00ead28f739f8a33fd956e9f85835efbda2da029748bfdf439893bf7ae326d45"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/thread/FutexNanoSleepWaiter.java:15-24 | unidbg-android/src/main/java/com/github/unidbg/linux/thread/NanoSleepWaiter.java:18-28 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/FutexNanoSleepWaiter.java"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8dffcfa3c7fe4f6559870758e13fba9b7bdc4fed96492558fb96a7028fd7dc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:735-740 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1003-1008 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":735}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ca85a774b2e0aeb656c9c4a04ed2b5b0de32264f81099cfdfd71af8f923f8dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/file/DirectoryFileIO.java:115-123 | unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java:301-311 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/DirectoryFileIO.java"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"761054a2e5a7309c734c79c2f4d310c7d4ee821acb3a6b50bbdf403962c027c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/context/BaseRegisterContext.java:20-28 | unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/HookZzArm64RegisterContextImpl.java:22-29 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/context/BaseRegisterContext.java"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"4625c1d302f212f25f938877585ab0f9ef0e1b1df3a91d444058f21ab1bcf7cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidResolver.java:170-176 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinResolver.java:202-208 \u2014 These two members are one piece of code written twice and then edited apart: 7 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidResolver.java"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"94e823a53a4746ac45e0c00d130ab2f13dba362f1a805e1ef69466a6b0c94428"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/Arm64Svc.java:19-25 | unidbg-api/src/main/java/com/github/unidbg/arm/ArmSvc.java:15-21 | unidbg-api/src/main/java/com/github/unidbg/arm/ThumbSvc.java:15-21 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 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":"unidbg-api/src/main/java/com/github/unidbg/arm/Arm64Svc.java"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"a513b744df57dfb14cb7dca3799378c1114b5762f73ca5d9a992d71e4f7d728e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/IOServiceAddNotificationRequest.java:24-27 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/IOServiceGetMatchingServiceRequest.java:20-23 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/IOServiceAddNotificationRequest.java"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"1588da8bebfbea61b043dae25cae9d24ebed2dfd3fcc8a044024719d4f13458b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/thread/FutexNanoSleepWaiter.java:27-37 | unidbg-android/src/main/java/com/github/unidbg/linux/thread/NanoSleepWaiter.java:55-64 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/FutexNanoSleepWaiter.java"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"7330dda74e0a173aaa7277d0884207176964b7d19f9f3b9c1fe9a8721644194c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/ByteArray.java:54-60 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/CharArray.java:61-67 \u2014 These two members are one piece of code written twice and then edited apart: 7 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/ByteArray.java"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"eace430de1f6ff7705e66a041f9675dbdc0b4a06a16f1362098174a44187e56b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java:127-132 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMEmulator.java:136-141 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"96ddf69425d6bc772b0132d92e99c6f4f66a126b69f5b2888ccde23b0d294d3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/android/XHookImpl.java:75-80 | unidbg-ios/src/main/java/com/github/unidbg/ios/hook/FishHook.java:55-61 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/XHookImpl.java"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"7823226a806af3fb04d4d2002e9a96e13d808e17aa08a26efd9eee9625fa7e9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/BundleLoader.java:38-45 | unidbg-ios/src/main/java/com/github/unidbg/ios/simulator/CoreSimulatorResolver.java:16-22 \u2014 These two members are one piece of code written twice and then edited apart: 7 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/BundleLoader.java"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c1af8b510941e0514dd630e18a09aecdd634f00c01b2fb34f8d295ec97389c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 5\u002B corresponding lines): unidbg-android/src/main/java/com/github/unidbg/linux/thread/FutexIndefinitelyWaiter.java:16-20 | unidbg-android/src/main/java/com/github/unidbg/linux/thread/FutexNanoSleepWaiter.java:40-44 | unidbg-android/src/main/java/com/github/unidbg/linux/thread/NanoSleepWaiter.java:46-52 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/FutexIndefinitelyWaiter.java"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"55eb7ef93a75f76674a669010504d7d6355579614fafb2758c79351fe7af31f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/arm/ARMSvcMemory.java:151-154 | unidbg-api/src/main/java/com/github/unidbg/spi/AbstractLoader.java:363-366 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARMSvcMemory.java"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"03748571f6fe56bb259dd09ab4eb6eadd737e5d9425154dd4ac4a2999d661533"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModuleInit.java:22-28 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModuleInitOffset.java:17-22 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModuleInit.java"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"670cda711b83cfb5dd503c514522bbf68efb0c6ccb1d057fbe0653f487ed617b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:75-81 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:73-79 \u2014 These two members are one piece of code written twice and then edited apart: 7 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":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5aaf8347af78be590a59c363badd6a01dc0802d077402cf6482282d324509dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): unidbg-api/src/main/java/com/github/unidbg/debugger/ida/Utils.java:82-87 | unidbg-api/src/main/java/com/github/unidbg/memory/MemRegion.java:60-65 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/debugger/ida/Utils.java"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"8784b89d4ef558f2643f6f1c25176aba918ef8f284d592bee5c466fdd8cc5dc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:202-208 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java:274-281 \u2014 These two members are one piece of code written twice and then edited apart: 7 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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f70f9803aef28ead9ae21d969a0cabbf3ab11b83847fce30444b9fe8d448d25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (70 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2287-2356 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3097-3166 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2287\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2287}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5bb086874eeebf7f5c8268bb9784fed56839b6895732f902d996f0d915320f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (62 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2000-2061 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2810-2871 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2000\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2000}}}],"partialFingerprints":{"codehealthFindingId/v1":"62038045e1c6172c4cf5e33bc954c50d312f6207dbebd19c9cdb0e096d33f87d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (52 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:802-853 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:886-937 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:489-540 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:593-644 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed07b151e08936a944e54a7a15a203a1cc7724f1c66294aacd78d5ee08fe1c50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (52 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1531-1582 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1024-1075 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1531\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1531}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b6931efccf242e8ddbc04189fc78c55f549b52bea04bc06f3fb7c59192f4b7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (52 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1923-1974 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3639-3690 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1923\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1923}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fb7cfc15c0f283f5ddebe226397ad5eb88e0b87e744e72aa5d017ad55afb6cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (42\u201343 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1848-1889 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2769-2811 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1848\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1848}}}],"partialFingerprints":{"codehealthFindingId/v1":"9729410a9d90b17e93ee879565c75c45fd47d8e62a10175ed426132521dd22a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java:170-208 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java:117-155 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java:170\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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"99edff938a337d39e331fa371545140906f0c6c45fd568363f05ed711a0e16f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java:73-110 | unidbg-ios/src/main/java/com/github/unidbg/ios/thread/BsdThreadCreatePatcher64.java:84-121 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/thread/BsdThreadCreatePatcher64.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae3214fee13845812c88905e2bf01ea3c8d036510d323dedb9f153b3e7e96695"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35\u201336 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2231-2265 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2909-2944 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2231\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2231}}}],"partialFingerprints":{"codehealthFindingId/v1":"4104eef5895c3602859e27c6d9fbe045af1aa84f534594ce9b65e4e4b1379049"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2361-2396 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3171-3206 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2361\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2361}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4b75e2119bfdf968bbaa6eddf438282efaa8b51a51af4974f603210d0acbff3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2470-2505 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3280-3315 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2470\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2470}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ffb8df84713579c527d1ea546b2fcf26ede3b35329173ab726d443e81260acd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 4): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java:37-67 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java:89-119 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:188-218 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:274-304 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java:37\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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"73a95b59ce9d353fbe3cc79eee75d402433055fa6ebb85c32beabd94329956a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:220-250 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:307-337 \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 \u0060backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:220\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ddcf7a62be1491de01274fb74f6362fba0afa66415cef3d5b2b7b689a7e9769"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidResolver.java:125-155 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinResolver.java:155-185 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidResolver.java:125\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060DirectoryFileIO\u0060 names \u0060com.github.unidbg.ios.file.DirectoryFileIO\u0060 in one and \u0060com.github.unidbg.linux.file.DirectoryFileIO\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidResolver.java"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe58b343c278d8bca12d9c5a4818a954c2e38d9a1f051c9f0c813de9ceec891d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java:70-100 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmMethod.java:278-308 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java:70\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"780a361256e123f70193a4e7a6f741f0a6773ed63eca513483599a14c1fdc1c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1817-1846 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2735-2764 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1817\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, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2766\u0060 calls \u0060printf\u0060, \u0060getContext\u0060, \u0060getLRPointer\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1848\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1817}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a7e50c7d6bd0a2130e4166be682d2149571b36f922111e0135aa44922374928"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1972-2001 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3544-3573 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1972\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1972}}}],"partialFingerprints":{"codehealthFindingId/v1":"d28e147bf9275606738e971ecc102426fd0dc2d1150a54a3c4cf1350ec9e21fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2567-2596 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3432-3461 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2567\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2567}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2d0673af405f8518a8f1c76f99f0389bf84fee41df96dd95297145dcbfe45d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:62-90 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:57-85 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:62\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f577062c0f4ff86e8bd5a505eb7f628ac3415d3cbc5b78ee2e53cf503c432ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201329 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:141-169 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:231-258 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:141\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad5493983de0209018cae8e279eb7a0d46c645f001ef7cc546b39e7b9f3d817a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:398-426 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:429-457 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:398\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cfe53f979a994cd7d0fe586f282ece9e73c1a989c0fd7673b6d97719c1c332a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1633-1660 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:987-1014 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1633\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1633}}}],"partialFingerprints":{"codehealthFindingId/v1":"96fd03f525a83cf5dd2c2d17c19b741f1718e020d4effec80e971bdb00187549"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:84-110 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:141-167 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:84\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7331ed1e4d76d5a8af0d87c89193e0c001f7a4c3703907dbac9d3a2d2f9dbff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2200-2226 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2878-2904 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2200\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2200}}}],"partialFingerprints":{"codehealthFindingId/v1":"665fd467f7f6c0cbe588236451ce94ed40a26e1fd8a99b87317218a7569e2b78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1595-1620 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1080-1105 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1595\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1595}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3b191f94144fbea49d745092274cbad226829e64aaed72229e18b331e2b042d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201326 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:142-164 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:137-162 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:142\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"733a1d336bbf6504789a4e8c503993ebdc19c07108dc314e7e257fa708b9a4d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:529-554 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:632-657 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:529\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"1da6a5d56481a3d4e7d3f8160841dd6a9a71a3e445b78c899c02a0cf681772a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:205-229 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:269-293 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:205\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd974a084bf47b8e5ddad64156e2a6963d0d9987a5e4b008941413e7b85372bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java:67-91 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMEmulator.java:68-92 \u2014 before extracting anything, compare \u0060unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMEmulator.java\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java:67\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"52795c4a106e044a6bd9b25760d656a3082e2d83031b87b6dd5ba84d960bf8ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2118-2142 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2998-3022 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2118\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2118}}}],"partialFingerprints":{"codehealthFindingId/v1":"c22f9a790f8f02882fa924c290532075e3f7da1723ea58b5ed30e510c6f8c20e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 5): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2427-2450 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2457-2480 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3237-3260 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3267-3290 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3348-3371 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2427\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2427}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cf4ee7cc9c9c2c92c7c3b6d28c26c21a6e69f4b60f031b15cb39564bf292bdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java:47-70 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/Stdout.java:47-70 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/Stdout.java\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"125920998c5d02faa45bca62c4cfd65173da3c4acf74b2e8158c998f7236badc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java:78-101 | unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadClonePatcher32.java:68-91 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java:78\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8671e6d84590decfd5ae174dd5a772069b81ab2fd7af50d18fd6ea5411f2fdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1126-1148 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1169-1191 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:811-833 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:669-691 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1126\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1126}}}],"partialFingerprints":{"codehealthFindingId/v1":"f84321a22699b7108a034d659fc98387b3e82852d38f3949b51db71ccb0f6dbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/arm64/SimpleMemorySizeDetector.java:37-59 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/arm64/SimpleMemorySizeDetector.java:90-112 \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 \u0060backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/arm64/SimpleMemorySizeDetector.java:37\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/arm64/SimpleMemorySizeDetector.java"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"b94c494130fbc5dd4980699e6b816c4c1f01905ec3514a032cd5a05a46a02753"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:663-685 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1146-1168 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"b47656d16d5fc3bb343b33958c109cfcf966344b3e051624ca61581f944a86f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:106-128 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:224-248 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:106\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5077ff1a67bb4bf2bcfad8d211c8432f8472f8e391d437c4bd2be7a70ca5de0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:121-143 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:1193-1215 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:121\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:1191\u0060 calls \u0060toHexString\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:120\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"24ee4983ff938b7abab91fd1d382bc148043c8dd849d756f76de93bdc98be421"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java:125-147 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/UdpSocket.java:118-140 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/UdpSocket.java\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"595fd894282cbe8d5eac7ae6a9ff1632b5bf0b963b35d115a21bfec6933a7ffd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:479-501 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:594-616 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef03ef50f4913043ad1fa78582d58ba92f2155596e2a59a16a403a7aa55553bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1768-1791 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2691-2714 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1768\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1768}}}],"partialFingerprints":{"codehealthFindingId/v1":"71e3e5c6d82a308ab12bd023c040e0a33fb6b1c34cedb62887cc32ff492cc5f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:240-261 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:688-709 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:240\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"0019142a8a3b00446afbba5da296a325615ed8f48743bafc29b50fee2fee5a06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java:116-137 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java:69-90 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"9da41ac8a376c201cd69cefca5727438baec05207849b02ee9f53c0df95a33be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1252-1273 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1670-1691 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1252\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"feb59b60d04b713f1e31e0a16e9571de85323a39f8056155ca8a5c6d0168915e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:106-126 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:136-158 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:224-245 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:106\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"fae9be321fd5dfc916d163ebfc615611519881c650e85a812c9a731262a2bcf6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1288-1312 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3893-3917 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1288\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":1288}}}],"partialFingerprints":{"codehealthFindingId/v1":"2626577d73c155ef2a7a59caeac5613044ba7798ee1dc1e5b87d4bf00665c221"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:279-299 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:287-307 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:279\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"71707ca85049e458cc31d00204ada6e7a91d7b2bbd1e7dc108c377da00964967"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/LocalAndroidUdpSocket.java:84-104 | unidbg-android/src/main/java/com/github/unidbg/linux/file/LogCatFileIO.java:55-75 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/LocalAndroidUdpSocket.java:84\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, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/LogCatFileIO.java:76\u0060 calls \u0060write\u0060, \u0060format\u0060, \u0060getBytes\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/LocalAndroidUdpSocket.java:106\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/LocalAndroidUdpSocket.java"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5242769564d5eabd2417d7956eb474a7113d9b415b3a2a35116baff6e984384"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:207-227 | unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:249-269 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:207\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f320b88fc90e0355b3da7657ad0a32b19f09e2ef23e7a915b259d4656e3e345"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java:58-78 | unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java:262-282 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java:58\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b7852540491debf0dd43c086bd4ee27eab118fb4bfdb78325ee2748782ebcdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:145-164 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:236-254 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:376-394 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:145\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:374\u0060 calls \u0060toHexString\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:144\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c1a815b2668040d3d65dfb1e47e320b5e7d788cd95432e12116fa45d4300f60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java:83-102 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java:93-112 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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: \u0060IOConstants\u0060 names \u0060com.github.unidbg.file.ios.IOConstants\u0060 in one and \u0060com.github.unidbg.file.linux.IOConstants\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8f4bbd26517580f49955fccda0e90f5df9c3b4f3223e489bccbf9d07cfad278"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend32.java:34-52 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:46-64 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend32.java"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"466b6d46072b3aadb0145421eccb4da1e0c5608cf7f5f3ffa6c870f69c7a10ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:107-125 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:102-120 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:107\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"dea0892246c4de0e91016f62e9970e4887eb4a0dcd86542aaa4ebb6381621ed5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java:217-235 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java:178-196 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"755872010fe247d49b248f2429b8f3b61923563eb3af85bbd54c139875c6a611"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java:193-211 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMEmulator.java:198-216 \u2014 before extracting anything, compare \u0060unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMEmulator.java\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java:193\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":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"5429dc297440bd9a2bb0cc0f75877e9039e7f6d9478f140f4e1c4c254009e0a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2906-2924 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:4075-4093 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2906\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2906}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b671c4f1679b0f2be9ea42e1d9a9784a31d4d8adf307ed4a5edc678bcf91cfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 5): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:105-120 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:135-151 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:223-239 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:370-387 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:1187-1204 \u2014 there are 5 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:105\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, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:1205\u0060 calls \u0060toHexString\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:121\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"67b722b7ebdfb272e1f8b448e097c20630c77d540161f679cdceab8104ed54ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 4): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2281-2298 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2409-2426 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3091-3108 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3219-3236 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2281\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2281}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc4c11a28d5c2915d871aabb3ab1fc5fcf5d301b9b9b72c8bb11cdda1918c1c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1420-1437 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:909-926 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1420}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bdffd114c668d446e250fd308e4e109936f093d5e5d60140f76af22ed8248ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:210-227 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1996-2013 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb48b577538ddb16f9eba36b2fe2f7bd84eea32d21e86298162cd271e8bfad1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java:215-232 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:318-335 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java:235\u0060 calls \u0060allocateStack\u0060, \u0060getPointerSize\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:337\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":"unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6f04d9cf80447c4d13c9e760669932b30f3bb2634102d1d9ada2861e91a39f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java:238-255 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:337-354 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java:257\u0060 calls \u0060allocateStack\u0060, \u0060getPointerSize\u0060, \u0060setInt\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:356\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":"unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdc1205b08cdc46afa4cc561382f6b8f1e3159ebe5fbaca6781ab14f0dd21bf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2896-2913 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2963-2980 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2896\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2896}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d572f32daab8baf6d4db287de4fba44b33c6f14a52c7eb1d85fc8bb65a30615"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3417-3434 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3446-3463 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3417\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3417}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec27dda62e38bef9246b1eda5c2e001c7481cba7bedc04eaed8763833bf11b34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3516-3533 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3545-3562 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3516\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":3516}}}],"partialFingerprints":{"codehealthFindingId/v1":"de8dbece63b1f605f96ccaa675adc566fe7a596ad1b4d252e4a0abf279ac93b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java:239-256 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java:200-217 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"4015894af1820d6115477d74f326af8d32bafae72d52a56504c1cfa530fe775c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2146-2163 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3026-3043 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2146\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2146}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffbbd7cbb900edde65a64d3501725d829e80c85b6438236c15b2ad1e5b7319ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:133-150 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:156-173 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:133\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"64adb9bb242d376d0978a9197d2bd79acf4dcd4fb83757964770853c557c6e35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:300-317 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:315-332 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:300\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"03b939eef66e65e9ee573cb4d02347f706586b8b26e092d3b7fbd15270425c99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2078-2094 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2105-2121 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1597-1613 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2078\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":2078}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ac20ada92897a1b805a689550dcf6958e0dcfaa49a524888883d515df175f8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1985-2001 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1499-1515 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1985}}}],"partialFingerprints":{"codehealthFindingId/v1":"f42e37cf81a64a44d6a28aa536a5b50e5a8fad1f174ecea7ce0e792a67777cd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:560-576 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:345-361 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:560\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"61fc1f957e7d99692fd5d4db71afec651e8a54f87b385b1d135c994cc85040dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java:74-90 | unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARMDebugger.java:75-91 \u2014 before extracting anything, compare \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARMDebugger.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java:74\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":"unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf4227dbd1ec294e3ffdc54cff79d3d814a7b828483c3cd863fbaddb00243666"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2521-2537 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3386-3402 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2521\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2521}}}],"partialFingerprints":{"codehealthFindingId/v1":"a003a0ecfecf04245cbe0679de3aa60fa8fa9ae9a43f20e1f671c9201728897a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1668-1684 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:541-557 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1668}}}],"partialFingerprints":{"codehealthFindingId/v1":"77187d2868562560d4ff2339df55fb7cfae661a826a0a4330cabf8607eb71fb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:97-113 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:114-130 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"a231db337d2f0af72bf161592d92a8c4470f5c5def55b96f6c55ea7f28cff494"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 6): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1125-1140 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1309-1324 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1341-1356 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1155-1170 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1339-1354 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1371-1386 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1125\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1125}}}],"partialFingerprints":{"codehealthFindingId/v1":"711d572211cf5aed883d0caa6524fa719ed057431dde645a2b9e55e4c28085df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 5): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/VaList64.java:30-45 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/VaList64.java:49-64 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/VaList64.java:68-83 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/VaList64.java:87-102 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/VaList64.java:106-121 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/VaList64.java:30\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/VaList64.java"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"285c23a0b7f08756639a01f8cf36f86405279d6c2489f4900e915368c16feced"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:519-534 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:394-409 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:519\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"93034a2c221a903b5d55734902da65d532df8bd69df5a99662b045ddad49ed8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1011-1026 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:670-685 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1011}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef9de1afda309854fe65f26cc52d04c8424207bd9fcdc5e4b1b2cf9e45d652f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:802-819 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2310-2327 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:802\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ab744b6049f081f9d2b06866a4ef1c3010323c52dd5b8455fda123db8559652"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1672-1687 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2527-2542 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1672\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1672}}}],"partialFingerprints":{"codehealthFindingId/v1":"d86f05faa1b25d893ae19327c9ffa8abecd86da159af7d0aa92e9c764462959a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2660-2675 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2684-2699 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2660\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2660}}}],"partialFingerprints":{"codehealthFindingId/v1":"277a5de89960ae8d41f07280bb4e7b5079985cfa8e76372b7f72095678584847"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2683-2698 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2710-2725 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2683\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2683}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fe7bd8b43cf63886d00882f3d1cf52b20e6a0b9ed644d052bf87683195061f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3573-3588 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3672-3687 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3573\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3573}}}],"partialFingerprints":{"codehealthFindingId/v1":"532fb1af2e12d1df19d8987248bc9ca08b0b2781f5b3f55a25e562fc9669b5a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java:143-158 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java:96-111 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java:143\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e14e91cfdbba649035591d9e2172eaf11448c45da38b90c22f578a1c0306a26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:275-290 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:236-251 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b821c35cb4ce7e4f80002a4ded2cf2c129f07f4036234e00212da3d8031bfec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:188-203 | unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:230-245 \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":"unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"28ee8236eee58c6fdc0f01866aa8ab9cd2aa87f5b5af443b0d22bf6a4f9d4a6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2069-2084 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2952-2967 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2069}}}],"partialFingerprints":{"codehealthFindingId/v1":"90ffe09079be60dc13841ee5890e5594fce0b49985140f748805af7037b51d99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:534-549 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:658-673 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:534\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"71629a6879b0cddd5e3154014628aaf7ec31299381eb19ed60ba581031f22419"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:578-593 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:625-640 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:578\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:641\u0060 calls \u0060isDebugEnabled\u0060, \u0060debug\u0060, \u0060toHexString\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:594\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"52774e9566b24134535b97c750e49759edb91561158c2c94f2659ff844ef5c63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1858-1873 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:1083-1098 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1858\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1858}}}],"partialFingerprints":{"codehealthFindingId/v1":"d76d9c5367e5ad2af63dd829041a1302bdbe8186a0aad51152c54478e18d1914"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:151-166 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:180-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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:151\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4c846aaff2163746e8e4055f2dee8d1470c78d8b5edbc4c59685006192b12ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:214-229 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:240-255 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:214\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"c706cd94bfc7e6201ed3187a8afabb307154ef75341c722b66e811f02ce62f6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 21): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:93-107 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:167-181 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:702-716 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:742-756 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:919-933 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:999-1013 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1090-1104 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1155-1169 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1446-1460 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1603-1617 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1903-1917 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2108-2122 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2153-2167 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2335-2349 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2396-2410 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2460-2474 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2759-2773 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3089-3103 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3165-3179 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3505-3519 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3552-3566 \u2014 all 21 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:93\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"a51b7bf2c06a9a866b7cc6a94d1aa37218c84ee59c20b3b36ceef419aa50a1c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 18): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:88-102 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:165-179 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:711-725 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1120-1134 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1185-1199 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1500-1514 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1649-1663 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1951-1965 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2190-2204 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2232-2246 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2414-2428 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2474-2488 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2538-2552 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3090-3104 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3179-3193 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3255-3269 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3604-3618 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3651-3665 \u2014 all 18 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:88\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed7eaaa6b6a7bfdd6b8bf923d1772c161cabc94515122ac9a10091e8efb09fb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 6): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:130-143 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:230-242 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:340-352 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:154-168 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:244-257 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:384-397 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:130\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f132ea5066bd61fbd4e0eb385d0bdeb0fe195ebbf9901815c1c816980562d5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend32.java:37-51 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend32.java:71-85 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend32.java:88-102 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend32.java:124-138 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend32.java:37\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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend32.java"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eb18aa32d4ccafb476691447e289ffece2dbaf87f55addfce7a04aa333831a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2030-2044 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1557-1571 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:689-703 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3851-3865 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2030\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":2030}}}],"partialFingerprints":{"codehealthFindingId/v1":"190326d6dea94e24107b23372cf19dd31bd37d51d5750eb7b447989f6d6dfe03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:490-504 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1730-1744 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:499-513 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1778-1792 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:490\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dabae21896552d3c7ae49e946e6ec1e494a3c8649548ee226e32fb30ba702a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1373-1387 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2241-2255 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1403-1417 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2320-2334 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1373\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1373}}}],"partialFingerprints":{"codehealthFindingId/v1":"58209b68bb9b5267c1d1ceb491590352cfe62995d76360206741b88cea2ef66f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1234-1248 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:754-768 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1234\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1234}}}],"partialFingerprints":{"codehealthFindingId/v1":"013b64c12921eb052df7231bf0d5958d78c04b50cb021d832d38e05f9349e479"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:122-136 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:129-143 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"554bda1a42751b78ee92feffdbfc7776c2e9119e984a615dbf90f84b36984f6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2943-2957 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3008-3022 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2943}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dc55913274b2a7199de1bf424ebac4442be6fd511a0f70aee060d17cabe1f95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:668-682 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1175-1189 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:668\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1172\u0060 calls \u0060isConstructor\u0060, \u0060IllegalStateException\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:667\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":668}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5aee6020047bf74e4dc5c8e8593bc95abc84159dbc68efd6bb89587a588b1c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java:228-242 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java:173-187 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb1255012e6fd72fb07bfbee5ad4cf70cd375c941372adba69b3bee8d89b9d38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java:74-88 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/Stdout.java:74-88 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/Stdout.java\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cda6fb7e56196590535774fc19bcf0c81ba1c7fd3479b474642f80639793c3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:159-173 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:184-198 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:159\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d28655dc9f2ce55d7e3fe26f0a2a6d3929e342c0228d390acb2228e0b5d4616"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:573-587 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:699-713 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:573\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"88a3fd3c8a6a265f3ca80ae9ec132ec286f044d3421d01d981a7d1ea9ff809c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1554-1567 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1047-1060 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2926-2939 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:4095-4108 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1554\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: \u0060SocketIO\u0060 names \u0060com.github.unidbg.ios.file.SocketIO\u0060 in one and \u0060com.github.unidbg.linux.file.SocketIO\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1554}}}],"partialFingerprints":{"codehealthFindingId/v1":"92319fe03bb05f43c2218501212a0c06ab54904afd0e06f02638038417595973"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java:64-77 | unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java:88-101 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/UdpSocket.java:57-70 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/UdpSocket.java:81-94 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/UdpSocket.java\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java:64\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe141f90f47e6e9e38bfc32fa754dda11bed170e6519d45c3b5a2c5c645f1315"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:953-966 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1534-1547 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2098-2111 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:953\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":953}}}],"partialFingerprints":{"codehealthFindingId/v1":"97218f9ec4504c020c85eb5e0405a89ef1c5a4c015fd163f79feb766f453ef48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3147-3160 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3170-3183 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3595-3608 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3147\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":3147}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eb689ba3e8966468ec5aa3349cbd1e6483a9fe2a2f81164a95e6e806baa31d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2490-2503 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2609-2622 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3300-3313 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2490}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ef47b98e6865e3cb352cd87c57272600843daba486dce8b8de1fa1fccd350c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:71-84 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:148-161 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fc9987046f81108605e2741bfd315aef49b7078d031a078a2ab5f597fdb5d14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3050-3063 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3140-3153 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3050\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3050}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cc16dc884f0e0e8b9a3fafd5cbd13d0583b1cd5a1ec2684fe7e60af0e24ef77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3073-3086 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3163-3176 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3073\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3073}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c381e222562c1735304c53a295f63b8a717d69f2ba8be8dad66d7a93e408ea5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3489-3502 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3588-3601 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3489\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3489}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3b56e52b0007e4839bec2305dd4c75cf2ce4ef5e90737e661798ef8f1c981fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3519-3532 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3618-3631 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3519\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3519}}}],"partialFingerprints":{"codehealthFindingId/v1":"00358f9225dfd767e28faf06f9922e641a2182a2bdb311aa7dbdd47a99c4c955"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/signal/SignalTask.java:38-51 | unidbg-ios/src/main/java/com/github/unidbg/ios/signal/SignalTask.java:31-44 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/signal/SignalTask.java:38\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":"unidbg-android/src/main/java/com/github/unidbg/linux/signal/SignalTask.java"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0fdd1d781be1c70eb50c6f133b5d333c977e6e7f8bc4d28f5704aa7363ab146"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java:56-69 | unidbg-ios/src/main/java/com/github/unidbg/ios/thread/BsdThreadCreatePatcher64.java:67-80 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/thread/BsdThreadCreatePatcher64.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java:56\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"b67aa17efacc96eb8b043160f7292c7cbb189d4f28f7656fc42d7cb60cc46e46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201314 lines \u00D7 4): unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/AttachExecutableEvent.java:19-32 | unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/DetachEvent.java:14-17 | unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/LoadExecutableEvent.java:19-32 | unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/LoadModuleEvent.java:21-24 \u2014 before extracting anything, compare \u0060unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/AttachExecutableEvent.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/LoadExecutableEvent.java\u0060 as WHOLE FILES: 88% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/AttachExecutableEvent.java:19\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/AttachExecutableEvent.java:17\u0060 calls \u0060put\u0060, \u0060pack_dd\u0060, \u0060getPid\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/DetachEvent.java:14\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/debugger/ida/event/AttachExecutableEvent.java"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"9620c6fa92df90561d9685dbf85fe620a3b86c8b3045ce01013003aa434ef61e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:974-987 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1306-1319 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:974\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":974}}}],"partialFingerprints":{"codehealthFindingId/v1":"66b257572eec9daa2e08c0291dc0d2bdbba31b192a323766f45e5502a0058cf7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1041-1054 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1757-1770 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1041}}}],"partialFingerprints":{"codehealthFindingId/v1":"58fe7407304d332ebd26ea7ae14b19efdf67c263872b77874ac9ee6c727a27d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2101-2114 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2981-2994 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2101\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2101}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ac80117e9892abf4e618ffe377d09653d2c833e01224bcf3b5acb82314294bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:500-513 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:618-631 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bbdfe0eb2876acc2041c7b6eca5c1ae5af9019670be144c651ff199be6a7a2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 13): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:188-200 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:224-236 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1598-1610 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2455-2467 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2714-2726 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3038-3050 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3061-3073 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3084-3096 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3160-3172 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3216-3228 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3269-3281 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3294-3306 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3500-3512 \u2014 all 13 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:188\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"caa445714e9456e38838dd490ed76df9cba44af40a8b14ff03bda43610dc5b6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 12): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:229-241 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1644-1656 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2533-2545 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2744-2756 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3128-3140 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3151-3163 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3174-3186 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3250-3262 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3306-3318 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3359-3371 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3387-3399 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3599-3611 \u2014 all 12 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:229\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"26450708f30289a11ca4c64de742411b261b2de6b109e0f8e09ae553f5f9c3b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1773-1785 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1294-1306 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2696-2708 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3899-3911 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1773\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1773}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2d9ba8ba657189d43cb93f6f6af9e8f65f249a82a701c8896eab2b3c6bd901c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:206-218 | unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java:57-69 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:170-182 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/UdpSocket.java:50-62 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:206\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, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:220\u0060 calls \u0060getOutputStream\u0060, \u0060BufferedInputStream\u0060, \u0060getInputStream\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java:71\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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"e732e70da106576dc40b5d0f9b7c8874fde662cc0561c9b29f687d8822045bda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): unidbg-ios/src/main/java/io/kaitai/MachO.java:2376-2388 | unidbg-ios/src/main/java/io/kaitai/MachO.java:2400-2412 | unidbg-ios/src/main/java/io/kaitai/MachO.java:2430-2442 | unidbg-ios/src/main/java/io/kaitai/MachO.java:2454-2466 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/io/kaitai/MachO.java:2376\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":2376}}}],"partialFingerprints":{"codehealthFindingId/v1":"074886232be6925b548e820f03c33c6a236c8204f24e5da45f743ee2c53ffef1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1527-1539 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2905-2917 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:4074-4086 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1527\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060SocketIO\u0060 names \u0060com.github.unidbg.ios.file.SocketIO\u0060 in one and \u0060com.github.unidbg.linux.file.SocketIO\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1527}}}],"partialFingerprints":{"codehealthFindingId/v1":"16b81042051a8c496154a09573982763d4b60d1b8692d116d0a3027b58691a44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2074-2086 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:4001-4013 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":2074}}}],"partialFingerprints":{"codehealthFindingId/v1":"80f698892758e5372b0ca2e4201876a6ac2494b09bd856970816b41bfb633bf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/ArmVarArg32.java:10-22 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/ArmVarArg64.java:15-27 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/ArmVarArg32.java:10\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/ArmVarArg32.java"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"14c8cd5cb1410f382d6926573eb2644b9dc46890b3e3b727a544e6c5e62512ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:88-100 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:206-218 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:88\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d9223dd17690eb0e9d8459c4acad986589af45c5d74345f238cc788ab53d2e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2413-2425 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2491-2503 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2413\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2413}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eb61db4a01393d19a53c57bba1bce7880529039c5f81c4f94d378ddd7c867b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2635-2647 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2975-2987 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2635\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2633\u0060 calls \u0060printf\u0060, \u0060getLRPointer\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2974\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2635}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f7ee72494905c290407ae2b65e70b5d89b1463087519a9c760f8735cfdbe7ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2754-2766 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2870-2882 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2754\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2867\u0060 calls \u0060isDebugEnabled\u0060, \u0060debug\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2753\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2754}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a2147b8732f0a746dbff54118bfaeea078c67753046cd641b90afdaf087fbb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2969-2981 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3034-3046 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2969\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2969}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b4232e40c07b05bada20a5c0808ee68a3b1e22d44a01225d36b0337e72f1b78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3867-3879 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3979-3991 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3867\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3867}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2c53567a3f0313f111f8d9238072bd9f4be0eb7a161772987ca360334fd075c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:83-95 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:211-223 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:83\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee9e2ea595d75487f9b768eab79232d241245618878046554495f2b0e99bd4af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2659-2671 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3040-3052 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2659\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2657\u0060 calls \u0060printf\u0060, \u0060getLRPointer\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3039\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":2659}}}],"partialFingerprints":{"codehealthFindingId/v1":"fedf580d538327a1d74cc4779004105d6538cf83ebcb19e5b1392c2c75cb6517"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2878-2890 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3085-3097 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2878\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":2878}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb72dc8fd89859b9797fc1dbe6e76be27611ca1ba43d2713dad3f2f0ae508b43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdin.java:32-44 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/Stdin.java:35-47 \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. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdin.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"794c853ec92287d778bf4f91c261f93b9bcd5131a89182c0af4993df2639c8f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:190-202 | unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:216-228 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:190\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dd60c9a566d1588cc8ab7a06f3cb1682cb23f5f2bc58814024fdb12a1991328"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/InlineHook.java:58-70 | unidbg-api/src/main/java/com/github/unidbg/arm/InlineHook.java:105-117 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/arm/InlineHook.java:58\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/InlineHook.java"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"cff5113b22939d59e2f617173bd619e370b8638320e678ae3eb4ced914002776"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:221-234 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:249-262 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:221\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6b6cc53c20f62fcc6078cb578c777e8db94c79ad61cec6a6702d0656c8b72f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:415-427 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:517-529 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:415\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c278a2dd3821dd8339dbd49e57703d615240778db5afda00d32d851b60a3307"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 43): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:52-63 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:90-101 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:164-175 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:190-201 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:208-219 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:226-237 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:666-677 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:699-710 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:739-750 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:779-790 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:916-927 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:960-971 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:996-1007 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1087-1098 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1152-1163 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1443-1454 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1541-1552 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1600-1611 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1900-1911 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2070-2081 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2105-2116 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2150-2161 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2332-2343 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2393-2404 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2457-2468 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2716-2727 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2738-2749 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2756-2767 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2800-2811 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2837-2848 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2872-2883 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3001-3012 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3040-3051 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3063-3074 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3086-3097 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3162-3173 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3218-3229 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3271-3282 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3296-3307 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3373-3384 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3502-3513 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3532-3543 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3549-3560 \u2014 all 43 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:52\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:238\u0060 calls \u0060getContext\u0060, \u0060getIntArg\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3544\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"d44c3a675f6db61690a2736b8fe8717ae6652bc5a399ad75d593a3a50a4b50d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 40): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:47-58 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:85-96 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:162-173 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:213-224 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:231-242 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:675-686 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:708-719 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:769-780 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:930-941 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:967-978 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1003-1014 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1117-1128 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1182-1193 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1497-1508 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1587-1598 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1646-1657 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1948-1959 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2187-2198 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2229-2240 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2411-2422 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2471-2482 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2535-2546 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2746-2757 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2780-2791 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2802-2813 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2839-2850 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2880-2891 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3066-3077 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3087-3098 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3130-3141 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3153-3164 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3176-3187 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3252-3263 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3308-3319 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3361-3372 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3389-3400 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3472-3483 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3601-3612 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3631-3642 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3648-3659 \u2014 all 40 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:47\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:243\u0060 calls \u0060getContext\u0060, \u0060getIntArg\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3643\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"8954f11856a1cf628b35902acc09a374e6dbab0357b8413065bdea3032738531"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 5): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1424-1435 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:277-288 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:304-315 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:326-337 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:373-384 \u2014 there are 5 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1424\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1424}}}],"partialFingerprints":{"codehealthFindingId/v1":"3005dccc8e119e66f1f754dd5eb1aa9ff0377a23becc7aef41a3abc57b08f0fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1717-1728 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1746-1757 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2904-2915 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2932-2943 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1717\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":1717}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2d6bf24f5689e076e01a9e66ee85bc4e9bf98bb99cf5af5be453b8bb8c360f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:81-92 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:138-149 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:1210-1221 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:81\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:79\u0060 calls \u0060toHexString\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:137\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"d537f751c7d51aabc69756d4336d1113c8048a24fad9c73c51077e23481f9668"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:180-191 | unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java:81-92 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/UdpSocket.java:74-85 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:180\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f737eb1901d7bca8e92c30fc7ff8d68247aa402dd71a49dd45e3e4d12240e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1623-1634 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1115-1126 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1623}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c9ac7fa88cb62b35ba51369bd0346bb1502371d5f29e43b060a15d4fa87ba37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2010-2021 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1537-1548 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":2010}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea6e2c54ad87b5aedcbcf1b4d01194b6a7bb87d1e50739a5c518935a704e6030"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidResolver.java:157-168 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinResolver.java:187-198 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidResolver.java:157\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060ByteArrayFileIO\u0060 names \u0060com.github.unidbg.ios.file.ByteArrayFileIO\u0060 in one and \u0060com.github.unidbg.linux.file.ByteArrayFileIO\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidResolver.java"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3a30fafdca577c50cc85c26782df711ca8f3140d4a1670f02140c2f6f7353c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:159-170 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:216-227 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:159\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"df6a3cb1fa29416fd4645dc0e4c09ef6c1f1f5f105cf0971c18d06c4f4f2baa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:358-369 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:366-377 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:358\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"d719adca662859137ea7c1986612f62d5cf90a3d415ce80f629e6dc96e30e79a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1683-1694 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1728-1739 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1683\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1683}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d37e0d2e8c0887099f87bfb7e6f0807e772601cbeddc9ece62c55ffb2acbf11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2984-2995 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3049-3060 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2984\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2984}}}],"partialFingerprints":{"codehealthFindingId/v1":"a33098277f02817ae2eb346afc7361e00baafb5651aaa1fdd9a94789c2ca877d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1692-1703 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2580-2591 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1692\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":1692}}}],"partialFingerprints":{"codehealthFindingId/v1":"2828537150ad063beb1bfc90cc08c23953c1b587908868f72fac5c2b2bbae962"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java:23-34 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/Stdout.java:23-34 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/Stdout.java\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"35a41fe58092b6a9c27ac759ff69b9e809d8a91d0eae3d54e1af4005ba78781b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/mcp/McpServer.java:244-255 | unidbg-api/src/main/java/com/github/unidbg/mcp/McpServer.java:311-322 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-api/src/main/java/com/github/unidbg/mcp/McpServer.java:324\u0060 calls \u0060getResponseHeaders\u0060, \u0060set\u0060, \u0060sendResponseHeaders\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/mcp/McpServer.java:257\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":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpServer.java"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"23c6cc014030b2d7bcab50ff7a80d81181904bd83c0e20cef5a3e8993e265059"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1083-1094 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1516-1527 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1083}}}],"partialFingerprints":{"codehealthFindingId/v1":"bab69416ea5b9698cb8a4a5d9bf258a8864d00dee74ebbb4338a79d35d97b2a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1751-1763 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2655-2667 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1751\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1751}}}],"partialFingerprints":{"codehealthFindingId/v1":"669382d9270911b5eb2ba3b2bcce8bf54b6aad09ae80720a73a4194384ee9d74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2949-2960 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:4118-4129 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2949\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2949}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d8e4c6b35bdcd1e74a4fececdaff767209d621073d05d262b6fcf077bce4e0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u201312 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:1079-1090 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:1096-1107 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:1112-1116 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:1079\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":1079}}}],"partialFingerprints":{"codehealthFindingId/v1":"90a5f6366eff097228c3c15b8676dcb40ddd172bdc741b5535d953183f663f53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1449-1460 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1481-1492 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1449\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1449}}}],"partialFingerprints":{"codehealthFindingId/v1":"055964802367b37b97bb0ffd53caef20447e82469423675e89f29a3a1c303da7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1630-1641 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:514-525 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1630\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1630}}}],"partialFingerprints":{"codehealthFindingId/v1":"24b29da861c71b0707fb050867fb63cd572dcda70e493e4339a1c23094854d35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2335-2346 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2364-2375 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2335\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":2335}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f090f16767d4ac3fcce8a43b721d595790da56125d5305c693501c27c77195b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 33): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:100-110 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:174-184 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:669-679 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:709-719 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:749-759 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:782-792 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:926-936 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:963-973 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1006-1016 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1118-1128 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1302-1312 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1460-1470 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1544-1554 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1617-1627 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1959-1969 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2073-2083 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2160-2170 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2342-2352 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2403-2413 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2474-2484 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2741-2751 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2840-2850 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2875-2885 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3004-3014 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3043-3053 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3066-3076 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3096-3106 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3172-3182 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3221-3231 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3274-3284 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3299-3309 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3512-3522 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3566-3576 \u2014 all 33 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:100\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2887\u0060 calls \u0060getObject\u0060, \u0060toIntPeer\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:794\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"612c8cd1b2e4e5fefeba3aaee13d9c2f3ec88f9ed30725b51aec73cde8a6c70f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 32): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:95-105 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:172-182 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:678-688 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:739-749 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:772-782 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:933-943 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:970-980 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1006-1016 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1148-1158 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1332-1342 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1507-1517 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1590-1600 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1663-1673 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2007-2017 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2197-2207 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2239-2249 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2421-2431 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2481-2491 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2552-2562 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2842-2852 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2883-2893 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3069-3079 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3097-3107 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3133-3143 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3156-3166 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3186-3196 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3262-3272 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3311-3321 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3364-3374 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3392-3402 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3611-3621 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3665-3675 \u2014 all 32 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:95\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2895\u0060 calls \u0060getObject\u0060, \u0060toIntPeer\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:784\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"183c9ceaff4ce3487d0e3fba834d014a274a800c8dbbe06b73d61cb7bf17258d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 16): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1782-1792 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1807-1817 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1832-1842 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1881-1891 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1993-2003 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2194-2204 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2219-2229 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1830-1840 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1855-1865 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1904-1914 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1929-1939 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2041-2051 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2066-2076 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2140-2150 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2273-2283 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2298-2308 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1782\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1782}}}],"partialFingerprints":{"codehealthFindingId/v1":"50711a2e4a9f8b1456ccc694a9b63a0fccc88397685d8ac14bdd94386c47cb06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 6): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1839-1849 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2439-2449 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2469-2479 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3249-3259 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3279-3289 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3360-3370 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1839\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1839}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c1c730db3fd65dd1fc21af76c4ee6e79865703d1b1246f6b2afa16593b579a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:696-706 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:736-746 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:776-786 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2009-2019 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2329-2339 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:696\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a1ae4b2b14f901191af9d1f587339e58436799c8e42ffb982d2fd6640fa8715"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:863-873 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1488-1498 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2119-2129 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2369-2379 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:863\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"83dcfbd3c75255d5ad5d282f0d512e80f82c76ba695408134dde97253f15fa6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3383-3393 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3396-3406 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3482-3492 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3495-3505 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3383\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3383}}}],"partialFingerprints":{"codehealthFindingId/v1":"a478333316c68d6fd25caf015acd918fc15aada6645684a1414c84e3b015a8fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:101-111 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:118-128 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:135-145 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:152-162 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:101\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"abb1d4df58f0e50a235be8e8f34ae01fef473496c8bc549a64e58c8d5800164a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:542-552 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2792-2802 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1010-1020 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:542\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf8d5eb1bdef7aac203baf582c4f3f21133f89d07d56ed9eed37a8b52b8cc71f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:993-1003 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1030-1040 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2219-2229 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:993\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":993}}}],"partialFingerprints":{"codehealthFindingId/v1":"421db26e0499b522bfb78a245c009a1b8c5dfbb85b3e56903190f6352e94d86e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:977-987 | unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:1013-1023 | unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:1134-1144 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:977\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":977}}}],"partialFingerprints":{"codehealthFindingId/v1":"23c92b0d0abc6cbafb7f2951cafba264ddc9139eb47908f96a05f2fe8913e585"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2119-2129 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2999-3009 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3696-3706 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2119}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6983a37e25d4489f58b038919408fe9db398b535a85a9cdf6cd65abbe0f079c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2204-2214 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2882-2892 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3584-3594 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2204}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a9b52f03d50c8e112e4c2e3be135582831e478656f86c4e9a43b3f41791793c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:83-93 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:145-155 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:83\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"dad9078ad3a08f9b6a3ca01c0682bbe2630491896c63798d3de39833f13b8d98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:600-610 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1518-1528 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f14d572ad413a6a0eb4a51b0fef50a95debac22041db41c2ab98053ad2dad5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1207-1217 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:725-735 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1207\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1207}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fe7efd92ba8b597cc961640f3d52e6b3ef5689c34c629ec02f676af4c9a52a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1906-1916 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1448-1458 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1906\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1906}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6df26a32111b89d591d150d1c66211f456e75ae4b08586b5a83c914e8a82685"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:780-790 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:991-1001 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:780\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":780}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac93b81fabb919150471986f7c9c8d073daa864d85408006287b2b3ef8ec8ba1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java:62-72 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:947-957 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java:62\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":"unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"3db1b63ff7cd9e4fdc40781254470df4c423cfb106dc6cb511cd008fca6f0031"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:145-155 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:202-212 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:145\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"9375c62ae0917479d6a2a5512d04e00862ecb427c26d1c2fde397e07e8a154e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:317-327 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:374-384 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:317\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"71ba30968303ce3fc2df08c5dbe486f5537d417edb51a1e1ba7d741d79e37717"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:306-316 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:350-360 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:306\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1ceecc734a4afa6f2521e66958a8ea14670123915c7895ddda6f2f9c84a141c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:458-468 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:466-476 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:458\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"6166aedd898472c324220f31631c7e4c786349f571d1b33e4e18b2f86ede47c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2050-2060 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2115-2125 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2050\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2050}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6c856e4f34bbc62ad161dba4ff3cda5a84f99c884734b1eaa7db5b9b6d2825f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2538-2548 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2915-2925 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2538\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2538}}}],"partialFingerprints":{"codehealthFindingId/v1":"0afa101cbe67b4673fb742d279119fdbac83728d88a22f2ac5b72837014acdd1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2619-2629 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2962-2972 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2619\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2619}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fdc3c66186dcce757dc677932aea95ae0edafd221eda5ba8813a04ef8f29d01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2631-2641 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2655-2665 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2631\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2631}}}],"partialFingerprints":{"codehealthFindingId/v1":"2895d665fc73d4f0f8e888d4f63b5b631e989c4691e3f2a029dcc9b3e5260616"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2701-2711 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2728-2738 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2701\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, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2740\u0060 calls \u0060printf\u0060, \u0060getLRPointer\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2712\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2701}}}],"partialFingerprints":{"codehealthFindingId/v1":"1023aff53f3460fdd5ceabbbca0faab2fef42fe5a443fd4d42dd6230e253280e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3409-3419 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3508-3518 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3409\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3409}}}],"partialFingerprints":{"codehealthFindingId/v1":"baedfa76462f22f0971ef98c03fdd651db75c0e4b0336f1b62be4aa0b36e58db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3433-3443 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3532-3542 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3433\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3433}}}],"partialFingerprints":{"codehealthFindingId/v1":"7edc3071f76cc7d2342a14af1581bc52bdfc0af7ea41f3a0a6e4be5107928132"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:314-324 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:358-368 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:314\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc322ce07304703cc370d5fff2bb59437bbcf508df7bdbd850980b732542cb9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:60-70 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:59-69 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3105e85cf33521dd76b2b0d6af6d001f2c462f6f040d526f99e4766b7af87a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:102-112 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:75-85 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:102\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, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:98\u0060 calls \u0060readInternal\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:74\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fa965814f88765911371e8bbd6c7bfd567806de1d83212b7717a0c8d9594ed8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:159-169 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:117-127 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:159\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:128\u0060 calls \u0060getSyscallHandler\u0060, \u0060isVerbose\u0060, \u0060printf\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:170\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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf633c3998bf24b75c91c42ae727ef88a24919dc830d0d76c12fd706053ba9c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java:38-49 | unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java:38-49 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"80117084c84de6a111055b2830a920e9f8f67273a974b234c43c5d43ab3c262d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadJoin23.java:21-31 | unidbg-ios/src/main/java/com/github/unidbg/ios/thread/ThreadJoin64.java:22-32 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadJoin23.java:21\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, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/thread/ThreadJoin64.java:20\u0060 calls \u0060findModule\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadJoin23.java:19\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadJoin23.java"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"db070bcf11e9c74e6c40243f4c1f9074bd712f47787e637c57214a3059860048"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/Arm64Hook.java:72-82 | unidbg-api/src/main/java/com/github/unidbg/arm/ArmHook.java:63-73 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/arm/Arm64Hook.java:72\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-api/src/main/java/com/github/unidbg/arm/Arm64Hook.java:71\u0060 calls \u0060putInt\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/ArmHook.java:62\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/Arm64Hook.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f4260ac6db6a5f2326aa0cfe907d369adf359c6fa7a3349ed77b81cca5a83f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java:54-64 | unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARMDebugger.java:55-65 \u2014 before extracting anything, compare \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARMDebugger.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java:54\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa284355061d717c7d682fbe62e5fd5ac0924c23ed4e2acdbccef0e505c4b5fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java:170-180 | unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java:230-240 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java:170\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060data\u0060 to \u0060short[]\u0060 in one and \u0060byte[]\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":"unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"956cda01f47ed881f7948bf2434d4943616c278bb7d585fc411ab2afcf685d32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:774-784 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1196-1206 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ab760b89985e8b5abe4ba10c90d6286ee6b80952bd021f3f602bb2809a82431"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:820-830 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:834-844 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":820}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcb214dd48b440205d642a8dc6cb7a641fcb43c5988464edac9001be6e62f64a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1727-1737 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2614-2624 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1727\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1727}}}],"partialFingerprints":{"codehealthFindingId/v1":"015178518795295f57b663e39ad9401293e0022a54a4dd76be8a14c73d248628"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2553-2563 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3418-3428 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2553\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2553}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2ae8f656a28a32f69bf67c342b0fffe18b73101653c31805edd346cfed8dc91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2762-2772 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1267-1277 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2762}}}],"partialFingerprints":{"codehealthFindingId/v1":"51a67f45e9858307232f74530cb7c16d6caa26d8c27892cdfb8ad02fcdc64d36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1224-1234 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1237-1247 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1224}}}],"partialFingerprints":{"codehealthFindingId/v1":"edf89421f3f54d65e3455a45b691475f968c89cbef451fefda82d3648d446b5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2376-2386 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2408-2418 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":2376}}}],"partialFingerprints":{"codehealthFindingId/v1":"58aa9858db4af05385d34e5384eec50c8696f62386883dd888c3c6f4162de971"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:288-298 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:303-313 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:288\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb0d9cd0356f186a2001819d9f19a74ec33bdf91925d2b72c474e6ff4a2c8d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:558-567 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:683-693 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:558\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4043150c50c40e30670e94e6d7c6e7e743c3fc6c9f8fde40ef8a29d5480c387"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:232-242 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2033-2042 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:232\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"74c8cd0b510ea7f74e3d8b5a27060187721f7b27f1255aa0a832db266273b4e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/LoadedDmg.java:46-56 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/LoadedIpa.java:45-55 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/LoadedDmg.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/LoadedIpa.java\u0060 as WHOLE FILES: 94% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/LoadedDmg.java"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"c182e6ceda6720603a2018bb927eb05378b795e25f6af7f2094dc6a57f7af5c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:480-490 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:495-505 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:480\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"713addd90d93309d4f242b3cebc0d6a74d8cd4678ff64bc1adf5f6b56c102ad0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/Objc2Category.java:23-33 | unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/Objc2Class.java:50-58 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/Objc2Category.java"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"a30dffdab7b68e7806881d0e92df40523b566b9967787d30f17ec954a9493780"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 39): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:55-64 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:100-109 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:174-183 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:229-238 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:669-678 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:709-718 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:749-758 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:782-791 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:926-935 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:963-972 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1006-1015 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1118-1127 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1302-1311 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1460-1469 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1544-1553 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1617-1626 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1959-1968 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2073-2082 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2160-2169 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2342-2351 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2403-2412 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2474-2483 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2719-2728 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2741-2750 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2766-2775 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2803-2812 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2840-2849 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2875-2884 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3004-3013 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3043-3052 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3066-3075 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3096-3105 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3172-3181 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3221-3230 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3274-3283 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3299-3308 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3376-3385 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3512-3521 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3566-3575 \u2014 all 39 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:55\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1627\u0060 calls \u0060getPointerArg\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:239\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9ad4ae349466f5bf70bc759f77376134ea0d4874b1935ca60ebc810dbcf4d50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 38): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:50-59 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:95-104 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:172-181 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:234-243 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:678-687 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:739-748 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:772-781 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:933-942 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:970-979 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1006-1015 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1148-1157 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1332-1341 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1507-1516 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1590-1599 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1663-1672 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2007-2016 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2197-2206 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2239-2248 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2421-2430 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2481-2490 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2552-2561 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2749-2758 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2783-2792 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2805-2814 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2842-2851 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2883-2892 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3069-3078 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3097-3106 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3133-3142 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3156-3165 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3186-3195 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3262-3271 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3311-3320 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3364-3373 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3392-3401 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3475-3484 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3611-3620 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3665-3674 \u2014 all 38 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:50\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1673\u0060 calls \u0060getPointerArg\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:244\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d219f07e0ff761d667b029672ff2e63e73101d05855608f6e3119a0c27fffee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 14): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1758-1767 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1857-1866 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1969-1978 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2025-2034 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2083-2092 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2125-2134 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2170-2179 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1806-1815 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1880-1889 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2017-2026 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2091-2100 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2165-2174 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2207-2216 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2249-2258 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1758\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1758}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d9f6ca29423cfbdd39346fca31a67789e7f529b154a33c2bc318b9fc241ed30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 11): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2243-2252 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2277-2286 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2306-2315 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2336-2345 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2365-2374 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2405-2414 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2921-2930 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3087-3096 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3116-3125 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3146-3155 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3175-3184 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2243}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5b2d0648645c9c6d128435188edb94fbd82916b7dd2d3859deb2f1ce35f74a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 9): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:309-318 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1572-1581 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1644-1653 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1670-1679 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1699-1708 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2430-2439 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2500-2509 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2525-2534 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2553-2562 \u2014 all 9 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:309\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"37d64f611945f543e1c29ad36cdb726e75f803849b393ff3c0df48da073badf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 8): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:317-326 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1618-1627 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1690-1699 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1715-1724 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1744-1753 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2508-2517 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2578-2587 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2930-2939 \u2014 all 8 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:317\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2576\u0060 calls \u0060setStaticIntField\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1688\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3f4008648632e08b3db5d5798f91103680e50fe97181ae79a725afd4344d966"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 8): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2039-2048 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2428-2437 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2458-2467 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2849-2858 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3238-3247 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3268-3277 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3349-3358 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3528-3537 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2039}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef8ec7685da32a0be21cf76d9bef1afd8ff6c294e96cd7feb8b88e865f021535"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 8): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2488-2497 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2578-2587 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2607-2616 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3298-3307 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3323-3332 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3443-3452 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3464-3473 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3487-3496 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2588\u0060 calls \u0060calculateSize\u0060, \u0060allocateAllImage\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2498\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2488}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e7304de86ae7e122760ceb9a2cb70b657163fca66f14a2dc85aa22abebb1fc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:238-247 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:351-360 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2753-2762 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2787-2796 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2809-2818 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2824-2833 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:238\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f364085c78b606eecd2065bd8445b3b14af80711d7465312bf6a9b089dd7bea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2958-2967 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3209-3218 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3229-3238 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3285-3294 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3338-3347 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3415-3424 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2958\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3337\u0060 calls \u0060requireNonNull\u0060, \u0060setData\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2957\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":2958}}}],"partialFingerprints":{"codehealthFindingId/v1":"f18073946a5df13ad0bb2fb27fc2d3a59f547bd0152354d8a0155fbca27dfe07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3018-3027 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3034-3043 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3057-3066 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3080-3089 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3496-3505 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3018\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3018}}}],"partialFingerprints":{"codehealthFindingId/v1":"03d42bacbec68802fda380c85147b9ed0e5c8ccb21c78d359e2503a3a0fd7a3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3119-3128 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3139-3148 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3195-3204 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3248-3257 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3319-3328 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3119\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3119}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbf9024793fdb76f8052d35d88c47c7098e73b96cd0410ab1983812f9e13608a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:61-70 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:123-132 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:223-232 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:334-343 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:61\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e1c6853e92e3df9572bba674f2952dcbe5bd8550ab82c991fb517200e5631dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:245-254 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:276-285 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:299-308 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3406-3415 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:245\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"6764d321c100b047f5996d77ffe7b9afe300e20e6c2c422a4c52f30dfa483ee8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:186-195 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1773-1782 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3115-3124 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3436-3445 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:186\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"7490f0b0eeb5a0bde9fc57806cc90d512ff8dc855e95642f0fd0df4632832093"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:250-259 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:284-293 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:307-316 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3505-3514 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:250\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b8f0fa525a67cda4a81f4cfd9a51287bdc667fe425ed6e526e9ef0714151de7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:257-266 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:324-333 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3516-3525 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:257\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e0b94ec5bc9aec6b6c9abd3b68e6f6f79c034ac3ac24dc720a15f43d4468f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1725-1734 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3022-3031 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3337-3346 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1725\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1725}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd7a26e2b3fddfbcb334d0c5c7c0e4a17faa417292fa738aa6b94b3b09e8089c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2601-2610 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2939-2948 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3004-3013 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2601\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2601}}}],"partialFingerprints":{"codehealthFindingId/v1":"381817b1c7abd1ce0b0a895389fc79b66885a288cf601ec3a3bf7238951b076a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2726-2735 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2810-2819 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2825-2834 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2726\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2726}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fd4ad39c4519d4346225dd7e65f9275b9c32972e388faff37b65edd2139aac5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3156-3165 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3191-3200 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3212-3221 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3156\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3156}}}],"partialFingerprints":{"codehealthFindingId/v1":"451dd74863e987e41f826bf2d10231a8bb18dc7c0bedb88080f23be8385526b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3290-3299 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3315-3324 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3333-3342 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3290\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3290}}}],"partialFingerprints":{"codehealthFindingId/v1":"4be61330860a7eaae80e24bf76c30a72817b4166a93c7fd4098b54f1ec6f27a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:262-271 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:332-341 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3615-3624 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:262\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3ea8d670c38e04d15f6242e157debde54b44294725b98b628ab5f4eccfa0a73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3246-3255 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3281-3290 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3302-3311 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3246\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":3246}}}],"partialFingerprints":{"codehealthFindingId/v1":"09cd612d27b03ef6c75e0d21190a6b0db6192799e888aaba820f9000125cf086"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3383-3392 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3411-3420 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3432-3441 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3383\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":3383}}}],"partialFingerprints":{"codehealthFindingId/v1":"13a045fdcd124d54ea66c525547cb01213e561f0c06d91cb40ed7facc90b636c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1943-1952 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3659-3668 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3756-3765 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1943}}}],"partialFingerprints":{"codehealthFindingId/v1":"50a3f41c595d4116c21e8bf2eb5f7d5a3c28c19fed888b45a9df3cb8acdbaae7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:93-102 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:105-114 \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 \u0060backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:93\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"253e4ddaa1c1bffc83a4226d27c3c0a841b214e241c4cbf275016c967b9bf06c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/file/linux/BaseAndroidFileIO.java:36-45 | unidbg-ios/src/main/java/com/github/unidbg/file/ios/BaseDarwinFileIO.java:449-458 \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. 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":"unidbg-android/src/main/java/com/github/unidbg/file/linux/BaseAndroidFileIO.java"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fc67c8b258939d3fa45632855eeee2bb04b7d554cf42c904c2256ccd0276c7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1052-1061 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2073-2082 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1052}}}],"partialFingerprints":{"codehealthFindingId/v1":"346314697e5087a0df7d1a85995b902572e267aa6263f63a6b690ee6eb85939a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1494-1503 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:955-964 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1494\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1494}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0336c74dea219eb1f26bd03c2ce9ce73ebfbf01a4a6cd60eba156d559b48e04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1708-1717 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1203-1212 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1708}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe860f96830cb00383b1bf4f9ed64eeff923c5c5e2c34aec5f17da14a4a6a442"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:721-730 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:885-893 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:721\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":721}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e5f4f4acd673ad79fe6054aff02dd87402cbec7fde9987d920c412e0a06dda8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:864-873 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3970-3979 \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. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"bef9f90a28f110f4f44e4cdd4b9db690d9b08b26239f39db79b4a754209f7676"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:818-827 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:852-861 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:818\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":818}}}],"partialFingerprints":{"codehealthFindingId/v1":"449a87f874d89da68554dbe428d5c9317759e811ef29de8d022ab37ff6d8ac80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:235-244 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:299-308 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fc3b6de85ec0e8093d0f2e7a7f11127ce33b61151ad6eb65b7f83cf5b191e69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java:39-47 | unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java:50-59 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java:39\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a33a71b46fc0b6ed8c26edcbe56050c2bd49e6651cac62aebd7696005ec6463"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/URLibraryFile.java:56-65 | unidbg-ios/src/main/java/com/github/unidbg/ios/URLibraryFile.java:55-64 \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. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/URLibraryFile.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"31dcff619c013f3798969e0ff413c869d27604f831f2720ae2aea0bc09936a51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:181-190 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:179-188 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:181\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"caaf85a84535bd91e16b081f550dbe6e5bcf986d0b3e9d20c2a4e448daa2b61b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:236-245 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:241-250 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:236\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"78005c5e7adcde5f0d645d272f4b63df1693f76888a3c57fe3ffda613372b83e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:248-257 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:253-262 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:248\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"97ee85eb90ae9ff0cc41f67f0919f3ed0f79a0eccc3d1c242dd3264fe17272fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:302-311 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:310-319 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:302\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a172c1682379b2ca0afbfcf5c9d39b689d20807fe6ce71aff0f1511d4ec9772"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:346-355 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:354-363 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:346\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac4cf699612d096b6909d75aa26ec87d3b45870d6ad622c69aca30610d38b9c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:889-898 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2044-2053 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:889\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":889}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb971db8d620f4353c2251bb46434493389677733445fc720bf4a1aafa47a8a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2773-2782 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2788-2797 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2773\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2773}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b6e7fa8a7c352d2424f3efe521bd6bc5667ed7046f2c7bf8a6a74e90ab6a509"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3342-3351 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3441-3450 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3342\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3342}}}],"partialFingerprints":{"codehealthFindingId/v1":"27343ad4ed529b43a65736c8dde8897d3721a3636baa09e8b019ac9a44ce0d8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3444-3453 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3468-3477 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3444\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3444}}}],"partialFingerprints":{"codehealthFindingId/v1":"18a7a8c27595dd46987387bf97ba30b07ad8891107c02ddd5938e2a7f2557820"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2643-2652 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3027-3036 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2643\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":2643}}}],"partialFingerprints":{"codehealthFindingId/v1":"b792fa0fc66eec43b0fbd3bd42d306eb369efe6663756be3265e7791c92e9dcd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3543-3552 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3567-3576 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3543\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":3543}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e8f47e2eb4dbb38378a36239bcffbcf39bec97db346759c4081389f5b3c8f64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:234-243 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:251-260 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:234\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"d175343c85f179e6e76222a737328d141d7a5226c7c5782f9333c2620f4be2c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:268-277 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:285-294 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:268\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0eed44d632672ed387185c623ca798a196b1014cc44fd7fc520a0892a199a42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:302-311 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:370-379 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:302\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0dfed053ebdcc71796b1fb4c0f7452cebee90a42dcee1006552cc79efabfe8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:387-396 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:404-413 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:387\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"97909ccdc4e40754c5af78b086c0870fb066e8eaecf59edb13f27e01d7c5240b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:422-431 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:439-448 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:422\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c355db4901a5acd4ce6a88863c53d56aef944853d51ee3d87b7cc9361a20b5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/DirectoryFileIO.java:51-60 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/DirectoryFileIO.java:30-39 \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. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/DirectoryFileIO.java"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2255aeb39a631d0d2316dddbf229ec6e43e7e0cd813fcd22ed68c0b1fdb29e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/RandomFileIO.java:18-27 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/RandomFileIO.java:18-27 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/RandomFileIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/RandomFileIO.java\u0060 as WHOLE FILES: 82% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/RandomFileIO.java"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"73e5784bca04c0817d8177ca868c6598221d59d012f3b97a457244d08defda55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java:34-43 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/UdpSocket.java:27-36 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/UdpSocket.java\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2218b1296114cc749e28edf9ce513b5b9408c2c1a3ea915667ae3b3be9ebc2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/net/fornwall/jelf/ElfFile.java:194-204 | unidbg-android/src/main/java/net/fornwall/jelf/ElfFile.java:208-218 \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":"unidbg-android/src/main/java/net/fornwall/jelf/ElfFile.java"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd3c97101ead7dbf1556591a1b10ee9d1e7f0db6e6e61815dc6ad4b7977838e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:511-520 | unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:538-547 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc36127e8c0ba9605325999c26c91863dda04ad1f014897b7ed07a27bb0c441c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:808-817 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1802-1811 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:808\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":808}}}],"partialFingerprints":{"codehealthFindingId/v1":"508937c294fce7869835423b233ce6f66759e886d21a55715c6935c5efae9dc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2171-2180 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3051-3060 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2171}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd1da0708080c72984f86d37801a5237159c8da0e08ae066c690d59156b3911d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2720-2729 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3923-3932 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2720\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2720}}}],"partialFingerprints":{"codehealthFindingId/v1":"950393d4da933858af4f1d750486fd5509e1ae9c9872316c322f4d6bab1e3a56"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2805-2814 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1023-1032 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2805}}}],"partialFingerprints":{"codehealthFindingId/v1":"9491d566f747b161a16130d8a2ca2bdcdc5acc96f64848de2546742f19cb4d21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:733-750 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:756-773 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2467d92a1b78e7c71681b826a70d70096e350738cca554126346c9055b56724"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:703-712 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:730-739 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":703}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d79304e846899d181ab2320b1d4e7daa08fa4df90dbadcbcdd95282172b4c3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java:65-73 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaLoader.java:75-84 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java:65\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3af0bc636a03b608575974f5d08a7abc302fdd21a04aa8e398c1d287ce0e75e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/BundleResolver.java:44-53 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/NSUserDefaultsResolver.java:29-38 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/BundleResolver.java:44\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/BundleResolver.java"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bebf65e437929324f15bec7b24fa11cc0cb649749ef9a77a21a2d1514a1b916"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 30): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:408-416 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:433-441 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:546-554 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:572-580 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:623-631 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:649-657 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:682-690 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:743-751 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:801-809 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:827-835 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:878-886 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:904-912 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:937-945 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1010-1018 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1065-1073 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1091-1099 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1152-1160 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1336-1344 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1368-1376 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1594-1602 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1824-1832 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1849-1857 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1898-1906 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1923-1931 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2035-2043 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2060-2068 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2109-2117 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2134-2142 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2292-2300 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2485-2493 \u2014 all 30 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:408\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:417\u0060 calls \u0060get\u0060, \u0060toIntPeer\u0060, \u0060getMethod\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:555\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"f990630c7c6cd14535a37f9880e83a622d69262280e4f4917a749bf3ff4dc01b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 23): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:319-327 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:521-529 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:598-606 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:776-784 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:853-861 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:974-982 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1040-1048 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1425-1433 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1449-1457 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1473-1481 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1511-1519 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1535-1543 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1559-1567 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1800-1808 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1874-1882 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2011-2019 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2159-2167 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2201-2209 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2243-2251 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2342-2350 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2365-2373 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2388-2396 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2425-2433 \u2014 all 23 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:319\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfcee5f19e76ba6e4af43146a3634c67f4882b4e8fadca3a794648dae30f24d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 22): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:623-631 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:649-657 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:682-690 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:722-730 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:762-770 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:820-828 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:846-854 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:898-906 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:939-947 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1044-1052 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1070-1078 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:632-640 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:658-666 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:691-699 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:752-760 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:810-818 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:836-844 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:887-895 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:913-921 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:946-954 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1074-1082 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1100-1108 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:623\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":623}}}],"partialFingerprints":{"codehealthFindingId/v1":"865432685fff0c518ae6bf193444c54a48d094ae0cc7dcad5fc80917a8dc35d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 19): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:311-319 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:512-520 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:589-597 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:786-794 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:967-975 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1010-1018 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1395-1403 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1419-1427 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1464-1472 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1513-1521 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1752-1760 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1851-1859 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1963-1971 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2077-2085 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2164-2172 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2263-2271 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2286-2294 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2309-2317 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2346-2354 \u2014 all 19 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:311\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e887b041193c6fc1439726c333c81e0454c144ee12865c0b38f66749d89f2fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 12): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:520-528 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:597-605 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:794-802 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:871-879 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:975-983 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1018-1026 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:529-537 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:606-614 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:784-792 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:861-869 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:982-990 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1048-1056 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:520\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d8537c9767cc3ff654d0940d8efc6b02079974ced80c39df90b275fc1594579"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 12): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3100-3108 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3121-3129 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3141-3149 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3176-3184 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3197-3205 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3225-3233 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3250-3258 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3278-3286 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3303-3311 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3321-3329 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3419-3427 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3448-3456 \u2014 all 12 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3100\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3100}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffdf1accce98dd9562b2c1fb6710e9b66008db9006094a98ff00d819576ad98e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 12): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3190-3198 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3211-3219 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3231-3239 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3266-3274 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3287-3295 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3315-3323 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3340-3348 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3368-3376 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3396-3404 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3417-3425 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3518-3526 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3547-3555 \u2014 all 12 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3190\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":3190}}}],"partialFingerprints":{"codehealthFindingId/v1":"edd795627fdf0b0165e56dd151ecbf9a047a612c197b911dd337212cdcc8fc6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 10): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2280-2288 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2309-2317 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2339-2347 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2368-2376 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2408-2416 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3090-3098 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3119-3127 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3149-3157 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3178-3186 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3218-3226 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2319\u0060 calls \u0060getPid\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2348\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2280}}}],"partialFingerprints":{"codehealthFindingId/v1":"90e8aef99297171c878faddf2c51c14992cdb7838bffdd0f460fd9eaa8584e78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 8): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1577-1585 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1624-1632 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2435-2443 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2481-2489 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1623-1631 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1670-1678 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2513-2521 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2559-2567 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1577\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1577}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ab6dc67d5d011e335d28fb65b73219502cc3f091905343c30084a9603fa8830"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 6): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3008-3016 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3024-3032 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3047-3055 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3070-3078 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3339-3347 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3486-3494 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3008\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3008}}}],"partialFingerprints":{"codehealthFindingId/v1":"38b1ea2e4a3508dea62ddda26fb93a2ed86f7441bd37e9026486263dc17651ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 6): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3101-3109 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3117-3125 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3137-3145 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3160-3168 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3438-3446 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3585-3593 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3101\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3110\u0060 calls \u0060isDebugEnabled\u0060, \u0060debug\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3126\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":3101}}}],"partialFingerprints":{"codehealthFindingId/v1":"376115611225932cbf778081bdca4b277a6a1e2c5b9cd25800a969c91f96bf51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 5): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:977-984 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1373-1380 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1493-1501 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:935-943 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:954-962 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:977\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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1369\u0060 calls \u0060reg_read\u0060, \u0060intValue\u0060, \u0060register\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:976\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":977}}}],"partialFingerprints":{"codehealthFindingId/v1":"db14d8685e5d8ae6c51c19d4e9e7d1d9d397b6ff32137caa8c75227cb40bfbba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:260-268 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:327-335 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:265-273 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:335-343 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:260\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"b785c32990efcfbe794a9933cc7d6ae39f386efa9b71a932840ecf394ce552a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2598-2606 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2623-2631 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2936-2944 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2966-2974 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2598\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2633\u0060 calls \u0060printf\u0060, \u0060getLRPointer\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2975\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2598}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d8c76a53c21735f3a54d9f89975272876918564df08f6133f57110f5a4bcd45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2861-2869 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2875-2883 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2899-2907 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3082-3090 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2861\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2896\u0060 calls \u0060isDebugEnabled\u0060, \u0060debug\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2874\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":2861}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e3a5a6ce144212684ec8a721695db354138bae592841d2ff74026fe219a8e28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): unidbg-ios/src/main/java/io/kaitai/MachO.java:2384-2392 | unidbg-ios/src/main/java/io/kaitai/MachO.java:2408-2416 | unidbg-ios/src/main/java/io/kaitai/MachO.java:2444-2452 | unidbg-ios/src/main/java/io/kaitai/MachO.java:2462-2470 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/io/kaitai/MachO.java:2384\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":2384}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9f340130c155daa3924da1c33889ae86f42ce98108be9a2d4df7f3ad20be7ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:779-786 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:990-997 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3998-4006 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:779\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd321f73b4eb042044b9f1488a4a9061d171d124042857e6d88b93a5168fc0d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2856-2864 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2891-2899 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3484-3492 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2856\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2856}}}],"partialFingerprints":{"codehealthFindingId/v1":"f123b47d70f7a943493b87a73d25f46cfc8a9ba6b4e0d4140e2e610a8f5b9234"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2867-2875 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2888-2896 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3481-3489 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2867\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2867}}}],"partialFingerprints":{"codehealthFindingId/v1":"f39987f79f24e6da390e2b17995fadaa5550dd51685b4d8018d36277130e3e40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3247-3255 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3318-3326 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3336-3344 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3247\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3247}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d2c5c90488f188e74dcc751e889435e472906e7ef1106c531b70bf7675c6856"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3337-3345 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3414-3422 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3435-3443 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3337\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":3337}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9f44584e39bb43fe8e6584c8a855e5d1c0cdda679c7f85c2fb6f10763182334"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/file/RandomFileIO.java:21-29 | unidbg-android/src/main/java/com/github/unidbg/linux/file/ZeroFileIO.java:17-25 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/RandomFileIO.java:21-29 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/RandomFileIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/RandomFileIO.java\u0060 as WHOLE FILES: 82% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/RandomFileIO.java:21\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/RandomFileIO.java:20\u0060 calls \u0060randBytes\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/ZeroFileIO.java:16\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/RandomFileIO.java"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"95e2eca0e99b0013ac9a75305666d2284904bda1a46e52d1a20223878b9a5186"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java:55-63 | unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java:55-63 | unidbg-ios/src/main/java/com/github/unidbg/ios/thread/BsdThreadCreatePatcher64.java:66-74 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/thread/BsdThreadCreatePatcher64.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ff2682077778d994ea4bd7c8153a460f9917a0ae7f4d3456182bd7d18d7176d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:54-62 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:72-80 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:90-98 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:54\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2bbe647934e5bde5f1cd10aa912401b32852f647b3b8c51ff2055117ab616c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:229-238 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:204-213 \u2014 before extracting anything, compare \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"94f94b49fa53ff18d82b33fd4426fdc8abe97ad9b30a34a32d2c2e268d007256"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:100-108 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:162-170 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:100\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"b60eb8a6ab509b69b0cbc79e0cd676f815e74bf6beb7485cb054cc9340516bbb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:110-118 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:172-180 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:110\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"60a5f10260d94c08a73629225fcfcf0c99af6cc23bee32da15edda52222c3504"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:942-950 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:649-657 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:942\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:939\u0060 calls \u0060isDebugEnabled\u0060, \u0060debug\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:648\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":942}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d749094ca7fc8c72ec6cee1983ded389ccc2a39fb8a2b4b67cc2ffce1bbcd85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1053-1061 | unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:525-533 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1053}}}],"partialFingerprints":{"codehealthFindingId/v1":"9454b0f76c4d72a3baa820308a1d0d853efc8b3f9a634618ca710998f9fc6237"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1203-1212 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1455-1463 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1203\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1203}}}],"partialFingerprints":{"codehealthFindingId/v1":"45e8bff01a427bfe942f582546d7dbc6c2efdba0c833e2d74e32014ec985ef0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1459-1467 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:889-897 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1459\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1459}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef454578eb908878d5d0ae2f3f5e8b0bfebff75b8297ccaac33eaf46dba1c48b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1734-1743 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:361-370 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1734\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1734}}}],"partialFingerprints":{"codehealthFindingId/v1":"3482a3fe6396532c04f143022b4ff3157a478693990ed9c8d1bbec1c818857d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:91-99 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:168-176 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:91\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a5a94fb9525df704d96ecafc38efcf254bdeb3cb8dc1a9f1412f6f225792201"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:101-109 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:178-186 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:101\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"57adc03618b0c9495449c9929eaa0ba12dcf0f70b3cb6d5c5265af54a395e449"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:439-447 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:873-881 \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. 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 \u0060emulator\u0060 to \u0060Emulator\u003CAndroidFileIO\u003E\u0060 in one and \u0060Emulator\u003C?\u003E\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"5948891970a94ca808e7c3f371086d5a904ad7511dbfc7e89eb9271611d334de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1374-1382 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:504-512 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":1374}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dd778984d945d7403115713abaf1ffe3f606f9888da9101ad3cbd46e9542a5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:597-605 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:616-624 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:597\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":597}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb466cac55950051e4d54404a78ab3f872486e5df74e5b81b2de2125e14a4471"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:228-236 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:256-264 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:228\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"eed5d9f2356e5b1e123829da9f3e619051d3c1d506ee7d13da0e89f4f38fb926"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:272-280 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:336-344 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:272\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f7782be179f882fd382bb7f88ae897e50de569312734a6b1d7b198babc5bac5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:68-76 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:252-260 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b94c5bcb1719c04d494896fbeb296e7df031fbed4c33ec41bf1f82c7bcccc56"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:292-300 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:320-328 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:292\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3a331d71edd3d004d704e862eecc3613ce77ffadef2199a4ab12906d34e0479"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java:65-72 | unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java:75-83 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java:65\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"d009b8379cf70e0a972e1f05896e96a322dd190a4764fa75fd94becdb236f374"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:104-112 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:376-384 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:104\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f03db76969794e4a0676ecfbe2d6840707820356284c96696ba672375c3b64a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:200-208 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:205-213 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:200\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"edcb5a36ce6df082c4dc812b14938c5c238e4f42048b3e7b61b129a03522c8ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2882-2890 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2890-2898 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2882\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2882}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8b7c866d208bfda48abd7d20dc0c2e3ff62966e79a589e2091e6bc45c67b3ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2917-2925 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2996-3004 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2917\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2917}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4650a8513031bd8a1121d51f57494385f1423ef164ee992651c5c6f3f7ef9be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3237-3250 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3327-3340 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3237\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3237}}}],"partialFingerprints":{"codehealthFindingId/v1":"142f9f5b8d2b8febb7581d0e442b4cdcac91383744c692b55b20f6b9971aeb94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3475-3483 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3574-3582 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3475\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3475}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7aa74a1c47ce02bad5e8b8adc7aeb56f3832cca7d0baa416465ed15e8e4d2ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3602-3610 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3701-3709 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3602\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3602}}}],"partialFingerprints":{"codehealthFindingId/v1":"08fa3df9662bce322fd0f4f8a0fdfe0efa8e4e5de512da6c5273c222eee5a94c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3885-3893 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:4006-4014 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3885\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3885}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c5a9a164708f6a65aff6dd59deccaba6453439d6c3b5da6683d413d4372bad9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:99-107 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:384-392 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:99\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcd72e5e0809cec1f0d526af9b6a433eba0a218d00071358865be71fc862dea6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2622-2630 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2647-2655 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2622\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":2622}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc2696fecef8cae01fe3a607fd6e5a5935d15f84b3015b74e32d981210e7d27e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2982-2990 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3061-3069 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2982\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":2982}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dad4f5be9adf8e7691bd0eca6011b3266f7f7a66fbc987d52bbc35c19cdc9c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3001-3009 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3031-3039 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3001\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":3001}}}],"partialFingerprints":{"codehealthFindingId/v1":"34303f8bd3097bc4ce66dd94709203767b029f9f884f8cdb2151d85e7a21c24c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/DirectoryFileIO.java:87-95 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/DirectoryFileIO.java:122-129 \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. Note first that the copies are not typed on the same thing: \u0060Dirent\u0060 names \u0060com.github.unidbg.ios.struct.Dirent\u0060 in one and \u0060com.github.unidbg.linux.struct.Dirent\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/DirectoryFileIO.java"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf7717d61d649f56414eeafbc25345752cf86265bb495ed6ef43d137fc6b955c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java:118-126 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java:222-230 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060StatStructure\u0060 names \u0060com.github.unidbg.file.ios.StatStructure\u0060 in one and \u0060com.github.unidbg.file.linux.StatStructure\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcf762526e8e774ff0a4929327c13e6cbedd8204fede97c9e30bb22e96e7b7d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:267-275 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:695-703 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:267\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"deba71cab10d03b50248eb19c1773b8e2a1d47fa89757a6ce8e1b120860c6d49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java:43-51 | unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARMDebugger.java:44-52 \u2014 before extracting anything, compare \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARMDebugger.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java:43\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, \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARMDebugger.java:43\u0060 calls \u0060isThumb\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java:42\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca05579ced76ca679e416ab21787e3f9673b6507a452049150e15ac46fbd9916"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java:511-519 | unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java:529-537 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java:511\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":"unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"14ec9edd25982707daae55866cb9c7afb639edf3213c01c4fa1a85d713a72fd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:173-181 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:179-187 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:173\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ec5a50d2aabde1bca097769e8a8b2dc0bce8f6b0a8e713ed7e9f3d40c73efd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:612-620 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:640-648 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f5fe9e50bd1775260980cada43cce311de9ec8786cdb06ffab26f292f858125"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1210-1219 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1721-1730 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1210\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1210}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc71c315cdd2c31cf729962b60210112bfe4e4abfbdcfce93d119ac2c512e34e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1635-1645 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2270-2280 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2269\u0060 calls \u0060SockAddrDL\u0060, \u0060share\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1634\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1635}}}],"partialFingerprints":{"codehealthFindingId/v1":"fca4cc9a2357b58ef30083bf3a4265570eb360fd545afa2b317674195642c0a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1399-1407 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1422-1430 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1399\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1399}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1365f165033907f9ed22b55bf7ae78bf823b78c692d3c0dd70c2aae5cdc172f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:384-392 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:478-486 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"407a55579ba0385afad25e809240ac7807b89279b6719cde7ef471c188ee140f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1700-1708 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:579-587 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1700\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1700}}}],"partialFingerprints":{"codehealthFindingId/v1":"0287f067db67bc41ecd4168dd6f4f7d688e676143c643c1ba41d15eacc0290fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1883-1891 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:1105-1113 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1883\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1883}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb8729c6971f9a26118a8ce5107dc6b305d303ca371e9de78e79717b8fb767a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:796-804 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:810-818 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:796\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":796}}}],"partialFingerprints":{"codehealthFindingId/v1":"142876524d1b468fa07db2faa84420838163c9c364b790e085d3399688c9df09"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLibraryFile.java:56-64 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaLibraryFile.java:57-65 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLibraryFile.java:56\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLibraryFile.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"1320969d886657eed4faa512254d73e8a1eca5f835d45904824908adbdef7641"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:542-550 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:560-568 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:542\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"865609362936a32f53179e871a04a072f1a95ea2439f1d0f317447ef34ebf6df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/service/Security.java:38-46 | unidbg-ios/src/main/java/com/github/unidbg/ios/service/Security.java:61-69 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/service/Security.java:38\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/service/Security.java"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceb3cf47617267fa75934cb16266d67c519d4eb638002106f57ced1472778158"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 30): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:400-407 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:425-432 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:537-544 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:563-570 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:614-621 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:640-647 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:673-680 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:713-720 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:753-760 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:811-818 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:837-844 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:930-937 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1035-1042 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1061-1068 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1122-1129 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1306-1313 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1338-1345 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1548-1555 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1646-1653 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1701-1708 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1776-1783 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1801-1808 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1826-1833 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1875-1882 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1987-1994 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2188-2195 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2213-2220 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2407-2414 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2502-2509 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2555-2562 \u2014 all 30 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:400\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:409\u0060 calls \u0060get\u0060, \u0060toIntPeer\u0060, \u0060getMethod\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:546\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab5ba78b87d1fef5c9be117542a0d736422e1ad74aca78d40b8bf5fc2bc07046"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 24): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:620-627 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:646-653 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:679-686 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:719-726 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:759-766 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:817-824 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:843-850 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:895-902 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:936-943 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1041-1048 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1067-1074 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1554-1561 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:629-636 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:655-662 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:688-695 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:749-756 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:807-814 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:833-840 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:884-891 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:910-917 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:943-950 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1071-1078 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1097-1104 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1600-1607 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":620}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0006aad2877e08c9a55eab21515c5cba52e411a67d869188140718978ee01a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 18): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1861-1868 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2069-2076 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2204-2211 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2243-2250 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2277-2284 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2306-2313 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2336-2343 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2365-2372 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2405-2412 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2782-2789 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2882-2889 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2921-2928 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2952-2959 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3087-3094 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3116-3123 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3146-3153 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3175-3182 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3584-3591 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1861}}}],"partialFingerprints":{"codehealthFindingId/v1":"de9bdc0a789177df56c679607ad937b16dc312996f5765c59ba4696e2c068326"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 13): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2119-2126 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2488-2495 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2578-2585 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2607-2614 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2999-3006 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3215-3222 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3298-3305 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3323-3330 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3443-3450 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3464-3471 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3487-3494 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3696-3703 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:396-403 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2588\u0060 calls \u0060calculateSize\u0060, \u0060allocateAllImage\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2498\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2119}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b26ccbb7d013127f1faea6607d117e3900a6e20d517922f3ecbb978aa30d8fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 10): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2271-2278 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2294-2301 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2317-2324 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2354-2361 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2377-2384 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2350-2357 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2373-2380 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2396-2403 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2433-2440 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2456-2463 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2271\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2271}}}],"partialFingerprints":{"codehealthFindingId/v1":"350fd6e287dcdcf57239246ee2a584a368142a830b5988994d18bf2625210e8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 10): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2441-2448 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2487-2494 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2512-2519 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2540-2547 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2565-2572 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2519-2526 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2565-2572 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2589-2596 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2917-2924 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2945-2952 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2441\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, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2527\u0060 calls \u0060valueOf\u0060, \u0060setStaticBooleanField\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2573\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2441}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8710033ec9a1c1c6bfe58c114d7d79ea0c7c79e262fb3211726f1567daadde7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 10): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2039-2046 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2428-2435 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2458-2465 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2849-2856 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3238-3245 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3268-3275 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3349-3356 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3382-3389 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3528-3535 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3728-3735 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3538\u0060 calls \u0060nativeValue\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3737\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2039}}}],"partialFingerprints":{"codehealthFindingId/v1":"40ea0b26f0c449d1591afbf066f07c807d6214048162a6b145bd8d1c714f1aff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 8): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:787-794 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:801-808 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:817-824 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:851-858 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2233-2240 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2291-2297 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2309-2316 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2325-2332 \u2014 there are 8 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:787\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:826\u0060 calls \u0060IllegalStateException\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:809\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":787}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a75ed1ba454546afd9b312b5930f5589563804ca32e2e2cc3fa960ba1f80488"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 7): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1206-1214 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1458-1465 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:724-732 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:888-895 | unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:384-392 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2950-2958 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:4119-4127 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1206}}}],"partialFingerprints":{"codehealthFindingId/v1":"68ef39b1bbeca7fb738ff06d15d283b7669ed63f91eb56a33d00ed523adcbc00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 7): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:233-240 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:343-350 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2723-2730 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2770-2777 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2785-2792 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2807-2814 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2822-2829 \u2014 all 7 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:233\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"11865943b02524025d6996ede519be925b4497570c1dbe7d5df3bec2c7542389"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 7): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1828-1835 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2009-2016 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2147-2154 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2746-2753 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2819-2826 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3027-3034 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:432-439 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1828}}}],"partialFingerprints":{"codehealthFindingId/v1":"db91ca60a73699335c2571bee305bb4a182041a3607c2a458241960d7a4c2140"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 7): unidbg-ios/src/main/java/com/github/unidbg/ios/patch/LibDispatchPatcher.java:16-23 | unidbg-ios/src/main/java/com/github/unidbg/ios/patch/LibDispatchPatcher.java:28-35 | unidbg-ios/src/main/java/com/github/unidbg/ios/patch/LibDispatchPatcher.java:38-45 | unidbg-ios/src/main/java/com/github/unidbg/ios/patch/LibDispatchPatcher.java:48-55 | unidbg-ios/src/main/java/com/github/unidbg/ios/patch/LibDispatchPatcher.java:57-64 | unidbg-ios/src/main/java/com/github/unidbg/ios/patch/NewObjcPatcher.java:23-30 | unidbg-ios/src/main/java/com/github/unidbg/ios/patch/NewObjcPatcher.java:32-39 \u2014 there are 7 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/patch/LibDispatchPatcher.java:57\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/patch/LibDispatchPatcher.java:26\u0060 calls \u0060patch64\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/patch/LibDispatchPatcher.java:37\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/patch/LibDispatchPatcher.java"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"245e2061c034f812e7a08aa258e472f299baf948df4e7f5dcb216d36c31eea91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 5): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:543-554 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:569-580 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:552-563 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:578-589 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1016-1027 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:543\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":543}}}],"partialFingerprints":{"codehealthFindingId/v1":"48860e15cd4c3675559d806927b8da723cfc811c42f2e5e3ffcc8f60745e6d47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3424-3431 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3453-3460 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3523-3530 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3552-3559 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3424}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c8a43e2d353485774bb89b5223cdd4073641449f9b1b55531924682638c5b89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:176-183 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:458-465 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2604-2611 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2987-2994 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:176\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cbd3f0b46366eb08b2a88324a29286b20cf51ec3b0aa6f2ff34089ad0941e25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:187-194 | unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:213-220 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:148-155 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:177-184 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:187\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"0213d5cc2b01216cc67979a9e47960c05d80f0eddf0a0bbe03e3ab349b7ff2a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1727-1734 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1774-1781 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2614-2621 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2640-2647 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1735\u0060 calls \u0060setPointer\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1782\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1727}}}],"partialFingerprints":{"codehealthFindingId/v1":"fed4c44e60d70064674b15ff6b8071fc9fe6c72246014e611aa9cb80888ad093"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1864-1871 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2122-2129 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2785-2792 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3002-3009 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1864}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ffa4bf8640f3e18f949d51f5be664351d876204359fbbde647133498dd83c29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:101-108 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:92-99 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:169-176 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:101\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd8238867070e17c776e9aeede8f28d4ddfbd3714299680b803f4ff6bae337d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1051-1058 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1945-1951 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2072-2079 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1051\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1051}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c0fc19ab03428faaac3182eb46b11e7a5197a7ffc355439178837c3c3055577"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1735-1742 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1244-1251 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:362-369 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1735\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1735}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c329e6e7deff33df8347c97db7aecd1373e71d65542732d2660a05930b48591"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:211-218 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:558-565 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:907-914 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:211\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"c71b16a41fd2bed044106d4dd86959f5d237b9dff1040f9f3f959ac4fde40156"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:178-185 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2580-2587 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2922-2929 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:178\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e61d1ee6d2a900512a6a2272fd9d6886cc1f8c361dc644f578b5220eb3bd758"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:257-264 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3516-3523 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3570-3577 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:257\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"13117a912ead831d123fd4cfbd98c89a2a2aa2accf46b6fdf541c38ec81a4ae0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:882-889 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:909-916 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2063-2070 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:882\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":882}}}],"partialFingerprints":{"codehealthFindingId/v1":"1623cccfc7074540ef700de6d56c9be1bfc8ef855f5c490a2358750016a8956d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:262-269 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3615-3622 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3669-3676 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:262\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6175aa73c2f7297bcfb98f198f1bbd11e4820465cf9aee2f91d7e704eeabd36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2864-2871 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2902-2909 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3583-3590 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2864\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":2864}}}],"partialFingerprints":{"codehealthFindingId/v1":"053063fffb5d9d0b8c38aebb7641c4d5a35941955fe15cc6c0016d4d4541aa61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:773-782 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:784-793 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:795-804 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:773\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"203c9bccc934dee7686b75714e4b5a63d160b93cefd33dafa9a67682061ef140"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2072-2079 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2955-2962 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3385-3392 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2072\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2072}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d1ea39012aa40b2b8ad7c7da66e918feec45a2608153d48ddfd80dde73a6c47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1218-1225 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1670-1677 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:543-550 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1218}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef14dce8e488d320edc48d3949f762dc1fad6a01ec56d258bf820edc868a6557"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:395-403 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:409-416 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:422-430 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:395\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"4327eaf6ac6f491a0b1af1387f8f53a01a12f8698f56a287ef6f587aabd36a9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:235-242 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:218-225 \u2014 before extracting anything, compare \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java\u0060 and \u0060backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:235\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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1887864e3b32545f48f74841f54290c012b6e825c142393a7dd243198731ff4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:125-132 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:186-193 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:125\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c1a3b90be23f833347972a63239f876a61bdcbaf7dbf4e803c2ab52ae22c0bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1865-1872 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1391-1398 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1865}}}],"partialFingerprints":{"codehealthFindingId/v1":"307301b5109ff233597624e3ba360c3165890511ae485549d286eb55be3a6810"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1892-1904 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1432-1444 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1892\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1892}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0f9cad6d8788499dfe489a5db8d1018b43c6e813a8e4e25cea40cecf5e397ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:802-809 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:660-667 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:802\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"14d16d492f93ac00c33b12b1b200379721a3b2c6c8d71cf08df572c567201b88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:518-525 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:528-535 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:518\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"a037841bc47301edadb71665147a9a741a93d8f71aed86f3fb04d938168d37c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:267-274 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:568-575 \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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060emulator\u0060 to \u0060Emulator\u003CAndroidFileIO\u003E\u0060 in one and \u0060Emulator\u003C?\u003E\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d486fd503ff72b1fadb2ca44ee69b0bb0d01f9010379d930bee3128cdff3384"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:381-388 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:588-595 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:381\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060emulator\u0060 to \u0060Emulator\u003CAndroidFileIO\u003E\u0060 in one and \u0060Emulator\u003C?\u003E\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"11419c4a5bf1bc299bfe97a50ad732a23286a3ade9343962d0201124aa80da8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidARMEmulator.java:75-82 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:259-266 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidARMEmulator.java"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"35cb51bf3cd6bd22c4565a572cd20ec7a3e89839d16890b79e0113e1b6168c95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:240-247 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:388-395 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"a36e422908b14600c8e112dcfdd4c10e06ba95e64202f685eab18a9f2899e87b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:304-311 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:482-489 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6a7b29b1ff287ba04cf220b256e4c70b0d69a6e23cbc8a11afa93fcb26870d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:133-140 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:355-362 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:133\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f01d544c500a895c3c6af1917a23900ef951007e36ec6df61d2fd007d3f8a19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1506-1513 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2386-2393 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1506\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1506}}}],"partialFingerprints":{"codehealthFindingId/v1":"0575eab3aa3fbddb30b483b67568650f1bc4e2a092188d148b22f4b95986385d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2929-2936 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2994-3001 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2929\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2929}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec8462aeaa90a3566ea47ef4467e31c8faf1b3035e8c12045b6b2803ea664f6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3289-3296 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3382-3389 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3289\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3380\u0060 calls \u0060printf\u0060, \u0060getLRPointer\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3288\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3289}}}],"partialFingerprints":{"codehealthFindingId/v1":"5238f88444ee403188e6240e47666d299d5b5adcca3d02fde724cca3378efb3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3314-3321 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3410-3417 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3314\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3408\u0060 calls \u0060printf\u0060, \u0060getLRPointer\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3313\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3314}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b57162fe2981f88811bab0dc7df5f2e889e3082b0d56c798a9c5ec7100dc877"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3332-3339 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3431-3438 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3332\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3429\u0060 calls \u0060printf\u0060, \u0060getLRPointer\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3331\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3332}}}],"partialFingerprints":{"codehealthFindingId/v1":"a95123c85390ee08834e591f80d1909cf7639c91f76fe4869a627afe6ad8b586"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:128-135 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:363-370 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:128\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f8a59f1b66599b077080606fc39199683f59919d0c0062e8a940f83e0ab96bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2053-2060 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2078-2085 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2053\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":2053}}}],"partialFingerprints":{"codehealthFindingId/v1":"0227d3b4ed73c18863020c33d883cf3f669b08a1922dbefd6c9daf428f08b395"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:50-57 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:64-71 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"69fc2187f78647d0fd2fcc9a59083b9ade54534d752cdb98fea1e4578c9433a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:102-109 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:115-122 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee7972d1b4424a2ce88d6dd4d96d94723b516ba9603fb7790f70c0be83fc6b34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:128-135 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:141-148 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aa03e7e18dee952c6ea5657629ffec4dfb58f1c1d830d80c7a5b9ce602f2533"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:154-161 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:167-174 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaab7cfe9c8013ff9bd7c02fd5dbbe5a0d953cf0b5fb61e436e8b15180ae9726"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:180-187 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:193-200 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"df06df04aaff6c111127b9d402ea823db1a7d77fdcfe794beda5cf92cc454adf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:206-213 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:219-226 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"540f3d744c22b54dd0327500e6c6aa40052de3f167b0e01136a8a9bd745acbdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/DnsProxyDaemon.java:167-174 | unidbg-android/src/main/java/com/github/unidbg/linux/file/DnsProxyDaemon.java:182-189 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/DnsProxyDaemon.java"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"64691d81a16e570c27cae49a44ef197046bcae32137e02178649aed179f4fe4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/net/fornwall/jelf/ElfDynamicStructure.java:319-326 | unidbg-android/src/main/java/net/fornwall/jelf/ElfDynamicStructure.java:335-342 \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 \u0060unidbg-android/src/main/java/net/fornwall/jelf/ElfDynamicStructure.java:319\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":"unidbg-android/src/main/java/net/fornwall/jelf/ElfDynamicStructure.java"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"931959735e24776d12f223d30f314303fc4a633b8f224f36462fb20858de260e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/net/fornwall/jelf/ElfFile.java:232-239 | unidbg-android/src/main/java/net/fornwall/jelf/ElfFile.java:243-250 \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":"unidbg-android/src/main/java/net/fornwall/jelf/ElfFile.java"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"859f11c62664d4400bb45f65a0d04d56855e32de7a864921e278780b0bbebc1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/RegAccessPrinter.java:66-73 | unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:1059-1064 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/RegAccessPrinter.java:66\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/RegAccessPrinter.java"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"d43f2326d0367a29f207e7918ae7981e0a9a3937dc61e86a34518b5ca5899ce6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:1008-1015 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:1026-1032 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:1008\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":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":1008}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfee65f6b7aa8e3522228fe6578262087ef4be2824c5d67dae2f739125f848dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:1214-1221 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:1229-1236 \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":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":1214}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfdc0b48a8e9e3fe52ef18c086da184f5db9a2a190f5485e13587dadcf328b50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/thread/Function32.java:30-37 | unidbg-api/src/main/java/com/github/unidbg/thread/Function64.java:30-37 \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":"unidbg-api/src/main/java/com/github/unidbg/thread/Function32.java"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"787c2fef144d432fb62df9b9532dc2cf57284af7ba3177e2709c033b3f7e61e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:290-297 | unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:576-583 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:290\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":"unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"a966f1005afde149dc61405d2a2438e6c84c4373f19347516ec16556066f3257"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:927-934 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1113-1120 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":927}}}],"partialFingerprints":{"codehealthFindingId/v1":"03422e2190bd85b23993292e3348920a1d960e4590145cac7c036feb1d04a0ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1394-1401 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1889-1896 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1394}}}],"partialFingerprints":{"codehealthFindingId/v1":"350f2e168802c7f323f3deac62f036020b6b240bb3c8d606e14ceddafdc0fb86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1592-1599 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1607-1614 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1592\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1592}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c1f62deb56e8cbe84d13b717cbccf14207732a12fb0e60704c47442e34a03bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:367-374 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:451-458 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"474fff7f59718b42653cfdbf5cc6f2c49dcf43b5ba1aaf3f2d1154e94d2a7beb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/FixupChains.java:66-73 | unidbg-ios/src/main/java/com/github/unidbg/ios/FixupChains.java:86-93 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/FixupChains.java:66\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/FixupChains.java"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"70651504c9b4b81b637822501dc35f8e03949c5e3c1d8ce063f7386deca54228"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:969-976 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:992-999 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:969\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, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1000\u0060 calls \u0060readU4le\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:977\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":969}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9821eef3b057768f4e5a8fa2f685d5f7f330918b56b753d11afc796d22b27cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 46): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:540-546 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:566-572 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:617-623 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:643-649 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:676-682 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:716-722 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:756-762 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:814-820 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:840-846 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:933-939 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1038-1044 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1064-1070 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1551-1557 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1779-1785 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1804-1810 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1829-1835 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1878-1884 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1990-1996 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2191-2197 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2216-2222 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2410-2416 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:549-555 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:575-581 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:626-632 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:652-658 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:685-691 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:746-752 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:804-810 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:830-836 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:881-887 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:907-913 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:940-946 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1013-1019 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1068-1074 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1094-1100 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1597-1603 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1827-1833 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1852-1858 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1901-1907 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1926-1932 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2038-2044 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2063-2069 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2112-2118 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2137-2143 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2295-2301 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2488-2494 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:540\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c6f865c18a5510636d2bc0d7359999bfae3329c2df8bacf98e92df794720854"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 41): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:516-522 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:593-599 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:790-796 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:971-977 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1014-1020 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1399-1405 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1423-1429 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1468-1474 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1517-1523 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1756-1762 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1855-1861 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1967-1973 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2081-2087 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2168-2174 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2267-2273 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2290-2296 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2313-2319 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2350-2356 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:323-329 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:525-531 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:602-608 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:780-786 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:857-863 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:978-984 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1044-1050 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1429-1435 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1453-1459 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1477-1483 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1515-1521 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1539-1545 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1563-1569 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1804-1810 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1878-1884 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2015-2021 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2163-2169 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2205-2211 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2247-2253 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2346-2352 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2369-2375 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2392-2398 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2429-2435 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:516\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"c995df66a918a834195704fa4533655aece15960e76651d9790e1fe7c728e1b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 24): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3103-3109 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3124-3130 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3144-3150 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3179-3185 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3200-3206 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3228-3234 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3253-3259 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3281-3287 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3306-3312 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3324-3330 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3422-3428 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3451-3457 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3193-3199 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3214-3220 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3234-3240 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3269-3275 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3290-3296 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3318-3324 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3343-3349 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3371-3377 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3399-3405 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3420-3426 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3521-3527 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3550-3556 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3103\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3103}}}],"partialFingerprints":{"codehealthFindingId/v1":"7124834fd5241b9df113d80dc85c6965889f68fb79b2f67d0d0c1f35b9248e94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 23): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:518-524 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:595-601 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:792-798 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:869-875 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:973-979 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1016-1022 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1401-1407 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1425-1431 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1470-1476 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1494-1500 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1519-1525 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:527-533 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:604-610 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:782-788 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:859-865 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:980-986 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1046-1052 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1431-1437 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1455-1461 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1479-1485 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1517-1523 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1541-1547 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1565-1571 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f8cdac8025a6d296e558bc09d2b7244fb802d68ecea1f7f68246aaf1c8a5b2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 19): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:99-105 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:682-688 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:743-749 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:776-782 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:937-943 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:974-980 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1010-1016 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1152-1158 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1336-1342 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1511-1517 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1594-1600 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1667-1673 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2011-2017 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2201-2207 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2243-2249 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2425-2431 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2485-2491 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2556-2562 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2647-2653 \u2014 all 19 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:99\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"580a627017c0e9bcdbed2c883c394c89140975bf8ec69637e8b99f6552bec737"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 19): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1897-1903 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1943-1950 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1976-1983 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2119-2126 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2488-2495 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2578-2585 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2607-2614 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2999-3006 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3215-3222 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3298-3305 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3323-3330 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3443-3450 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3464-3471 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3487-3494 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3548-3555 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3611-3617 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3659-3666 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3696-3703 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3756-3763 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2588\u0060 calls \u0060calculateSize\u0060, \u0060allocateAllImage\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2498\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1897}}}],"partialFingerprints":{"codehealthFindingId/v1":"da68ff02e3dd556a1d6e21abc0bd1d24368fb667b3e16db508543e23d222703d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 15): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:232-238 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:249-255 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:266-272 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:283-289 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:300-306 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:317-323 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:334-340 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:351-357 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:368-374 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:385-391 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:402-408 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:420-426 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:437-443 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:454-460 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:471-477 \u2014 all 15 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:232\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cf00a007a36cf698375172adc106decc5ff6338c62e17fc4c31b500da17f5ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 12): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:508-514 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:526-532 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:543-549 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:560-566 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:576-582 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:592-598 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:608-614 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:625-631 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:642-648 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:659-665 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:676-682 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:693-699 \u2014 all 12 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java:508\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac76f9c5717d853a9a7ab3df0a2e337529e3c3173d70f7baf445753aea4fac92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 11): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2623-2629 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2745-2751 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2844-2850 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2858-2864 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2879-2885 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2936-2942 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2966-2972 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3008-3014 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3047-3053 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3070-3076 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3486-3492 \u2014 all 11 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2623\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3016\u0060 calls \u0060getIntArg\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2852\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2623}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8dac4c8608eb7ea6e937ec2db4abc17e3076677772bd649e9a884fb421cfe51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 8): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:506-512 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1389-1395 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1746-1752 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2257-2263 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:515-521 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1419-1425 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1794-1800 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2336-2342 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:506\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3e673ac60601c1d6202c51a0e961b154d2226f2137004726ff3bcc6efed27db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 8): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3018-3024 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3034-3040 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3057-3063 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3080-3086 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3496-3502 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3147-3153 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3170-3176 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3595-3601 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3018\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3018}}}],"partialFingerprints":{"codehealthFindingId/v1":"86c412c6a254c79464c0913687319c9a61ecc1593b8f73f54b29e2c9e7e0e5a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 8): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2846-2852 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2887-2893 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3001-3007 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3031-3037 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3073-3079 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3101-3107 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3137-3143 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3160-3166 \u2014 all 8 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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2846\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2895\u0060 calls \u0060getObject\u0060, \u0060toIntPeer\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2854\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":2846}}}],"partialFingerprints":{"codehealthFindingId/v1":"41c8deb7cb977acfada0fa25dd62643b78e9bc6ed3b76814dd42686a9a86bc8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1675-1681 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2530-2536 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1720-1726 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1749-1755 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2907-2913 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2935-2941 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1675\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1675}}}],"partialFingerprints":{"codehealthFindingId/v1":"67604ba234b03e3d2ac723040369f17f87992196e7404489bece984ff509eccd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2893-2899 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3100-3106 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3176-3182 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3225-3231 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3278-3284 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3303-3309 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2893\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2893}}}],"partialFingerprints":{"codehealthFindingId/v1":"7595a377401dfa335f97b90ed1752e80f31369f232c5607ca837f2fbbb951c55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3156-3162 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3191-3197 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3212-3218 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3246-3252 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3281-3287 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3302-3308 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3156\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3156}}}],"partialFingerprints":{"codehealthFindingId/v1":"8471b3c344d5c8e4e4b8482d1ea8d0113925c71c8eac25cfad8c8c24a09231b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3290-3296 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3315-3321 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3333-3339 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3383-3389 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3411-3417 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3432-3438 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3290\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3290}}}],"partialFingerprints":{"codehealthFindingId/v1":"becde96897d1d16efbf23a81587cb704d3f81e8df12a1a660a332b7537b77eb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:158-164 | unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:186-192 | unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java:87-93 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:116-122 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:147-153 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/UdpSocket.java:80-86 \u2014 there are 6 copies across 4 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:158\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, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:194\u0060 calls \u0060getOutputStream\u0060, \u0060BufferedInputStream\u0060, \u0060getInputStream\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/UdpSocket.java:95\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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6afc0650d69bea1d011641a5be8f5ff2a7f44ec7d36b56a95d38eb2d389040b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:210-216 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:712-718 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:557-563 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:906-912 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:965-971 \u2014 there are 5 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060emulator\u0060 to \u0060Emulator\u003CAndroidFileIO\u003E\u0060 in one and \u0060Emulator\u003C?\u003E\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:973\u0060 calls \u0060printf\u0060, \u0060getContext\u0060, \u0060getLRPointer\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:217\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"73e43f38e70c2a7d311cb608f1f1a5d68060ef664a4ffc4c89604b1dddbc9228"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:403-416 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:428-441 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:411-424 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:436-449 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:403\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"c60f884132a7e0d1b832405603dabf24217610ccc8ce4092a4f3eeeed668200c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2585-2591 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2927-2933 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2609-2615 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2992-2998 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2585}}}],"partialFingerprints":{"codehealthFindingId/v1":"eca8e5ebabda3cb377464f7e702c3b878b0bb5502e925d5ec808ca0de03c8f00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2949-2955 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3435-3441 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3014-3020 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3534-3540 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2949\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2949}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb4962d18dd487d72e8884f0ab9012e45b42ea701c3218f77f6c5612c30829cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:617-623 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:643-649 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:669-675 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1176-1182 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:617\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"06ca8077daa7f6875237db767f8970903d1d4e41decacbf9fc3f30288d57e049"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:720-726 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:884-890 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:670-676 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc8e77be4e707d6d5e9936192db986b557a04f451ec48f7056d898dd06e4442e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1285-1291 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2687-2693 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3890-3896 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1285\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b885f0d799f494a579197fc23299fb64e3967eafec2e03600f849a0e8139e80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:540-546 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:566-572 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:592-598 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:540\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"af1e3875f42609c051ed39840049c5434caa46ca439cdea9e78fee60687d6f2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2456-2463 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2511-2518 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2541-2549 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2541\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":2456}}}],"partialFingerprints":{"codehealthFindingId/v1":"45684a5d0daf3797cf7428524d14d4a4efa3d91bd77f2cc32dd757a78b454480"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:244-250 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:219-225 \u2014 before extracting anything, compare \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:244\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060Unicorn\u0060 names \u0060com.github.unidbg.arm.backend.unicorn.Unicorn\u0060 in one and \u0060unicorn.Unicorn\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d5c032d12e3124884e2c1b28b669411bbfc29aaec2bdcaab979b64a96931e7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/unicorn/Unicorn.java:242-248 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/Backend.java:82-88 \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 \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/unicorn/Unicorn.java:242\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/unicorn/Unicorn.java"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5c871daaaf116d0455eaedb3dde31e3d2189a20739c3546fe17f4b37cd685a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:869-875 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:552-558 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:869\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"74a4d962b1a7f9b9744c69a4369b49ee40516bc35f2c659c84fd9079b36ba0c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1087-1094 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1097-1104 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1087}}}],"partialFingerprints":{"codehealthFindingId/v1":"49f9901aef90b06eacadfd1cd9bf07f3becdb325b84ded6c8de45659786cbb83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1264-1271 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1283-1290 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1264}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b1bb24360222e0d275fa713e145cc9c2f6c0f61cd8977872947b52eb5853aba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1411-1417 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:900-906 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1411}}}],"partialFingerprints":{"codehealthFindingId/v1":"058f07aa0a58136ec18c9151705b07ee68ece3d446439bd89c6fe90ce30e6326"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1962-1968 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1477-1483 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1962\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1962}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b5a44d2297b454aa4f38f27c79eb2af40439e4814b7dfe7a0c52c6d30d9152e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:141-147 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1155-1161 \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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060emulator\u0060 to \u0060Emulator\u003CAndroidFileIO\u003E\u0060 in one and \u0060Emulator\u003C?\u003E\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c4f5a04a90a62ef3150d67eaceea374994aeb70c43ec063d563122d0e402745"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:229-235 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:275-281 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060emulator\u0060 to \u0060Emulator\u003C?\u003E\u0060 in one and \u0060Emulator\u003CAndroidFileIO\u003E\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"d52d72efabce4f015d47f7abddbf99da649b48f3578b4f1af74f163535d411af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidARM64Unwinder.java:29-39 | unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidARMUnwinder.java:30-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidARM64Unwinder.java:29\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/AndroidARM64Unwinder.java"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e9be31558fc063e04bc25a5c5e36d1fa824524fc1ac177cbaabe0bdbf227c27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:197-203 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:261-267 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"702413bffe849fba2fb1cbe0ed04f9230a876c047374a3ba77b32d1d28218472"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:93-99 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:262-268 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"de67c1059935d1ddce1c617a1cff1fd23b9802973866b4524e11a21ed83db8f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java:35-41 | unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java:61-67 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java:35\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/SystemPropertyHook.java"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"abd2bc9816905da477e3bdae0607f9fdcc06fb925718eff8a60678d2b9cd23c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/ArmVarArg32.java:28-34 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/ArmVarArg32.java:36-42 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/ArmVarArg32.java:28\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/ArmVarArg32.java"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae92a50f819a8b512d6341681e30ef137d411777404fc7206897f8066e8e7f74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:381-391 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:389-399 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:381\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"08620c1c1daebaeaac2197fb51a995e8a79806582d62e887575530f46ebeb0b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1332-1338 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1364-1370 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1332\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1332}}}],"partialFingerprints":{"codehealthFindingId/v1":"471b04fcf2d0fd2d5e105bae76f66f9bbaf2ceb52f4de7fb86a7246711ac4dcd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1587-1593 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1633-1639 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1587\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1587}}}],"partialFingerprints":{"codehealthFindingId/v1":"35e91af06948a9237308a8a65b76dff00671f1b1391866901244b79df004eff5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3027-3033 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3120-3126 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3027\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, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3034\u0060 calls \u0060isDebugEnabled\u0060, \u0060debug\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3127\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3027}}}],"partialFingerprints":{"codehealthFindingId/v1":"b22889f1a20a9ab2e40d5bd4793701e35081125adba4a55bb40f0d32d8aae199"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3112-3121 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3202-3211 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3112\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3112}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcf8b6337edc1bdc43336b1dcfa08a271da73f0f8d1403aa3daf0efa5c706244"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3262-3271 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3352-3361 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3262\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3262}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b1d9ec4521a273ce630d18d107e09e055110eaf18fbe64236e27a7f427b188e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1362-1368 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1394-1400 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1362\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":1362}}}],"partialFingerprints":{"codehealthFindingId/v1":"3431e1c2420faed286da9681b67baba3f82835a26bf5d0f50f3efaf95e8cb57c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java:62-68 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmMethod.java:267-273 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java:62\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ad493a2f7e9ff51b07feba5d206b39b9501677ab0664632bedb8514cb071aae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java:168-174 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java:184-190 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java:168\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"779bf6e54d7cffcef8dad7ba190fa81fdaa197d1d27c688e2e51bf2e396a6d02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java:253-260 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java:263-270 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"925e0ad5077d84e4874693ea67f68e1c4f1bd9b715f0b27b4d1df0c519c13e94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/DirectoryFileIO.java:75-81 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/DirectoryFileIO.java:61-67 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/DirectoryFileIO.java:75\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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/DirectoryFileIO.java"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"44b570853d7a764c8a381e9b6237d39b37b6a830166c59b304eb2071c3560536"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java:38-44 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java:39-45 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java:38\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, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java:45\u0060 calls \u0060onFileOpened\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java:46\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"55ff5e2529b359d5f6e4643d78dbd77d4dfa8b54ce0bd3be20282df741260ab3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java:234-240 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMEmulator.java:237-243 \u2014 before extracting anything, compare \u0060unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMEmulator.java\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java:234\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":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"4274789ac47083d772858ac89ea1f969c9af2aa7416a6dcae8685643908e1d8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:176-182 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:228-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:176\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":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"d84c7507f23e4f883ae641ad0d753175ef947e7608f99822dce999a7ad132bba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java:66-72 | unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARMDebugger.java:67-73 \u2014 before extracting anything, compare \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARMDebugger.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java:66\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/SimpleARM64Debugger.java"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"194723ecc3050b4ab7e2d07da0b99f429feab40a137f9fcddfa5cdc1fa3dcfaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall32.java:88-94 | unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall64.java:46-52 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall32.java:88\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060OpInfo\u0060 names \u0060capstone.api.arm.OpInfo\u0060 in one and \u0060capstone.api.arm64.OpInfo\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall32.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e58bd901572af677442215179b1a09c10f7029e5691952700af4e14a6c9f514"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:911-916 | unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:927-933 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:911\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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"39740ec7de2223d7a6935ecc2bf98f6d0b2b34c655d3a0a6421bfb23d1aae193"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20137 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:897-903 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1167-1173 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1236-1239 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:897\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":897}}}],"partialFingerprints":{"codehealthFindingId/v1":"56106759ab93fba780a8047ef0320531ab0d5acae80fa4a35596db5f7812ef11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1337-1343 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1834-1840 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1337\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1337}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae1b39b91c8cc553ec1670b67a68656fb1690a81ba9ae19367864444f8019b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1416-1422 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1958-1964 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1416\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1416}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbd675edc158db23090492a616ee7fa7ad3b0459e579ab1c8d9b8b83d418fa4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2877-2883 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:4049-4055 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2877}}}],"partialFingerprints":{"codehealthFindingId/v1":"7921dcc4e58d31af7586f21afea1f24639ad05df1a37031bbef6bc2a22e85a3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2361-2367 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:291-297 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":2361}}}],"partialFingerprints":{"codehealthFindingId/v1":"325ea5c35dedb7303f770a8ed1b0ba4fabf4ea11da2af18e086ba65cdeb472c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:151-157 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:254-260 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:151\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9237bab49d38da6a4199df4bbcb345cc51d10904bcc145685aae65afc34ee68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:176-182 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:269-275 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:176\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"c34018b33e710023669f2be80116d32138e1d20043890d667c21929ab66b9146"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:607-613 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:616-622 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:607\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d6d00a8c9c129537cc159af05d98b47194135fac82f2cc57810b7cfbd59bfde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/Objc2Category.java:18-24 | unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/Objc2Class.java:27-33 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/Objc2Category.java"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"93c99cedae22308687bbfb3b19bec6b119f027de7c3ef1e7995df3e9b525f1cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-ios/src/main/java/io/kaitai/MachO.java:2015-2021 | unidbg-ios/src/main/java/io/kaitai/MachO.java:3647-3653 \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":"unidbg-ios/src/main/java/io/kaitai/MachO.java"},"region":{"startLine":2015}}}],"partialFingerprints":{"codehealthFindingId/v1":"015102b6d29aa678119f8c63f0b2f09b8422760bb1b08c795bed400d07339afe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 42): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:314-319 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:515-520 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:592-597 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:789-794 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:970-975 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1013-1018 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1398-1403 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1422-1427 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1467-1472 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1516-1521 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1755-1760 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1854-1859 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1966-1971 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2080-2085 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2167-2172 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2266-2271 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2289-2294 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2312-2317 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2349-2354 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:322-327 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:524-529 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:601-606 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:779-784 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:856-861 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:977-982 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1043-1048 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1428-1433 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1452-1457 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1476-1481 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1514-1519 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1538-1543 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1562-1567 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1803-1808 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1877-1882 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2014-2019 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2162-2167 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2204-2209 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2246-2251 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2345-2350 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2368-2373 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2391-2396 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2428-2433 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:314\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"218c5af086dccda935e9cb198ea11671a04f4a0e6127a1e18974489bcd04eb60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 42): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:620-625 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:646-651 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:679-684 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:719-724 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:759-764 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:817-822 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:843-848 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:895-900 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:936-941 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1041-1046 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1067-1072 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1554-1559 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1782-1787 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1807-1812 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1832-1837 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1881-1886 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1993-1998 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2194-2199 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2219-2224 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2413-2418 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:629-634 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:655-660 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:688-693 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:749-754 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:807-812 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:833-838 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:884-889 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:910-915 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:943-948 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1071-1076 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1097-1102 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1600-1605 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1830-1835 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1855-1860 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1904-1909 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1929-1934 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2041-2046 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2066-2071 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2140-2145 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2273-2278 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2298-2303 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2491-2496 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":620}}}],"partialFingerprints":{"codehealthFindingId/v1":"547de12254d2ead383e17c638559a0df517889c71ff96b0e323197b5673358d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 42): unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:168-173 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:175-180 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:182-187 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:189-194 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:196-201 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:203-208 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:210-215 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:225-230 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:232-237 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:239-244 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:246-251 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:253-258 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:260-265 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:484-489 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:491-496 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:498-503 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:505-510 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:512-517 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:519-524 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:526-531 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:533-538 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:540-545 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:547-552 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:554-559 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:561-566 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:568-573 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:575-580 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:582-587 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:597-602 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:604-609 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:611-616 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:618-623 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:625-630 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:632-637 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:639-644 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:646-651 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:653-658 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:660-665 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:667-672 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:674-679 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:681-686 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:688-693 \u2014 all 42 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 \u0060unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:168\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbd70a943e5bb6f875831554d70f7049bd47b37df05134ba04cd5283822f715e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 23): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1758-1763 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1857-1862 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1969-1974 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2025-2030 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2083-2088 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2125-2130 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2170-2175 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2269-2274 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2292-2297 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2315-2320 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2352-2357 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2375-2380 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1806-1811 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1880-1885 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2017-2022 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2091-2096 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2165-2170 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2207-2212 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2249-2254 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2348-2353 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2371-2376 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2394-2399 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2431-2436 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1758}}}],"partialFingerprints":{"codehealthFindingId/v1":"f14bbbb1c5553fe18559295ed05e02ff778eded88b20644ac1feef96cba13619"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 18): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1783-1788 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1808-1813 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1833-1838 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1882-1887 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1994-1999 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2195-2200 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2220-2225 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2664-2669 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1831-1836 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1856-1861 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1905-1910 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1930-1935 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2042-2047 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2067-2072 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2141-2146 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2274-2279 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2299-2304 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2688-2693 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1783}}}],"partialFingerprints":{"codehealthFindingId/v1":"e11407028de4fda3a84bc9f1187ef27998c4f6e40ba0f56440ebb0d4800ce5da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 9): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:787-792 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:801-806 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:817-822 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:851-856 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2233-2238 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2291-2296 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2309-2314 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2325-2330 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2382-2387 \u2014 there are 9 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 9 sites; resolving a subset leaves the remainder to drift apart. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2389\u0060 calls \u0060setMMapBaseAddress\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:793\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":787}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ac54ae489b8ad6fcee034463d54d5677ed0813cbbe649757d1105b244e10c98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 7): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:543-548 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:569-574 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2050-2055 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:552-557 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:578-583 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1016-1021 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2115-2120 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":543}}}],"partialFingerprints":{"codehealthFindingId/v1":"47e6c78402d61ab3ad63976b56f3d8725da5ca8089e1b1f9bcfba295a0e0cc9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1813-1818 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1887-1892 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1999-2004 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2056-2061 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2200-2205 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1813\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1813}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ace08ab2ed2f706bca8b209763d4d0edcc53f725921a19cbbe5ad918b30828b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2583-2588 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2925-2930 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:461-466 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2607-2612 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2990-2995 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2583\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2583}}}],"partialFingerprints":{"codehealthFindingId/v1":"77382952ef528e04c27cfc517a4b8a15bde14d703e788b870328c75ea702d0ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1836-1841 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1910-1915 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2047-2052 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2121-2126 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2279-2284 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1836\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":1836}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa628fd3f278b0978051e6781834b68c398deb31bc6cf6ec920f8e829a593613"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1890-1895 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1374-1379 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1430-1435 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:504-509 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1890}}}],"partialFingerprints":{"codehealthFindingId/v1":"b856bdfd67c2cbece18efedb1a1fff6b151568d49afd2ddf8016e1e1b565fcd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:107-112 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:379-384 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:102-107 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:387-392 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:107\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"f511b697c8e6c259f2693486afd09597ba53b6bdc8634f23e7e2943829de4882"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2618-2623 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2961-2966 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2642-2647 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3026-3031 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2618\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2618}}}],"partialFingerprints":{"codehealthFindingId/v1":"e63f2c2221c82c8cf13ea14b7f485f435c3ef0567ccd05a08b07e2f04bddb317"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:160-166 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:217-223 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:476-482 | unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:589-595 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java:160\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9edcde0360aa2b3fc54de52c777fe223235094e9e0cd0597597e8618cf82a74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:102-107 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:128-133 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:157-162 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:186-191 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:102\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"32ff3305657ef38ed9c6cec714e510c035a882480d3c7dc0c77727967dbbf78b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:585-590 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:802-807 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:660-665 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"2902470063c3cc8e942fe73a424c8ececa0f4b98626ed6f6fb0301adeaefe0af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:747-753 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:770-776 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1476-1482 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:747\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd8ff8aeffaea2d461691fadc6092444cc522e8d0ce6a91d0b9ce386c4de678f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2376-2381 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2408-2413 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2438-2443 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":2376}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc832f4ee5c6796c7fbb2f5d51b42c9427bfa60d60fe2d56932ece52053940d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:112-118 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:123-129 \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 \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:112\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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"180e5f10f25fbd61fa88536319f24e04219aac4d92fbac0130464adac98f30bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:178-183 | backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:209-214 \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 \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:178\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060callback\u0060 to \u0060CodeHook\u0060 in one and \u0060ReadHook\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":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"02eea0806f00107ea32099ecbae0ba4dcf90d6ea50f6883c2100f68e914cd45a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1226-1231 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:746-751 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1226\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1226}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7a617dab7733992332334efae2e41071d515a5e9e1de7dc4fc965946e17d6a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1805-1810 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2966-2971 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1805\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1805}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c02cb62dc2923ea36a4428bc309fe9cf44e65bf3477df65e292f3899d2c803e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:660-665 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:636-641 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:660\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060SigAction\u0060 names \u0060com.github.unidbg.ios.signal.SigAction\u0060 in one and \u0060com.github.unidbg.linux.signal.SigAction\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"53a737254212dfc6820c509e32a55bb560243aa58a8fc8b9e3cb57812a0717bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:778-783 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1602-1607 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:778\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060emulator\u0060 to \u0060Emulator\u003CAndroidFileIO\u003E\u0060 in one and \u0060Emulator\u003C?\u003E\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"726567c3cb13f426a857efd239dad7e1dc29282baff65fed83f7a4ad49baaaca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java:42-52 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:922-932 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOModule.java:934\u0060 calls \u0060getLogger\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java:54\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"e22fb7c1ed0c32de1684b595b5aec4dac5011eed62a0a4937cb1e5a4dc0abecc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:471-476 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:479-484 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:471\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a3edac0c59b3bcda019ecb54b551c1b87d94ff3019ac7814817429aef59f5bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1326-1331 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1356-1361 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1326}}}],"partialFingerprints":{"codehealthFindingId/v1":"74ebe429dfa8c3f16393167c2b8a4af9bfe2f26f8bf09ce671dfa781cf9d07db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1358-1363 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1388-1393 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1358}}}],"partialFingerprints":{"codehealthFindingId/v1":"d80574539a4ca62a5033428528c003aaa10fcc5ccc8e319a457fbed708baf960"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1562-1567 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1608-1613 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1562\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1562}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9db113417776a28d73137153ccbbfa068df2aba52dd22d3863e7a63e5145dee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1634-1639 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1680-1685 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1634\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1634}}}],"partialFingerprints":{"codehealthFindingId/v1":"aff3721a9a14533e22fb9e92b3408825d9fca18d80eed269859cc4cef187f119"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1660-1665 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1705-1710 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1660\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1660}}}],"partialFingerprints":{"codehealthFindingId/v1":"20d17b5f6f5e7be8a44a4eb1cbbce486f67d556e50a82fee75c61aad62a2e70b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1715-1720 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1763-1768 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1715\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1715}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f5b0c5b2125ef179271402cb887ea8ebcfbe6b20acb5078703b07afb4a1ae64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2610-2615 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3460-3465 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2610\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, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2608\u0060 calls \u0060setInt\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3459\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2610}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf743a188802af238690f3424c3bf4f677e6ffe73ee5290d1981c15fb6ff02e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3133-3141 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3223-3231 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3133\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3133}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c5c2a6bf321b6d24b1d58540ccae9de19c49af557be8a30bbf95b7f4b04a8ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3360-3365 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3459-3464 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3360}}}],"partialFingerprints":{"codehealthFindingId/v1":"086af430dacf5336f9e98b632f778170dac2cfdd2e8fd2b83f7c6b67f1ce5b01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:957-963 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2177-2183 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":957}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c09621c92b39c63905da101f67ae99bb82d7877530cf8f78f921fb7ec7f9817"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2634-2639 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3559-3564 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2634\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, \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2632\u0060 calls \u0060setInt\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3558\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":2634}}}],"partialFingerprints":{"codehealthFindingId/v1":"38800de943071e4357c652d9ca13b7a22a39cb1113f0d3cb7221a63f8f7ff00b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java:48-53 | unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadClonePatcher32.java:45-50 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java:48\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":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher32.java"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"79075beed4728e669fbb62defcebff71b75e357802332635bad26e0726d02ca0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/JniGraphics.java:73-78 | unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/JniGraphics.java:91-96 \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":"unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/JniGraphics.java"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"01db9f516ee17217cdba781911862c71476e63881bc63bc2fca51200139937ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/SystemProperties.java:36-41 | unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/SystemProperties.java:52-57 \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":"unidbg-android/src/main/java/com/github/unidbg/virtualmodule/android/SystemProperties.java"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c3c092b379505f3a058a23dfb6c631a230028138acae7949a2ca51edbdf48b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:814-819 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:821-826 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:814\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":814}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1cb1235e01b0389bfeb2138c9b1d103fbcd1c913833d12bdf9acf7e77faad0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/InlineHook.java:40-45 | unidbg-api/src/main/java/com/github/unidbg/arm/InlineHook.java:91-96 \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":"unidbg-api/src/main/java/com/github/unidbg/arm/InlineHook.java"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"d161fc49f315321ff055a8f49e4e53c18171ba2264a892f5476a9c0b12de0b61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall32.java:38-43 | unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall64.java:27-32 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall32.java"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"63cf5a0fd1c7366159e9b2293d7daefcf02e560f9eeb0aab8d3659fa93fc7b4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall32.java:100-105 | unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall64.java:58-63 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall32.java:100\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/TraceFunctionCall32.java"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"365a240c6ae01ae91cf380fa726c6cef7e457f0bd8fdd40c8967a974dd3eda28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:153-158 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:184-189 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:153\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060callback\u0060 to \u0060CodeHook\u0060 in one and \u0060ReadHook\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":"unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aec5bf48350dbabe72e7b5ae11278b8ddd90bc332534f242e5ea5ea37e24970"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java:484-489 | unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java:496-501 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java:484\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":"unidbg-api/src/main/java/com/github/unidbg/debugger/ida/AndroidServer.java"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"c167d3f508fe90be02cf21a79c994b5bf0545e4e1e56614d74cd8cd20befda1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/mcp/McpServer.java:211-216 | unidbg-api/src/main/java/com/github/unidbg/mcp/McpServer.java:281-286 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/mcp/McpServer.java:211\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpServer.java"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b52e3172bc0171b83120b78c002a25310372e34e8785ebea78c4e34bf4b451f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java:137-142 | unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java:183-188 \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":"unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e506a233d740e1e9a383353a834d93c3d25cab1487d872afa00015b9145129e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARM64Emulator.java:118-129 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARMEmulator.java:104-115 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARM64Emulator.java:118\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARM64Emulator.java"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"1019f2e599a1d5595c3b9aa57387521854b1a5651e4a947ec83630417dc199b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:584-589 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:592-597 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:584\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6f5771b3b0fe7f0300253d3be22e4b5b17f3cd91b5906b4b39e933efae561ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:590-595 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:716-721 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:590\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7ecf42b2c7671ecf683544e662d75e3823146d073cafe0b8e43c0279f4caab9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20136 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:85-90 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:97-102 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:107-110 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:107\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:84\u0060 calls \u0060handle\u0060, \u0060getContext\u0060, \u0060getIntArg\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:107\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"60115b6066e2194ba56ada99aca16747c48ab283f59f15d2c5c8900356a2c8d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:446-451 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:473-478 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:446\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"872119f85c99a40b56bcb656a13e32d7b6abfaca823fbb454e4cef242a216953"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:710-715 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:718-723 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:710\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"056d11896b2425fb5dcacfa0d2f1dfe29c64234c5c966ab3d288b9501c000900"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/CDObjectiveC2Processor.java:26-31 | unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/CDObjectiveC2Processor.java:42-47 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/CDObjectiveC2Processor.java:26\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/objc/processor/CDObjectiveC2Processor.java"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"a225aa79cc9439ff4086e7f0ba7648b78a0ed2dffa5255415b27caf0159515a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 47): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:542-546 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:568-572 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:619-623 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:645-649 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:678-682 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:718-722 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:758-762 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:816-820 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:842-846 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:935-939 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1040-1044 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1066-1070 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1553-1557 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1781-1785 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1806-1810 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1831-1835 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1880-1884 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1992-1996 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2193-2197 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2218-2222 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2412-2416 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:551-555 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:577-581 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:628-632 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:654-658 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:687-691 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:748-752 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:806-810 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:832-836 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:883-887 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:909-913 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:942-946 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1015-1019 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1070-1074 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1096-1100 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1599-1603 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1829-1833 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1854-1858 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1903-1907 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1928-1932 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2040-2044 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2065-2069 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2114-2118 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2139-2143 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2272-2276 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2297-2301 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2490-2494 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:542\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8f42400ab96740a97b62de2992c2c80dbd1036a257ea9cafa6c8c7e1ab13106"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 34): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:523-528 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:600-605 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:626-631 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:652-657 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:685-690 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:725-730 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:765-770 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:797-802 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:823-828 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:849-854 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:874-879 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:901-906 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:942-947 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:978-983 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1021-1026 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1047-1052 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1073-1078 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:532-537 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:609-614 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:635-640 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:661-666 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:694-699 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:755-760 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:787-792 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:813-818 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:839-844 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:864-869 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:890-895 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:916-921 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:949-954 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:985-990 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1051-1056 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1077-1082 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1103-1108 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:523\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbde97c77ccf04bd8998f94e95ca00ae51884dab10e760b9cd41e24165eaef58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 23): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1406-1411 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1430-1435 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1475-1480 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1499-1504 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1524-1529 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1560-1565 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1586-1591 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1633-1638 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1659-1664 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1688-1693 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1714-1719 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1436-1441 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1460-1465 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1484-1489 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1522-1527 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1546-1551 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1570-1575 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1606-1611 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1632-1637 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1679-1684 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1704-1709 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1733-1738 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1762-1767 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:1406\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":1406}}}],"partialFingerprints":{"codehealthFindingId/v1":"fef54e4eb8c6279f382a26d1ffa4b2a38867fa537ea2652de3d049aee652ab38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:957-961 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:993-997 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1030-1034 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2177-2181 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2219-2223 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java"},"region":{"startLine":957}}}],"partialFingerprints":{"codehealthFindingId/v1":"58d57aa1eeb2fae83faefc65de98c35448659f93f277a92e1c18b4a9a26ee1ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:951-955 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2096-2100 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:958-962 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2178-2182 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:951\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":951}}}],"partialFingerprints":{"codehealthFindingId/v1":"193c3fe43a0da100fa4cb61dcade18234d663bb9443587c3b1e0a71dc49555d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2138-2142 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:994-998 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:1031-1035 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2220-2224 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2138\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2138}}}],"partialFingerprints":{"codehealthFindingId/v1":"a83bb2941d4298a9954a8667341ba4a4c11071e9d773268366ebfc5fe27e7bcc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3441-3448 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3465-3472 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3540-3547 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:3564-3571 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:3441\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":3441}}}],"partialFingerprints":{"codehealthFindingId/v1":"d015e6107a8b2a068f494907291ab81ff8d4501259c1f5da5683af21499704b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:766-771 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:777-782 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:788-793 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:799-804 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:766\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":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"a22dde600c63733e3a1c7a85e9bab3a8c56be53d6029a517d926d51263ad3f45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/HypervisorBackend.java:42-46 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend32.java:37-41 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:49-53 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/HypervisorBackend.java:42\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":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/HypervisorBackend.java"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"2427fa10d8c55982caf762c1b4cdb22213c319600efe6b93ddb69a936f49a6e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1806-1810 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2967-2971 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:4136-4140 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1806\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1806}}}],"partialFingerprints":{"codehealthFindingId/v1":"143c3aa6ab5d0d9ec6b23f880a5f7dc3ff4ba85d22e1097c23f261960c95d621"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:950-954 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:986-990 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2095-2099 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":950}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8d1b8e651efa73fbfa825a25e46bbcc0e7565ede79d59ce6aa07268f424910b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadJoin19.java:23-28 | unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadJoin23.java:20-25 | unidbg-ios/src/main/java/com/github/unidbg/ios/thread/ThreadJoin64.java:21-26 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/thread/ThreadJoin64.java:20\u0060 calls \u0060findModule\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadJoin23.java:19\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/ThreadJoin19.java"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"a17b3492da5d6049c6a9cc17cbcfe476e715ed548ed47e9f9d17cc93a9a4f542"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:177-181 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:229-233 | unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java:641-645 \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":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddd176ddcb1979e6ddd8a4b4bdda799d94f82dabf02980be511bdd92f641c8e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:77-81 | unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:97-102 | unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:149-153 \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 \u0060unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:77\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:82\u0060 calls \u0060add\u0060, \u0060toolSchema\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:103\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":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"14aebe4f06ab7ebfbe6a672cf47214fdbff10a00ce8a6dbc411dea34c5dedf35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:618-624 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2382-2388 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2414-2420 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:618\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"2119d068cdfab112d244432dfa8c56d89f6964140700976ae553297f8f3846fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:285-290 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:165-170 \u2014 before extracting anything, compare \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java\u0060 and \u0060backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:285\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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"0817d1f7de6c4be00b6c3de823754806ed3a9b7649e60ef74f2bbae5c2947b1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:296-301 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:176-181 \u2014 before extracting anything, compare \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java\u0060 and \u0060backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:296\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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"068a093fda17b265f426936ab5e17fd8023dee6b718f2ebc4a5150018ae9a6ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java:174-178 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java:183-187 \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 \u0060backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java:174\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":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1550116625776d3f9555861c7a9d5136bdc2e6935d8c15faa15db2c196dc41c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): backend/kvm/src/main/java/com/github/unidbg/arm/backend/KvmBackend.java:58-63 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/KvmBackend.java:143-148 \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":"backend/kvm/src/main/java/com/github/unidbg/arm/backend/KvmBackend.java"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"233201e7f4fb79414b036d4861be4f9f64af9b374efeefaa3e4725bf13246066"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1304-1309 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2752-2757 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1304}}}],"partialFingerprints":{"codehealthFindingId/v1":"afdbf8cabe0e35fda63be5aa1f63cc6bb0d15534a323bfb33b07ad262cc894f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20135 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1367-1370 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1389-1393 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2822-2826 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1389\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1367}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f5430e9b640aac72d2621ba1cb2e0f0f4471707b37c9560da9630cd109b89a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2047-2052 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1109-1114 \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. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":2047}}}],"partialFingerprints":{"codehealthFindingId/v1":"f81f956d62143b1fb7c48f85cf7e6da7bd109a671b586b0ecebbbf7f6008ce01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:697-701 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java:476-480 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:697\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060SigAction\u0060 names \u0060com.github.unidbg.ios.signal.SigAction\u0060 in one and \u0060com.github.unidbg.linux.signal.SigAction\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"3db7454c0e095e88ada036f7887fce4d510e86f3a60432810cff2ec24432646b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java:516-520 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java:544-548 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java:516\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4e5e2d85a8b60efbcd53be83e45924985215be5642c883f8be8a06582ef15ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2095-2099 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2137-2141 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2095}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dce4c7fda43b23b09d36b4bbefc567ba739b113faa55fce3f82bddee058f176"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2612-2620 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2636-2644 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2612\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2612}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ad58cb9f5a274fc83c6e348b7803ce6089f2542bdc226fdb68b41689dfa5113"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2644-2649 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java:2668-2673 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM64.java\u0060 as WHOLE FILES: this scan already matched 100 separate duplicated blocks between them, totalling at least 994 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java:2644\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DalvikVM.java"},"region":{"startLine":2644}}}],"partialFingerprints":{"codehealthFindingId/v1":"a073cb929a6de0742c23907302004a528caf74fd36d8c4284c53fbd354c2806c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmClass.java:164-168 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmClass.java:198-202 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmClass.java"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"309326495ce8d27b53acb3c6943d058c1e3a056d84b7c85f67a72977c6666bb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/VarArg.java:61-65 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyUtils.java:35-39 \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 \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/VarArg.java:61\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":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/VarArg.java"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fc5fe678b7202ed2fa0815bef89391e877f1ce864d67a57e1d73ba57ac5467e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java:48-52 | unidbg-ios/src/main/java/com/github/unidbg/ios/thread/BsdThreadCreatePatcher64.java:59-63 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/thread/BsdThreadCreatePatcher64.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java:48\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":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/ClonePatcher64.java"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"89e3908ebb758ca89bad4b799ac3cafb087dd922c706a9e1adcb8969d7261bde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/net/fornwall/jelf/ArmExIdx.java:113-119 | unidbg-android/src/main/java/net/fornwall/jelf/ArmExIdx.java:133-139 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/net/fornwall/jelf/ArmExIdx.java"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"523eafbdb592c379ed6d62d379ec288149e17684028315c279eaeb14de8bcbc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/net/fornwall/jelf/ArmExIdx.java:340-345 | unidbg-android/src/main/java/net/fornwall/jelf/ArmExIdx.java:355-360 \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":"unidbg-android/src/main/java/net/fornwall/jelf/ArmExIdx.java"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"065b6ddfb53bb8380d756038f98fdad982ba14c85b38e6fead9db2a733d5837f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:284-288 | unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java:310-314 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a0182cdbdcf785cd3b9e1a8c6e5ecf26655cd7713a5c149d1f44023e806fe01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1675-1679 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2560-2564 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1675\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1675}}}],"partialFingerprints":{"codehealthFindingId/v1":"03b10836a43635fc9b1671905f442bff2bf0d771693c50e7965ae2ec5c33d60b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1807-1811 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2725-2729 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1807\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1807}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2ba4ce50888e2f937e987f90670a7bf7d99823f02ce248a906ae7e8cdd46d50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1541-1548 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1564-1571 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1541\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1541}}}],"partialFingerprints":{"codehealthFindingId/v1":"92a6e8d046d0655277c999e89dc3941b0e306b9137c8476c9ded0795636232f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:262-266 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:277-281 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:262\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"6918355a33bb818b9beb9c25593ac9ac187b29ca19f573f3d0c491ebd52b446b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:363-367 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:380-384 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:363\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"79f50f5b9c09667ebd38beb56e433d8cd93b2ce201ede32335a6e719f5508b30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:218-222 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2018-2022 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:218\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"b06f0fb079810effdad63ad96a671674113e92635c38c9a526fdd6dd2839417b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:570-575 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:604-609 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:570\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba45678c525131e009ac0774310a6fee2bccb7ae310a09c594925b114b41a160"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java:117-121 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaLoader.java:155-159 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java:117\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader.java"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f490b17b347b312062e971d239ee1e81f6e8d1e77e282c26f1ae710a1ee06ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/DumpFileIO.java:14-43 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/DumpFileIO.java:17-56 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/DumpFileIO.java"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"595448f8cba7106e3bde725381f3bcefd72ae000a1fcd05c4e4ca17c6a429391"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/struct/StatFS32.java:7-41 | unidbg-android/src/main/java/com/github/unidbg/linux/struct/StatFS64.java:7-41 \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":"unidbg-android/src/main/java/com/github/unidbg/linux/struct/StatFS32.java"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3fbc616ffb1df06cbe306985d346444ede77f70cdc4dae9188103a2b3845831"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/ByteArrayNumber.java:7-29 | unidbg-api/src/main/java/com/github/unidbg/StringNumber.java:7-34 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060value\u0060 to \u0060byte[]\u0060 in one and \u0060String\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":"unidbg-api/src/main/java/com/github/unidbg/ByteArrayNumber.java"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcfe3abc61666303797ebad3a2c142d55fa114e0bc529c308d0dda8ded2abdd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/hook/HookContext.java:11-26 | unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/HookZzRegisterContext.java:14-44 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. 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":"unidbg-api/src/main/java/com/github/unidbg/hook/HookContext.java"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7279f18222b855f8d8dcd07ac4eeb8d436610844874f40d3c73542444e56b75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/unix/struct/StdString32.java:15-46 | unidbg-api/src/main/java/com/github/unidbg/unix/struct/StdString64.java:15-47 \u2014 before extracting anything, compare \u0060unidbg-api/src/main/java/com/github/unidbg/unix/struct/StdString32.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/unix/struct/StdString64.java\u0060 as WHOLE FILES: 87% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/unix/struct/StdString32.java"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"966cdb70fa43ba68fd972209ecef11665eb1db0a297a9d030045d9e6f7623ead"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader64.java:10-21 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaLoader64.java:9-24 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLoader64.java"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e65563da6bbabcb37e72ac525accf58438d0b8e1e629cc6568e177a4a2bdea0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (75 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/LocalUdpSocket.java:22-101 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/LocalUdpSocket.java:22-96 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/LocalUdpSocket.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/LocalUdpSocket.java\u0060 as WHOLE FILES: 96% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/LocalUdpSocket.java"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"0efc5a7e1e7889f42299464ae54cc2ef687fd566242e960a10f65b5f08911192"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/struct/SegmentCommand32.java:11-27 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/SegmentCommand64.java:11-27 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/struct/SegmentCommand32.java"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3b1696362c4d9686607e8afbb7cb264ebfd35808ca9cde37d2f8a54abb7eae3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 8): unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/HostInfo.java:11-27 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/MachPortsLookupReply64.java:11-27 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/MakeMemoryEntryRequest.java:11-27 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/NDR_record.java:11-27 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/TaskSetExceptionPortsRequest.java:11-27 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/ThreadBasicInfo.java:12-32 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/VmRegionReply.java:11-27 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/SockAddrDL.java:14-30 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 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 8 times. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/HostInfo.java"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"a591ff03b9dc30b6a02ac46f5dac32406b491a7bc4603f2d8ff1a6162355efa6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/TaskBasicInfoReply64V2.java:13-26 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/TaskDyldInfoReply.java:13-26 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/TaskVmInfoReply64.java:13-26 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/TaskBasicInfoReply64V2.java"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"3574364b48b7196fdad5d9cb97ec8e92bcb57f9474c9ead0a6b8efdeb40de574"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/VmRegionBasicInfo.java:11-33 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/VmRegionBasicInfo64.java:11-33 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/struct/kernel/VmRegionBasicInfo.java"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9061126f645969098eaf883a813ffa323e819508fa2a11d8c5fcec28c7d6d31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/struct/objc/ObjcClass32.java:16-33 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/objc/ObjcClass64.java:16-33 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/struct/objc/ObjcClass32.java"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf1891531e4997eeff891691204cf685ea7d1b4b6f6f8a47d8f2bae87d0a9998"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/DyldAllImageInfos32.java:11-46 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/DyldAllImageInfos64.java:11-46 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/DyldAllImageInfos32.java"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"84a6d3912245344db7d2500990cc9756beb0245224bdce98151ec823981157ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/EProc32.java:17-46 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/EProc64.java:17-46 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/TaskVmInfo64.java:11-46 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/EProc32.java"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"98fe97bedf037ee7251f672bb4d02a00bc84e3f24d2ea20dd33d2900b0f7c719"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (70 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/ExternProc32.java:18-87 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/ExternProc64.java:17-86 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/ExternProc32.java"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfa6cab1618f8bf303c2ca4a745a8f808702bfbb1e33d41bd1b32b941059e0de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/struct/objc/ClassRO.java:16-35 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/VmSpace32.java:11-30 | unidbg-ios/src/main/java/com/github/unidbg/ios/struct/sysctl/VmSpace64.java:11-30 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/struct/objc/ClassRO.java"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e55a9a0218089f84f11f0cd9a58fd402c06f97c87a3c9ae60c5b2a42678fdc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/DynarmicBackend.java:161-167 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/HypervisorBackend.java:175-181 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/KvmBackend.java:211-217 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/DynarmicBackend.java"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"82333d4ed17376e56e3dde1d2d2925c5b44fb6a05d3b0795d806f6f764e40da2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:141-147 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:141-147 \u2014 before extracting anything, compare \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java\u0060 and \u0060backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"5425329f5a3193499eb216d3164fc5de04be1542ecefd85982f4f5ca742a4133"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:149-155 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:133-139 \u2014 before extracting anything, compare \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java\u0060 and \u0060backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bdcd76b8922ae01df1c1414eeff6ac14a14afb0df7bb41f5c5226bb6c7c407e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:157-163 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:149-155 \u2014 before extracting anything, compare \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java\u0060 and \u0060backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"eadf8ee5ce83c3a167e2a670604e84f5f555bab7c00ffb8e5aba5ed22fda2a2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:274-282 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:230-238 \u2014 before extracting anything, compare \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java\u0060 and \u0060backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"614e7a55a51ad9f97d3ffe49a1db51f58321126811b7918db63dda8a62b4baee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend32.java:24-33 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java:24-33 \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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend32.java"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"c077190abe4051c0112564816eb587c9db080c247e8106329d5367bebd2e29aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend32.java:119-124 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend32.java:182-187 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend32.java"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"199257f8bd8ea55d71b7d558cda1ffd6e888ae4c446698f73d1a58f89bc9be9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java:179-184 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:384-389 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"0157aa78a375189df7a79ffd66e07256fa73b970733ed09999ec4b63f0ed5fe6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java:48-54 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:68-74 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"094e2f49650a6a03e43957cfe1c55a90c5b61d0c9d134fddd536aecb3afdf5c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:43-50 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:40-47 \u2014 before extracting anything, compare \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce50d528cad0b65ea4ef20e5f7b2209cbe86280a0487c851aaf2d9b6c1d8499f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:53-63 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:51-61 \u2014 before extracting anything, compare \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:49\u0060 calls \u0060SuppressWarnings\u0060 and \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:50\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"43177b6f4775d5bde3e002b72f37ce28f5d878b7539105c1d2d0fd0bdfabdc27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:84-90 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:82-88 \u2014 before extracting anything, compare \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a3d2639cdc37804fd73f10810e891b118ae4e788d21760d24831d6238381515"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:102-108 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:91-97 \u2014 before extracting anything, compare \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa33ee5ef980e0f15b5d2ae94e12819d679a530bf6c96457e4863cb9abd2b3e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:120-126 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:100-106 \u2014 before extracting anything, compare \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"47206270450839ed609ca9f250751a53059c82b20a46303a81add03f9804b033"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:129-135 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:109-115 \u2014 before extracting anything, compare \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac1c7f86317f3bd4b206c4209c557fea309fa0148a04fbb20f9ee120ae801d8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:138-144 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:118-124 \u2014 before extracting anything, compare \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"22689ac7e135fe2a74a4dcc5469107441c4bfe9a8dea2c8874be5141099da9a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java:277-283 | unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java:251-257 \u2014 before extracting anything, compare \u0060backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/Unicorn2Backend.java"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"af8834c929395e7ed56ddd2e2020ffbbd173db3401e0e2f3f0a5603a627b7308"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:543-549 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:458-464 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":543}}}],"partialFingerprints":{"codehealthFindingId/v1":"da79f2bf59ad08e71d34444bd8b269cb3fb91a1a6e6d839243b2bcfe30a6f47d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:570-578 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:580-588 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:659-667 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1364-1372 | unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java:322-330 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060emulator\u0060 to \u0060Emulator\u003CAndroidFileIO\u003E\u0060 in one and \u0060Emulator\u003C?\u003E\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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"b86663ba4086745623f1a82f380a4e28db733148145fc5a44cabac797110847b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1313-1319 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:770-776 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3828-3834 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1313}}}],"partialFingerprints":{"codehealthFindingId/v1":"628f68936be417a29b57e58a427ca30d9e0d9995440071e69e8093b39a78d143"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1355-1362 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:792-799 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2836-2843 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3989-3995 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1355}}}],"partialFingerprints":{"codehealthFindingId/v1":"3472056d3280d536801a97308b7d713de5ee027a551f6c4a2d72d7a5e20f3a4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1439-1444 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:699-704 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1439}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dcfb8543c3ac33b6fda401bd87a03a69506b5e4d2e9941519401e93be9e329a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1446-1452 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:691-697 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1446}}}],"partialFingerprints":{"codehealthFindingId/v1":"5896b20513edc14262e824fe27bf4d57e11c865a5d224ecec8eac3d4ed21da25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1508-1514 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:969-975 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1508}}}],"partialFingerprints":{"codehealthFindingId/v1":"434639f992c4848f00dd66fa18673214f06dd3e8767c524d396c1e3b878d0b1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1974-1982 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2740-2748 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1974}}}],"partialFingerprints":{"codehealthFindingId/v1":"595d2fead15bcca812b94857575f6ae41ebf69ed5942eda941af77cc4196dc6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1573-1579 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1484-1490 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java"},"region":{"startLine":1573}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1cad596bbe5254d6959d589c57e4582c8fbfae5b3ce1dd057028b1aa64ec553"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:718-724 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:1944-1950 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f9e9cc832ade88b30afe107eb326382f49cc56d58126bddc9334535b1406f5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:578-586 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:3836-3844 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"e20c2f04faeed8cbe4d193b3a1e25e080c88f761661c6153125f33e727eed982"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java:340-347 | unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java:397-404 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"91a6caf6c040b2923067cb2f10cbe51486d1b1b17b601aa4851f1ae075fdecc2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/android/URLibraryFile.java:46-52 | unidbg-ios/src/main/java/com/github/unidbg/ios/URLibraryFile.java:45-51 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/URLibraryFile.java"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"765341ebc6c7e31533ee8fa448060933fab4360597a72751ba1ef6e44ff5b598"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/DoubleArray.java:29-36 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/FloatArray.java:29-36 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/IntArray.java:29-36 | unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/ShortArray.java:29-36 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/array/DoubleArray.java"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9da537857e78754a071ca993e6c4809170e933565ce6a7170e51abaa9da4240"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/ByteArrayFileIO.java:71-84 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/ByteArrayFileIO.java:49-62 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/ByteArrayFileIO.java"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebf06bbe86a11028aaff05b1523d0771f8ac776d5254bbf50926dbfa1d325feb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/ByteArrayFileIO.java:102-110 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/ByteArrayFileIO.java:65-73 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/ByteArrayFileIO.java"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd3381b26d70a8db464c63ccdc80edc94eb086647d06c6cbe8ef2b9e562e5e77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java:53-64 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java:53-64 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e8fea1c670fb6c024159e153f057d27b5150c155931a5f915bfc5a9af6c7019"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java:70-79 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java:80-89 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"77d08f893f149b315202fcc532c1e3c4f0315b4cfb697c22c11aacc564255855"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java:198-204 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java:159-165 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"1013f59245a9516d61a533d5f86a98a860579c607b32a2c892e6a684861d24f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java:207-213 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java:168-174 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"19f08c0cfb20345a25d663fe311cf6bc8f5fba1b1289a6f72700de054a6da92e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java:247-255 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java:192-200 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbd33ce111f61a86357855f96480302881e28c55185964da6e7638292abba1d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java:258-266 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java:203-211 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"e413a49da523e478f5790a061f07e5f8747befe7970f925645cf37ddbe12a45d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java:281-287 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java:226-232 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f6520830318d52f0f981d77e7ec5986d8b4704ea23a28c723fff389198b4527"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java:91-98 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/Stdout.java:91-98 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/Stdout.java\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e6e8bdd1bf292149c82f8df863d8abfb2f251d61a12d79cbc9da0ae437e6737"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java:101-107 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/Stdout.java:101-107 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/Stdout.java\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/file/Stdout.java"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaccaca5fff746bacbcb7652bb88621ba0adb54eb8eb874c0b519599fcd10d9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java:39-45 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java:38-44 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/TcpSocket.java\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/TcpSocket.java"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bb6b4b5ba8863d166fb3c4927c5fcebb466bb909dbe3a7354a4ccd9002fd86b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/thread/KitKatThread.java:29-35 | unidbg-android/src/main/java/com/github/unidbg/linux/thread/MarshmallowThread.java:37-43 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/thread/KitKatThread.java"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"83771061247c71cfcdff1ba718b24217964b544fcb0074bd3ce5cc5b258ebee4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/arm/Arm64Hook.java:106-112 | unidbg-api/src/main/java/com/github/unidbg/arm/ArmHook.java:95-101 \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":"unidbg-api/src/main/java/com/github/unidbg/arm/Arm64Hook.java"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbeea906d8c381e8ee9ffc52d8923abce1c863ab5290d37f374ca4c51076d4bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:742-750 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:752-760 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:944-952 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:954-962 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":742}}}],"partialFingerprints":{"codehealthFindingId/v1":"49d9d2e6f2e68d42d9edff8a027293ab61d67cecb4a32b4976eb5bee328e3367"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:793-801 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:985-993 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":793}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c0633bf19f376ac6338a343ac8bd0d9eba646e42add0c636445f6b20e5c5b29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:936-944 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1186-1193 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":936}}}],"partialFingerprints":{"codehealthFindingId/v1":"b32181675a9d3f2a2db1e69c33a1fa4a3a42892c5549613bdac8b9f19da01552"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:995-1003 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1049-1057 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:434-442 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also 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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060emulator\u0060 to \u0060Emulator\u003C?\u003E\u0060 in one and \u0060Emulator\u003CDarwinFileIO\u003E\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":995}}}],"partialFingerprints":{"codehealthFindingId/v1":"2da346992f13fad67db024b1e20de5ae37c9ea36d3de357f70bc2fa71f50217e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARM64Emulator.java:109-113 | unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARMEmulator.java:95-99 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARM64Emulator.java"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"c531b00aa57beaf10486cb43e08065e3590d5faf320a1d30bcdcd5dc182241b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): unidbg-ios/src/main/java/com/github/unidbg/ios/file/DirectoryFileIO.java:100-110 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/JarEntryFileIO.java:35-45 | unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java:67-77 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/file/DirectoryFileIO.java"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"53809ca9b9abd7031bc4824ab2749d9a375e9cdbfbf15820304a4a5a25728e43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/DynarmicBackend.java:103-109 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/KvmBackend.java:189-195 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/DynarmicBackend.java"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"e54a2e015198ebab1b1d795e885429558a0f12ebfd210cae5b6e6dfb6675ad62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/DynarmicBackend.java:121-127 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/DynarmicBackend.java:130-136 | backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/HypervisorBackend.java:108-114 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/DynarmicBackend.java"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"982d1cae7eb9167eaf1bc8828c78e7b19a9d35dff9a5421e1a811c9286e8fb05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:69-78 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:59-68 \u2014 before extracting anything, compare \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java\u0060 and \u0060backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060callback\u0060 to \u0060DynarmicCallback\u0060 in one and \u0060KvmCallback\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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"a938941909c4e1dc4d791203dd51c8a074c4845ffe67d135ef48911de4a42d8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:80-85 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:240-245 \u2014 before extracting anything, compare \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java\u0060 and \u0060backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2800f47e71502d1affe9f09142230d05b3251861c163ee8810dec0a30b4933f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:87-96 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:247-256 \u2014 before extracting anything, compare \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java\u0060 and \u0060backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"5df9eb33bb3949a45908ddaf0c286d14a5678c9128c433dcbd75b00e3b62a791"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 13): backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:131-139 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:165-173 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:175-183 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:185-193 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:224-232 | backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java:264-272 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:93-101 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:103-111 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:113-121 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:123-131 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:187-195 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:197-205 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java:207-215 \u2014 before extracting anything, compare \u0060backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java\u0060 and \u0060backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/Kvm.java\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060value\u0060 to \u0060long\u0060 in one and \u0060int\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":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/Dynarmic.java"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"4799feb51648a4b33d43d2a349bea2258798c39dd51aa5f468d21a865f6374a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:2003-2007 | unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java:1530-1534 \u2014 before extracting anything, compare \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 556 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":2003}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad3dfc40b75be14eab3ada63329dcc46f38e05c271ec379cecb63c1bcbca5a93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java:679-686 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:2401-2408 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"933376cbc40bcd71559dad8387aa582edc3ad424f9fa53e1aecc8158b8388d30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:65-73 | unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java:75-83 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1634-1642 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also 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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060emulator\u0060 to \u0060Emulator\u003C?\u003E\u0060 in one and \u0060Emulator\u003CAndroidFileIO\u003E\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"f34235865907ca98a1410da7a42b6256dcbea365f88bff363dbe244cfb7af86c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/HookZzArm32RegisterContextImpl.java:16-20 | unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/HookZzArm64RegisterContextImpl.java:15-19 \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":"unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/HookZzArm32RegisterContextImpl.java"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"64b70040198112d8a3353080c4c29092d35d301ca6c209705fe97b77432b423e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/hook/whale/Whale.java:78-82 | unidbg-ios/src/main/java/com/github/unidbg/ios/hook/Substrate.java:120-124 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/hook/whale/Whale.java"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"0faa01b86161d103885f103c5a94241c44ee9956f7c30fd5fba2d1b69405c6af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:203-209 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:68-74 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bd0ac03aa837be7203014e26467704337bbacff0afcbb84b50a6827dce04e61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:213-220 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:42-49 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"a32b888c654c25e87ac170c2564768ae65531523993d91358641460b3eb86a03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java:617-622 | unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java:1367-1372 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b34ef6904b5e985aecf5f25ff16cd212ba27ac16212ecbe6350cc09b7189e2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/gpb/GPBDataType.java:68-75 | unidbg-ios/src/main/java/com/github/unidbg/ios/gpb/GPBFieldType.java:12-19 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/gpb/GPBDataType.java"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0f8e8adbd368f571316611e1ee595c4589853ac6e5034840856ca26251745fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java:704-710 | backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java:81-87 \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 \u0060backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java:704\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":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java"},"region":{"startLine":704}}}],"partialFingerprints":{"codehealthFindingId/v1":"40552adc342c2c5f83a9781797e978740c8ac8ebad3e95351f0356822d6994bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java:1758-1762 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2847-2851 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:2847\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1758}}}],"partialFingerprints":{"codehealthFindingId/v1":"08a5bad719d2396cca4945588c5895fffcd4a01c95fb12d9403eecf83fe8f32b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:964-968 | unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java:1000-1004 \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":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb88a895e61b534dca40bdc031ba9aa04ca65175a7366c4b70fed35eab15225c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1176-1180 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1701-1705 \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1176}}}],"partialFingerprints":{"codehealthFindingId/v1":"582a3455303339fbf52c31385ffbb87e66a95d7a1a94efe62f92019e493b24e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1610-1614 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2223-2227 \u2014 before extracting anything, compare \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1610\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, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2228\u0060 calls \u0060debug\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java:1615\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1610}}}],"partialFingerprints":{"codehealthFindingId/v1":"728a0b04503748caeba463f27feeb2afbb4c28407ea87b8ebf61fa54d0c8a187"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1416-1420 | unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:2474-2478 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java:1416\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1416}}}],"partialFingerprints":{"codehealthFindingId/v1":"726edcc3685e66529c9ae9ec14c87cde0b6a2a80f7c98756613a5cb325336d89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:594-598 | unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:644-648 \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 \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:594\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:641\u0060 calls \u0060isDebugEnabled\u0060, \u0060debug\u0060, \u0060toHexString\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java:593\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":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"340a4fabd044685fc617fd3e8672b82eed1b6183ad7bb419c1e45f950bf9f827"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AndroidSyscallHandler (LCOM4 6): AndroidSyscallHandler\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"11953538b4aedc1a9634983f228f5c00e3dd56a3819900500f278e2cb7266d6e"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AbstractARM64Emulator (LCOM4 4): AbstractARM64Emulator\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARM64Emulator.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec4db681b4dd29afb0501448545a2ae9bfe8622994c2a1ca87191224d6a8f508"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AbstractARMEmulator (LCOM4 4): AbstractARMEmulator\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMEmulator.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"082777f4994adbd42d84810b4d9c1b156a9a079d86f5e6ed9104a1dfa04d87fe"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AbstractLoader (LCOM4 4): AbstractLoader\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/spi/AbstractLoader.java"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"26bfe8cf59259e26a80021fb25ebd527b210baf8b008dcb6ad35ce1c5355b533"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AbstractEmulator (LCOM4 4): AbstractEmulator\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/AbstractEmulator.java"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1337580bb4f3ea4ef4aac370b3d5decf5fcaa1b48685b2e8bb51bc5ecf953c2"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: Substrate (LCOM4 4): Substrate\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/hook/Substrate.java"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4b8b16cf25b6bebe1c3cc84212829a0e1a588f44814c814cc7699e1f4ff6d56"}},{"ruleId":"D14","level":"error","message":{"text":"Banned license: com.github.zhkl0228:unicorn: \u0060com.github.zhkl0228:unicorn\u0060 1.0.15 is published on Maven Central under \u0060GPL-2.0\u0060, which this policy bans, and this repository declares it in a Maven or Gradle manifest. The licence was read from the artifact\u0027s POM \u0060\u003Clicenses\u003E\u0060 block \u2014 following \u0060\u003Cparent\u003E\u0060 where the POM inherits them \u2014 and normalised to SPDX before it was judged, because Maven publishes the name as free text (\u0060GNU Affero General Public License v3\u0060 is AGPL-3.0). Where a POM lists several licences they are read as a CHOICE, per Maven\u0027s own documentation, so this is charged only because EVERY listed licence is banned. Replace the dependency, or record an accepted exception."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"8e09314dd3d84e9cd9ec21dd246878a396fb102262128b2f5986a502f0a44d73"}},{"ruleId":"D14","level":"error","message":{"text":"Banned license: com.github.zhkl0228:keystone: \u0060com.github.zhkl0228:keystone\u0060 0.9.7 is published on Maven Central under \u0060GPL-2.0\u0060, which this policy bans, and this repository declares it in a Maven or Gradle manifest. The licence was read from the artifact\u0027s POM \u0060\u003Clicenses\u003E\u0060 block \u2014 following \u0060\u003Cparent\u003E\u0060 where the POM inherits them \u2014 and normalised to SPDX before it was judged, because Maven publishes the name as free text (\u0060GNU Affero General Public License v3\u0060 is AGPL-3.0). Where a POM lists several licences they are read as a CHOICE, per Maven\u0027s own documentation, so this is charged only because EVERY listed licence is banned. Replace the dependency, or record an accepted exception."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"47abc1de17e0f480b1b336cb195a59fc1f282c11adf4514c9444e0bf90b332db"}},{"ruleId":"D14","level":"error","message":{"text":"Banned license: com.github.zhkl0228:demumble: \u0060com.github.zhkl0228:demumble\u0060 1.0.4 is published on Maven Central under \u0060GPL-2.0\u0060, which this policy bans, and this repository declares it in a Maven or Gradle manifest. The licence was read from the artifact\u0027s POM \u0060\u003Clicenses\u003E\u0060 block \u2014 following \u0060\u003Cparent\u003E\u0060 where the POM inherits them \u2014 and normalised to SPDX before it was judged, because Maven publishes the name as free text (\u0060GNU Affero General Public License v3\u0060 is AGPL-3.0). Where a POM lists several licences they are read as a CHOICE, per Maven\u0027s own documentation, so this is charged only because EVERY listed licence is banned. Replace the dependency, or record an accepted exception."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"4725816429b62a189a64ebd419a8dfd132ad2504839f5bc8fb0bc62618e60648"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java: unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 105 in AndroidElfLoader.loadInternal at line 311. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-18 17:19:27 \u002B08:00\u0027 --until=\u00272026-11-16 17:19:27 \u002B08:00\u0027 --full-history --no-merges -- unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java\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":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"d28168b222c79e7e8a1be44e3d3b5acb69be1090b50cb691029da9753fd1e02c"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 17 significant file(s) lose their only recent owner: unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java, unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java, unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java, backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java, unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java, unidbg-api/src/main/java/com/github/unidbg/mcp/McpServer.java, backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/Hypervisor.java, unidbg-api/src/main/java/com/github/unidbg/arm/backend/UnicornBackend.java (\u002B9 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"8fcc51ef74ded4800762bcab09ecc2bdde2aae650c9a2583867834ac572e7529"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #2: If anonymized user #2 becomes unavailable, 4 significant file(s) lose their only recent owner: unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java, unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java, unidbg-api/src/main/java/com/github/unidbg/Module.java, unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/apk/ApkFile.java. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"babdf89b1b128a6a83d2141b69a4f22788d285780e8a428036675694b03cd916"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (26 single-owned of 198 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 198 of the 752 production source files in this repository met that bar). They are anonymized user #3 (2 file(s)), anonymized user #4 (2 file(s)) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/FallbackJni.java, unidbg-api/src/main/java/com/github/unidbg/arm/FastTracer.java, unidbg-api/src/main/java/com/github/unidbg/AssemblyCodeDumper.java, unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/XxHash32.java."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: implement \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7f9afeb1cb038563f8220324eaf811ece9e676c3f2c9cfc07a5d240daa06ea0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: implement \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":858}}}],"partialFingerprints":{"codehealthFindingId/v1":"76d44d83104a15d1a630bf966b9d3f92504761948e8593968144db2b3fdb5f5b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: implement \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe2a4b18c740b0ed5838eaeae0a1b3c9200d89e4f8268e763de0f7bc652c05b2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: implement \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":937}}}],"partialFingerprints":{"codehealthFindingId/v1":"f81ffe9515e47765b4ba0df476f8a6803a8e86d1c2a6eaf77426af78a9b16453"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: implement \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1209}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3ebfee9d0a3c276e24a9b56eb61216f6d68edc31cd3d9dd62b0f055b3cfd10d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: implement \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":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1215}}}],"partialFingerprints":{"codehealthFindingId/v1":"26417d4885066c88a78655d697572a5d211e80c14b95d74551563945997a6a1b"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060AndroidElfLoader\u0060 spells \u0060Elf\u0060 where 17 names in the project spell it \u0060ELF\u0060: 17 of 18 names in project unidbg-android spell the token \u0060ELF\u0060 (17 of 18; unit: names in project unidbg-android containing \u0060ELF\u0060). Peers: EmptySymbolLocator.getELFSymbol (unidbg-android/src/main/java/com/github/unidbg/linux/EmptySymbolLocator.java:12); EmptySymbolLocator.getELFSymbolByName (unidbg-android/src/main/java/com/github/unidbg/linux/EmptySymbolLocator.java:17); EmptySymbolLocator.getELFSymbolByAddr (unidbg-android/src/main/java/com/github/unidbg/linux/EmptySymbolLocator.java:22); 1.getELFSymbolByName (unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java:73); LinuxModule.getELFSymbolByName (unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java:184). Rename to \u0060AndroidELFLoader\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"96fb079bed36a969b5ce15eadaa18de8ddf8513e67bee06baf313719da5e979f"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060notifyCallSVC\u0060 spells \u0060SVC\u0060 where 13 names in the project spell it \u0060Svc\u0060: 13 of 14 names in project unidbg-api spell the token \u0060Svc\u0060 (13 of 14; unit: names in project unidbg-api containing \u0060Svc\u0060). Peers: AbstractEmulator.getSvcMemory (unidbg-api/src/main/java/com/github/unidbg/AbstractEmulator.java:122); Emulator.getSvcMemory (unidbg-api/src/main/java/com/github/unidbg/Emulator.java:109); com.github.unidbg.arm.ARMSvcMemory (unidbg-api/src/main/java/com/github/unidbg/arm/ARMSvcMemory.java:23); ARMSvcMemory.getSvc (unidbg-api/src/main/java/com/github/unidbg/arm/ARMSvcMemory.java:113); ARMSvcMemory.registerSvc (unidbg-api/src/main/java/com/github/unidbg/arm/ARMSvcMemory.java:118). Rename to \u0060notifyCallSvc\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/backend/InterruptHookNotifier.java"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"77b26010c8af8a4a468420521272dc526f71341e3e6c3ff725d429807629d458"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060unidbg-android\u0060 (30114 LoC, 175 module-visible types across 18 directories) overshoots its size bounds. 3 of 7 build unit(s) (Maven) overshoot their size bounds, lowering Project Cohesion to 1.4/10. Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/pom.xml"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"97f9864627b317657dd87a56b4c8cf667b132ae0da2f18c2fbf939a0a7e56f7b"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060unidbg-ios\u0060 (29116 LoC, 349 module-visible types across 27 directories) overshoots its size bounds. 3 of 7 build unit(s) (Maven) overshoot their size bounds, lowering Project Cohesion to 1.4/10. Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/pom.xml"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"11303f9fcea613111b96b996a305a8dea95402b5520154981cbc900643ddb870"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060unidbg-api\u0060 (18608 LoC, 207 module-visible types across 26 directories) overshoots its size bounds. 3 of 7 build unit(s) (Maven) overshoot their size bounds, lowering Project Cohesion to 1.4/10. Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/pom.xml"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ecc870b11bcfb60d6f22b5a67284be1d9d628bbb051d78239220836e442dcc9"}},{"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":"39b0872f2ae5cb9cb2516bc643591e0f16fe7df2d23e422b56fda4658f6889c2"},"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":"f35d6d1eef29ba59e6d93cc2d2a70e170067997a5b409a496d73d47424857b0d"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04: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":"9421e8577ad57b298d3de0c890708abf1d15d0d62d5d6b7f6d25073cde55a8d5"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04: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":"0445105ba3d321c5966c0217538cc0976c6c862f354fa07ce3a9be9db88b8a75"},"taxa":[{"id":"CWE-330","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04: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":"92e2be256f070fdd797b87bf0da9e7d33fea688a2a8231c9ade776842806b525"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","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":"709dcc742bfe25fbe8861176ef05948c016df80979ceb6aa912f12d6939ff797"}},{"ruleId":"D31","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":"7db6857dea80e0075a36a56dea11f948f6ff2e2936724227b42514ff272e4ddb"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","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":"176bf7c3bbb1ee5ce250eb72ec83e9ad0bcd40251a9186770b942d75490fa024"}},{"ruleId":"D31","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":"05b6e6428523760ae383258568eae23d21b152b82cc977b16d108431889441dd"}},{"ruleId":"D31","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":"128ad40a18c186ae9fcca05063bd07c7a061d1aeaa60c73324e7c5bf7a1704a6"},"taxa":[{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"aceb2cbf232c604b7143ab97a0e0035ef125294260be69aea6c16a2e3f0148f5"}},{"ruleId":"D31","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":"5871fcb05b8610024742161a1c6d8274a064bc84e798465e1b1e4285a4d2c451"}},{"ruleId":"D31","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":"8d75c5145252709285f91c61377cb9e127b129b48e106c7fa4b7d4a701b58692"}},{"ruleId":"D31","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":"de85d4badc49622ddbd327b51fc239907c4eff90ef9aceb95992222e20e78cac"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","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":"0e1307721a2b4af152368d88b15ee7ef141a1e5180e1abf0cd75fa735afb5221"}},{"ruleId":"D31","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":"4f85a7888a30303acd8af300d2f9bea97802bb9ff9d2ff1f7499513e7a8a6ea5"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","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":"a5dccafc6760a3a3ec80cfce3651b1488eb457cfe666f8ca27546cdcdbfc338d"},"taxa":[{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"ae679be55fcbe4da8f4ad95553b5fa118d9ff7b5390d64f7d3f6cc455dc61bf8"}},{"ruleId":"D31","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":"8e6354de68fc19cf1c6492b0f0c5a69832beb3379d1d3eabe7513367d24825b7"}},{"ruleId":"D31","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":"c83182ad157d851b1abd89ba2a04b4406d0d607e0a882498637686a345a18905"},"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":"D31","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":"ef280ed15e4217aa9fab62e9e2fe17e2326141311258c85d37331750c08ab76e"},"taxa":[{"id":"CWE-1357","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-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"46b5be036433fe2c9938703c1e75a4fff3fa00fb2ae444481785b0c22325f2e7"}},{"ruleId":"D31","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":"9c951028e3eeb4a8d7e8a08ccc98512d7e7f580e490c3c3747d26090a3e6bf9c"}},{"ruleId":"D31","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":"276a5c9a84b62ce4ed2de9df106d70df837b484d72115e9f07aafd5ebdf587e6"},"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":"D31","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":"83af87f381177c06a029f21e5e6d3cdf60ecd00ebb427bccacccda167efcab7c"},"taxa":[{"id":"CWE-1357","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-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"4c5713aca59f03de66831b3990ceda53c69d7f1355c32c5894669ffa05c8c66b"}},{"ruleId":"D31","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":"5f82a0a050a7b0761380fb47dc5679351d1a0a6a41611cd0adb71e1d73c6d934"},"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":"D31","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":"19bd6191ec24277affd75ed0c6b6e948bdeac8ec8fa08cbf0692ec2f3921f8fb"}},{"ruleId":"D31","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":"74aa4852d9d0940d299cdb05c1e1f8c0f14249b7d5d0c1e3aefcc81db3a7a210"},"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":"D31","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":"6d6167fa2e1eb8f984bf9b7dfa2e31030e584b6051f2e54b561cde2c57fec72f"}},{"ruleId":"D31","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":"a12d742cdec02ae977e2cff7e6f6d09a92cf347f47418c254fd65933e8d9aa39"}},{"ruleId":"D31","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":"eb4dcc9fdc5caa5af31c7a09722a0d0da27321efde3458a3b05dc80b1ca3523a"},"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":"D31","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":"bfbe8551761e7690657a43e7e639c06fb604b4f23600f83e3384c408645fbb0b"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: AbstractJni.java \u2194 JniFunction.java: \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/JniFunction.java\u0060 change together 97% of the time (32 of the 33 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 32 shared commits counted here, the most recent 3 are \u0060c750e666\u0060 android: add ProxyClassFactory.fallbackJni; \u0060aa90fe47\u0060 android: implement SetStaticBooleanField; \u00608175402b\u0060 add support for JNI Function SetStaticObjectField under ARM32 (#361) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c4f1e608288f4c68eddce75bb4351312cd3dfb230f7d5e4e8b75bc6bf48e539"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: Arm64Hook.java \u2194 ArmHook.java: \u0060unidbg-api/src/main/java/com/github/unidbg/arm/Arm64Hook.java\u0060 and \u0060unidbg-api/src/main/java/com/github/unidbg/arm/ArmHook.java\u0060 change together 91% of the time (10 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are \u00604610d636\u0060 Refactor ArmHook/Arm64Hook: save/restore registers on stack instead o\u2026; \u00603c73988f\u0060 android: Android64Test.java support NestedRun.; \u00602367f5f8\u0060 api: Bug fix for ArmHook and Arm64Hook, thanks \u566C\u8840\u706C\u9B54\u795E \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/Arm64Hook.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"136eb4e75bb0fe2e0aa6251b61cdf12ae6cae3c085434f6da930cedc19e6ceac"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: AbstractJni.java \u2194 ProxyJni.java: \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java\u0060 and \u0060unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/jni/ProxyJni.java\u0060 change together 79% of the time (31 of the 39 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 31 shared commits counted here, the most recent 3 are \u0060c750e666\u0060 android: add ProxyClassFactory.fallbackJni; \u0060aa90fe47\u0060 android: implement SetStaticBooleanField; \u00608175402b\u0060 add support for JNI Function SetStaticObjectField under ARM32 (#361) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/AbstractJni.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"76c4b21774a3ccf194ecb2d0759c93e2c84ceee794ea2395e7d2d89226bdc6f7"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: ARM64SyscallHandler.java \u2194 DirectoryFileIO.java: \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/file/DirectoryFileIO.java\u0060 change together 69% of the time (11 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are \u0060a03ad935\u0060 ios: Update JarEntryFileIO.java and DirectoryFileIO.java; \u006020d2c767\u0060 ios: Update UIKit; \u0060a70df842\u0060 Bug fix \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b3cd14dbbf9d1a681db0a79a6e299bb7d3a542ac70b21802fc214d350dc9cf4"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: ARM64SyscallHandler.java \u2194 SymbolResolver.java: \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java\u0060 and \u0060unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/SymbolResolver.java\u0060 change together 58% of the time (11 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are \u0060b037fca9\u0060 ios: Update SymbolResolver.java; \u0060deb28d32\u0060 ios: Update LibDispatchPatcher.java; \u0060fa874a42\u0060 ios: SubstrateTest.java tested. \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2016c6d19953b7eaff14b1c67057eb8ae8f06d9757cdd5983f2e8323c9801a4c"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cf5af2256e90889c13bbf584055bced85bec1261e5a5227084340d834cbf635"},"taxa":[{"id":"CICD-SEC-5","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"AX6","level":"note","message":{"text":"Fat interface: Jni (109 abstract methods): \u0060Jni\u0060 declares 109 abstract methods: \u0060acceptField\u0060, \u0060acceptMethod\u0060, \u0060allocObject\u0060, \u0060callBooleanMethod\u0060, \u0060callBooleanMethod\u0060, \u0060callBooleanMethodV\u0060, \u0060callBooleanMethodV\u0060, \u0060callByteMethodV\u0060, \u0060callByteMethodV\u0060, \u0060callCharMethodV\u0060, \u0060callCharMethodV\u0060, \u0060callDoubleMethod\u0060, \u0060callDoubleMethod\u0060, \u0060callFloatMethodV\u0060, \u0060callFloatMethodV\u0060, \u0060callIntMethod\u0060, \u0060callIntMethod\u0060, \u0060callIntMethodV\u0060, \u0060callIntMethodV\u0060, \u0060callLongMethod\u0060, \u0060callLongMethod\u0060, \u0060callLongMethodV\u0060, \u0060callLongMethodV\u0060, \u0060callObjectMethod\u0060, \u0060callObjectMethod\u0060, \u0060callObjectMethodV\u0060, \u0060callObjectMethodV\u0060, \u0060callShortMethodV\u0060, \u0060callShortMethodV\u0060, \u0060callStaticBooleanMethod\u0060, \u0060callStaticBooleanMethod\u0060, \u0060callStaticBooleanMethodV\u0060, \u0060callStaticBooleanMethodV\u0060, \u0060callStaticDoubleMethod\u0060, \u0060callStaticDoubleMethod\u0060, \u0060callStaticFloatMethod\u0060, \u0060callStaticFloatMethod\u0060, \u0060callStaticIntMethod\u0060, \u0060callStaticIntMethod\u0060, \u0060callStaticIntMethodV\u0060, and 69 more. Counted over its ABSTRACT methods, once per signature; \u0060default\u0060, \u0060static\u0060 and \u0060private\u0060 methods and constants are not counted, because no implementer is forced to write them. Those 109 declarations carry 56 distinct name(s), so part of the width is overloading rather than separate responsibilities \u2014 but 56 operations clears the \u003E15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don\u0027t use (the Interface-Segregation \u0027I\u0027 in SOLID). Split it into focused role-interfaces."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/Jni.java"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"75ad310d9a0e3cdfe8470038c08dcb94ccbf009c70c8a5df4d96f10e0d3d18fc"}},{"ruleId":"AX6","level":"note","message":{"text":"Fat interface: VM (30 abstract methods): \u0060VM\u0060 declares 30 abstract methods: \u0060addGlobalObject\u0060, \u0060addLocalObject\u0060, \u0060addNotFoundClass\u0060, \u0060callJNI_OnLoad\u0060, \u0060findClass\u0060, \u0060findLibrary\u0060, \u0060getEmulator\u0060, \u0060getJNIEnv\u0060, \u0060getJavaVM\u0060, \u0060getManifestXml\u0060, \u0060getObject\u0060, \u0060getPackageName\u0060, \u0060getSignatures\u0060, \u0060getVersionCode\u0060, \u0060getVersionName\u0060, \u0060loadLibrary\u0060, \u0060loadLibrary\u0060, \u0060loadLibrary\u0060, \u0060openAsset\u0060, \u0060printMemoryInfo\u0060, \u0060resolveClass\u0060, \u0060setAssetResolver\u0060, \u0060setDvmClassFactory\u0060, \u0060setHashFunction\u0060, \u0060setJni\u0060, \u0060setVerbose\u0060, \u0060setVerboseFieldOperation\u0060, \u0060setVerboseMethodOperation\u0060, \u0060throwException\u0060, \u0060unzip\u0060. Counted over its ABSTRACT methods, once per signature; \u0060default\u0060, \u0060static\u0060 and \u0060private\u0060 methods and constants are not counted, because no implementer is forced to write them. Those 30 declarations carry 28 distinct name(s), so part of the width is overloading rather than separate responsibilities \u2014 but 28 operations clears the \u003E15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don\u0027t use (the Interface-Segregation \u0027I\u0027 in SOLID). Split it into focused role-interfaces."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/VM.java"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"beff0a7c705bec2bdb23913d304c18d20fe47d1f50cc8ac5ef6ff97637dbc90c"}},{"ruleId":"AX6","level":"note","message":{"text":"Fat interface: Backend (36 abstract methods): \u0060Backend\u0060 declares 36 abstract methods: \u0060addBreakPoint\u0060, \u0060context_alloc\u0060, \u0060context_free\u0060, \u0060context_restore\u0060, \u0060context_save\u0060, \u0060debugger_add\u0060, \u0060destroy\u0060, \u0060emu_start\u0060, \u0060emu_stop\u0060, \u0060enableVFP\u0060, \u0060getCpuFeatures\u0060, \u0060getMemAllocatedSize\u0060, \u0060getMemResidentSize\u0060, \u0060getPageSize\u0060, \u0060hook_add_new\u0060, \u0060hook_add_new\u0060, \u0060hook_add_new\u0060, \u0060hook_add_new\u0060, \u0060hook_add_new\u0060, \u0060hook_add_new\u0060, \u0060mem_map\u0060, \u0060mem_protect\u0060, \u0060mem_read\u0060, \u0060mem_unmap\u0060, \u0060mem_write\u0060, \u0060onInitialize\u0060, \u0060reg_read\u0060, \u0060reg_read_vector\u0060, \u0060reg_write\u0060, \u0060reg_write_vector\u0060, \u0060registerEmuCountHook\u0060, \u0060removeBreakPoint\u0060, \u0060removeJitCodeCache\u0060, \u0060setFastDebug\u0060, \u0060setSingleStep\u0060, \u0060switchUserMode\u0060. Counted over its ABSTRACT methods, once per signature; \u0060default\u0060, \u0060static\u0060 and \u0060private\u0060 methods and constants are not counted, because no implementer is forced to write them. Those 36 declarations carry 31 distinct name(s), so part of the width is overloading rather than separate responsibilities \u2014 but 31 operations clears the \u003E15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don\u0027t use (the Interface-Segregation \u0027I\u0027 in SOLID). Split it into focused role-interfaces."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/backend/Backend.java"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcfb458f15f945c92fc9b579f37ff79a3d412b9198f332a2e2395beafead87e1"}},{"ruleId":"AX6","level":"note","message":{"text":"Fat interface: Arm32RegisterContext (39 abstract methods): \u0060Arm32RegisterContext\u0060 declares 39 abstract methods: \u0060getR0Int\u0060, \u0060getR0Long\u0060, \u0060getR0Pointer\u0060, \u0060getR10Int\u0060, \u0060getR10Long\u0060, \u0060getR10Pointer\u0060, \u0060getR11Int\u0060, \u0060getR11Long\u0060, \u0060getR11Pointer\u0060, \u0060getR12Int\u0060, \u0060getR12Long\u0060, \u0060getR12Pointer\u0060, \u0060getR1Int\u0060, \u0060getR1Long\u0060, \u0060getR1Pointer\u0060, \u0060getR2Int\u0060, \u0060getR2Long\u0060, \u0060getR2Pointer\u0060, \u0060getR3Int\u0060, \u0060getR3Long\u0060, \u0060getR3Pointer\u0060, \u0060getR4Int\u0060, \u0060getR4Long\u0060, \u0060getR4Pointer\u0060, \u0060getR5Int\u0060, \u0060getR5Long\u0060, \u0060getR5Pointer\u0060, \u0060getR6Int\u0060, \u0060getR6Long\u0060, \u0060getR6Pointer\u0060, \u0060getR7Int\u0060, \u0060getR7Long\u0060, \u0060getR7Pointer\u0060, \u0060getR8Int\u0060, \u0060getR8Long\u0060, \u0060getR8Pointer\u0060, \u0060getR9Int\u0060, \u0060getR9Long\u0060, \u0060getR9Pointer\u0060. Counted over its ABSTRACT methods, once per signature; \u0060default\u0060, \u0060static\u0060 and \u0060private\u0060 methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don\u0027t use (the Interface-Segregation \u0027I\u0027 in SOLID). Split it into focused role-interfaces."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/context/Arm32RegisterContext.java"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"63aff02a5772f5d836fd87305ca16fe1f4a023f5ff8c9e67dae8a83dcdfdfee2"}},{"ruleId":"AX6","level":"note","message":{"text":"Fat interface: FileIO (23 abstract methods): \u0060FileIO\u0060 declares 23 abstract methods: \u0060bind\u0060, \u0060close\u0060, \u0060connect\u0060, \u0060dup2\u0060, \u0060fcntl\u0060, \u0060ftruncate\u0060, \u0060getPath\u0060, \u0060getpeername\u0060, \u0060getsockname\u0060, \u0060getsockopt\u0060, \u0060ioctl\u0060, \u0060isStdIO\u0060, \u0060listen\u0060, \u0060llseek\u0060, \u0060lseek\u0060, \u0060mmap2\u0060, \u0060pread\u0060, \u0060read\u0060, \u0060recvfrom\u0060, \u0060sendto\u0060, \u0060setsockopt\u0060, \u0060shutdown\u0060, \u0060write\u0060. Counted over its ABSTRACT methods, once per signature; \u0060default\u0060, \u0060static\u0060 and \u0060private\u0060 methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don\u0027t use (the Interface-Segregation \u0027I\u0027 in SOLID). Split it into focused role-interfaces."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/file/FileIO.java"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ec97623badff01205e1633c0d2297122b8a222c12a33d8bbbd550fe1ae089c8"}},{"ruleId":"AX6","level":"note","message":{"text":"Fat interface: Debugger (17 abstract methods): \u0060Debugger\u0060 declares 17 abstract methods under just 11 distinct name(s): \u0060addBreakPoint\u0060, \u0060addBreakPoint\u0060, \u0060addBreakPoint\u0060, \u0060addBreakPoint\u0060, \u0060addBreakPoint\u0060, \u0060addBreakPoint\u0060, \u0060addMcpTool\u0060, \u0060close\u0060, \u0060disassembleBlock\u0060, \u0060getBreakPoints\u0060, \u0060hasRunnable\u0060, \u0060isDebugging\u0060, \u0060removeBreakPoint\u0060, \u0060run\u0060, \u0060setDebugListener\u0060, \u0060traceFunctionCall\u0060, \u0060traceFunctionCall\u0060. Counted over its ABSTRACT methods, once per signature; \u0060default\u0060, \u0060static\u0060 and \u0060private\u0060 methods and constants are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 17 separate responsibilities: a caller binds to 11 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller\u0027s side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER\u0027s \u2014 all 17 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/debugger/Debugger.java"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b2ce26859eb634e7ad5327cc436bbde47149e0a4b44f4c4cb6bd77309cbee60"}},{"ruleId":"AX6","level":"note","message":{"text":"Fat interface: Memory (20 abstract methods): \u0060Memory\u0060 declares 20 abstract methods: \u0060allocateStack\u0060, \u0060allocateThreadIndex\u0060, \u0060allocateThreadStack\u0060, \u0060brk\u0060, \u0060freeThreadIndex\u0060, \u0060getLastErrno\u0060, \u0060getMMapListener\u0060, \u0060getMemoryMap\u0060, \u0060getStackBase\u0060, \u0060getStackPoint\u0060, \u0060getStackSize\u0060, \u0060malloc\u0060, \u0060mmap\u0060, \u0060mmap2\u0060, \u0060mprotect\u0060, \u0060munmap\u0060, \u0060pointer\u0060, \u0060setErrno\u0060, \u0060setMMapListener\u0060, \u0060setStackPoint\u0060. Counted over its ABSTRACT methods, once per signature; \u0060default\u0060, \u0060static\u0060 and \u0060private\u0060 methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don\u0027t use (the Interface-Segregation \u0027I\u0027 in SOLID). Split it into focused role-interfaces."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/memory/Memory.java"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"c65cd41b80727541bb9addc4f3ecc8f83ca35b339f1f06c885809839da33a5d9"}},{"ruleId":"AX6","level":"note","message":{"text":"Fat interface: Loader (19 abstract methods): \u0060Loader\u0060 declares 19 abstract methods under just 15 distinct name(s): \u0060addHookListener\u0060, \u0060addModuleListener\u0060, \u0060disableCallInitFunction\u0060, \u0060dlclose\u0060, \u0060dlopen\u0060, \u0060dlopen\u0060, \u0060dlsym\u0060, \u0060findModule\u0060, \u0060findModuleByAddress\u0060, \u0060getLoadedModules\u0060, \u0060getMaxLengthLibraryName\u0060, \u0060getMaxSizeOfLibrary\u0060, \u0060load\u0060, \u0060load\u0060, \u0060load\u0060, \u0060load\u0060, \u0060loadVirtualModule\u0060, \u0060setCallInitFunction\u0060, \u0060setLibraryResolver\u0060. Counted over its ABSTRACT methods, once per signature; \u0060default\u0060, \u0060static\u0060 and \u0060private\u0060 methods and constants are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 19 separate responsibilities: a caller binds to 15 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller\u0027s side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER\u0027s \u2014 all 19 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/spi/Loader.java"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"08bc8e08938acfda7f113ff80540958815ed9302ffcbefd436bacfc0d40a59d0"}},{"ruleId":"AX6","level":"note","message":{"text":"Fat interface: Emulator\u003CT\u003E (43 abstract methods): \u0060Emulator\u003CT\u003E\u0060 declares 43 abstract methods: \u0060attach\u0060, \u0060attach\u0060, \u0060createURLibraryFile\u0060, \u0060eEntry\u0060, \u0060eFunc\u0060, \u0060emulateSignal\u0060, \u0060get\u0060, \u0060getBackend\u0060, \u0060getContext\u0060, \u0060getDlfcn\u0060, \u0060getFamily\u0060, \u0060getFileSystem\u0060, \u0060getMemory\u0060, \u0060getPageAlign\u0060, \u0060getPid\u0060, \u0060getPointerSize\u0060, \u0060getProcessName\u0060, \u0060getReturnAddress\u0060, \u0060getSvcMemory\u0060, \u0060getSyscallHandler\u0060, \u0060getThreadDispatcher\u0060, \u0060getUnwinder\u0060, \u0060is32Bit\u0060, \u0060is64Bit\u0060, \u0060isRunning\u0060, \u0060loadLibrary\u0060, \u0060loadLibrary\u0060, \u0060popContext\u0060, \u0060pushContext\u0060, \u0060set\u0060, \u0060setTimeout\u0060, \u0060setTraceSystemMemoryWrite\u0060, \u0060showRegs\u0060, \u0060showRegs\u0060, \u0060traceCode\u0060, \u0060traceCode\u0060, \u0060traceCode\u0060, \u0060traceRead\u0060, \u0060traceRead\u0060, \u0060traceRead\u0060, and 3 more. Counted over its ABSTRACT methods, once per signature; \u0060default\u0060, \u0060static\u0060 and \u0060private\u0060 methods and constants are not counted, because no implementer is forced to write them. Those 43 declarations carry 34 distinct name(s), so part of the width is overloading rather than separate responsibilities \u2014 but 34 operations clears the \u003E15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don\u0027t use (the Interface-Segregation \u0027I\u0027 in SOLID). Split it into focused role-interfaces."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/Emulator.java"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fa7bcb96f15cf303a7809adf3d480b1ef696d57574bcd42c731865dca378e4c"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"M2","level":"note","message":{"text":"No architecture diagram/doc: No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named \u0060architecture\u0060 or \u0060design\u0060 in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape \u2014 no \u0060## Architecture\u0060 heading, no \u0022architecture overview\u0022/\u0022high-level design\u0022 phrasing, no \u0022the architecture is \u2026\u0022 introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document \u2014 not evidence that nobody wrote the shape down."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0c190e7c159d1850ee706c3ac4486e151e8a4fe169de4bf61436b9f399654f06"}},{"ruleId":"P10","level":"note","message":{"text":"Implementation type on the public API: 1 public type in \u0060com.github.unidbg.linux.android\u0060 is marked as implementation by its own namespace, folder or name: \u0060XHookImpl\u0060 (unidbg-android/src/main/java/com/github/unidbg/linux/android/XHookImpl.java:12, name ends in \u0060Impl\u0060). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/XHookImpl.java"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ccef0d33a1c32dbb664eeb7df004f4a00e762f28504e89a46fe551ddb79d0ac"}},{"ruleId":"P10","level":"note","message":{"text":"Implementation type on the public API: 2 public types in \u0060com.github.unidbg.hook.hookzz\u0060 are marked as implementation by their own namespace, folder or name: \u0060HookZzArm32RegisterContextImpl\u0060 (unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/HookZzArm32RegisterContextImpl.java:11, name ends in \u0060Impl\u0060), \u0060HookZzArm64RegisterContextImpl\u0060 (unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/HookZzArm64RegisterContextImpl.java:10, name ends in \u0060Impl\u0060). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/hook/hookzz/HookZzArm32RegisterContextImpl.java"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"764ea5bff8f2a667947f48d36c804a7dedd455d704d6ec44773683c1234ba74f"}},{"ruleId":"P10","level":"note","message":{"text":"Implementation type on the public API: 1 public type in \u0060com.github.unidbg.memory\u0060 is marked as implementation by its own namespace, folder or name: \u0060MemoryBlockImpl\u0060 (unidbg-api/src/main/java/com/github/unidbg/memory/MemoryBlockImpl.java:7, name ends in \u0060Impl\u0060). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/memory/MemoryBlockImpl.java"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2c9f16440003c2b9357753542dd7e9d882389676b8bff14a4bc259dd9ffdda0"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add spotbugs with find-sec-bugs (or \u0060semgrep --config=auto\u0060, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P3","level":"note","message":{"text":"No dependency-update automation: \u0060pom.xml\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":"pom.xml"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"83ba56174326d291606b85af9bcc30fde25dfc5976574bf512182928ada72ae7"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!loadList.isEmpty() \u0026\u0026 !loadList.contains(FilenameUtils.getName(path))\u0060 appears character-identically in 2 files \u2014 unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLibraryFile.java, unidbg-ios/src/main/java/com/github/unidbg/ios/ipa/IpaLibraryFile.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/dmg/DmgLibraryFile.java"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"82206a17f74a15d9bbb97a841fa0e515553444b888f46727e936c2519a3846f4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060\u0022/data/misc/zoneinfo/current/tzdata\u0022.equals(pathname) || \u0022/dev/pmsg0\u0022.equals(pathname)\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java, unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":1898}}}],"partialFingerprints":{"codehealthFindingId/v1":"887029d13ef28d55d2e3b06782da1a8c14dfa183f7aa0d3bdef01753970ffb7e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060\u0022/dev/urandom\u0022.equals(pathname) || \u0022/dev/random\u0022.equals(pathname) || \u0022/dev/srandom\u0022.equals(pathname)\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/file/DriverFileIO.java, unidbg-ios/src/main/java/com/github/unidbg/ios/file/DriverFileIO.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/DriverFileIO.java"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc333a5f1654e1c685cff097d8a6e9fbd6401b5ee7aef633f419df43b60fa6c2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(args.anywhere != MachO.VM_FLAGS_OVERWRITE \u0026\u0026 args.anywhere != MachO.VM_FLAGS_FIXED) || args.mask != 0\u0060 appears character-identically in 2 files \u2014 unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java, unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2230}}}],"partialFingerprints":{"codehealthFindingId/v1":"89f0b057e7e82ba1804e444a4cb6580f93e31811a88a106464ac20d46a344756"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(int) handle == Dyld.RTLD_MAIN_ONLY \u0026\u0026 \u0022_os_trace_redirect_func\u0022.equals(symbolName)\u0060 appears character-identically in 2 files \u2014 unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java, unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"714a70415930ca045463dbbd96fb3bddf9d3c668bd7115fc734f5ba6e0058dd2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(regId \u003E= Arm64Const.UC_ARM64_REG_X0 \u0026\u0026 regId \u003C= Arm64Const.UC_ARM64_REG_X28) || (regId \u003E= Arm64Const.UC_ARM64_REG_X29 \u0026\u0026 regId \u003C= Arm64Cons\u2026\u0060 appears character-identically in 2 files \u2014 unidbg-api/src/main/java/com/github/unidbg/RegAccessPrinter.java, unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/RegAccessPrinter.java"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3814ec259413c93030e6c6153066a7e170aed1d1a138ba34f8ff90df9c529b4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(regId \u003E= ArmConst.UC_ARM_REG_R0 \u0026\u0026 regId \u003C= ArmConst.UC_ARM_REG_R12) || regId == ArmConst.UC_ARM_REG_LR || regId == ArmConst.UC_ARM_REG_SP \u2026\u0060 appears character-identically in 2 files \u2014 unidbg-api/src/main/java/com/github/unidbg/RegAccessPrinter.java, unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/RegAccessPrinter.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"31874c4aa18d75f7cb0378aa00b3c612f9ab56926b733ce9ca2c80a2b1d82d80"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060IO.STDOUT.equals(path) || IO.STDERR.equals(path)\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java, unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"790102f115b173a78c8ef0f8ec130e33a069ecc808ce93161821ef54f90f51df"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060PROC_INFO_CALL_PIDINFO == callNum \u0026\u0026 PROC_PIDT_SHORTBSDINFO == flavor\u0060 appears character-identically in 2 files \u2014 unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java, unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1253}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0a10390a9cd559c4e3c6070352f7158076aef99a339bdf09d48ceae7c2f9475"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060PROC_INFO_CALL_SETCONTROL == callNum \u0026\u0026 PROC_SELFSET_THREADNAME == flavor\u0060 appears character-identically in 2 files \u2014 unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java, unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1247}}}],"partialFingerprints":{"codehealthFindingId/v1":"2285329b0b671344448845d10100570a8dad0c0d9d408d7af17018b351fbf5bc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060action == AF_ROUTE \u0026\u0026 rt == NET_RT_IFLIST\u0060 appears character-identically in 2 files \u2014 unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java, unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1614}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfda778b9fc3c74b82fc1a58d746e9888d4c5e6437a19266d7aa9d3acb00dc43"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060action.needSigInfo() \u0026\u0026 infoBlock == null\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/signal/SignalFunction.java, unidbg-ios/src/main/java/com/github/unidbg/ios/signal/SignalTask.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/signal/SignalFunction.java"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"e847c9d906acc3c3291f7d29967d67c3adaab2860606e94739631d2a3b401d86"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060args.getAddress() \u003E= mm.base \u0026\u0026 args.getAddress() \u003C mm.base \u002B mm.size\u0060 appears character-identically in 2 files \u2014 unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java, unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2080}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5fba02b6c090c926a9456077a5a042a05bc4fa17b8fcff517c5af4c1548cbb8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060callback != null \u0026\u0026 !loader.addImageCallbacks.contains(callback)\u0060 appears character-identically in 2 files \u2014 unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java, unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"01eb10fe85781fbc2e40aafe382233d26c38e374f7930e2d536b30d368eaf3e5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060child_stack == null \u0026\u0026 context.getPointerArg(2) == null\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java, unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"dec44586ac86712b9c2e09c4692055c42fc2b40c683959442909230940a10589"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060dfsc == 0x00 \u0026\u0026 emulator.getFamily() == Family.iOS\u0060 appears character-identically in 2 files \u2014 backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java, backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b218a964c0d59a5c0baa6314483943e266a59b571015e3ceb75f3ec2ab37e93"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060dvmClass.getClass() == DvmClass.class \u0026\u0026 dvmClass.vm != null \u0026\u0026 dvmClass.vm.reserveSignatureCache(signature)\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java, unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmMethod.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/dvm/DvmField.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"f924edfdd320a4e0d8b1593fc2c55ef2dd107dad588d9dde254fbf9d07b7c58e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060dynamicStructure != null \u0026\u0026 dynamicStructure.soName \u003E 0 \u0026\u0026 dynamicStructure.dt_strtab_offset \u003E 0\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java, unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD64.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/android/ArmLD.java"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"658e431c98da8952d244e45663b0923ba9cc2792c36a7248f5773eb8e1c45522"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060elfSymbol != null \u0026\u0026 !elfSymbol.isUndef()\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java, unidbg-android/src/main/java/com/github/unidbg/linux/ModuleSymbol.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/LinuxModule.java"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"7621004e94041c19ff0b440b18859141c4447219d622bfe627c97c3bc931d89c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060exception == null \u0026\u0026 handleUnknownSyscall(emulator, NR)\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java, unidbg-android/src/main/java/com/github/unidbg/linux/ARM64SyscallHandler.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/ARM32SyscallHandler.java"},"region":{"startLine":532}}}],"partialFingerprints":{"codehealthFindingId/v1":"4317eb699809325ce94ade9eb4c2150b5edf455d9542b1d5e91d2def644f5f71"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060flags == 0x0 \u0026\u0026 dest_addr == null \u0026\u0026 addrlen == 0\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java, unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"576ee19a38ee4aeb2f967f63f6729f254d640845880c1962285b225f41cbdd9c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060flags == 0x0 \u0026\u0026 src_addr == null \u0026\u0026 addrlen == null\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java, unidbg-ios/src/main/java/com/github/unidbg/ios/file/SocketIO.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SocketIO.java"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"01a38f7126611dc7bdf2bc976f82631aca9e46b56d65034662e686c1e79053e1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060image_index \u003C 0 || image_index \u003E= modules.length\u0060 appears character-identically in 2 files \u2014 unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java, unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld64.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/Dyld32.java"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6578dfc85cdd792b161bd1252ce6eed5051faec5158e3421a18caf09c8b6b28"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060libraryResolver != null \u0026\u0026 neededLibraryFile == null\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java, unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"44021960933f6b183ede8aa540c86099be8525f711f0692d01ad342215330a82"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060log.isDebugEnabled() \u0026\u0026 data.length \u003C 0x3000\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java, unidbg-ios/src/main/java/com/github/unidbg/ios/file/SimpleFileIO.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/file/SimpleFileIO.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"b909ee597b57c7d965a5473a03adcc8b5fc38892a5a0be017edf1e9b05a2bb38"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060log.isDebugEnabled() || LoggerFactory.getLogger(AbstractEmulator.class).isDebugEnabled()\u0060 appears character-identically in 3 files \u2014 unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java, unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java, unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c9fd7d4ec7d1a884342898cb81b06972b57eb386ab4fe3afa615a4a0e5ac9b8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060opInfo.isUpdateFlags() || opInfo.isWriteBack() || !insn.getMnemonic().startsWith(\u0022ldr\u0022) || vaddr \u003C _COMM_PAGE64_BASE_ADDRESS\u0060 appears character-identically in 2 files \u2014 backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java, backend/kvm/src/main/java/com/github/unidbg/arm/backend/kvm/KvmBackend64.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"42596aea6d8745ea8c3445e569a9dd518014f1639bfb3fef52ca902fdf84ceda"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060regId \u003E= Arm64Const.UC_ARM64_REG_Q0 \u0026\u0026 regId \u003C= Arm64Const.UC_ARM64_REG_Q31\u0060 appears character-identically in 3 files \u2014 backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java, backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/HypervisorBackend.java, unidbg-api/src/main/java/com/github/unidbg/AssemblyCodeDumper.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/dynarmic/src/main/java/com/github/unidbg/arm/backend/dynarmic/DynarmicBackend64.java"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcf0981535b27af015a71270c3fdbe5100d546fa1943b2819f7a6e817fe2d367"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060regId \u003E= Arm64Const.UC_ARM64_REG_W0 \u0026\u0026 regId \u003C= Arm64Const.UC_ARM64_REG_W30\u0060 appears character-identically in 4 files \u2014 backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java, unidbg-api/src/main/java/com/github/unidbg/RegAccessPrinter.java, unidbg-api/src/main/java/com/github/unidbg/arm/ARM.java, unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/hypervisor/src/main/java/com/github/unidbg/arm/backend/hypervisor/HypervisorBackend64.java"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"caaf80ac093f09a663e6a36d40853db2fcfea4e2ed557ebf54266fe87e83fea6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060sigMaskSet == null || !sigMaskSet.containsSigNumber(sig)\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java, unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"638ac2c7f96cc1549b518b7694111a40a1cf87054ca18a018d0b89bc6f49f7fb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060size != 1 \u0026\u0026 size != 2 \u0026\u0026 size != 4 \u0026\u0026 size != 8\u0060 appears character-identically in 3 files \u2014 backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/unicorn/Unicorn.java, unidbg-api/src/main/java/com/github/unidbg/arm/backend/Backend.java, unidbg-api/src/main/java/com/github/unidbg/pointer/ByteArrayBackend.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/unicorn2/src/main/java/com/github/unidbg/arm/backend/unicorn/Unicorn.java"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dc84258fae223d8835c757612ced6865bb3d3ad4664579c87b1755f4294f78e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060start == 0 \u0026\u0026 fd \u003E 0 \u0026\u0026 (file = syscallHandler.getFileIO(fd)) != null\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java, unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":811}}}],"partialFingerprints":{"codehealthFindingId/v1":"7022f06a13e3955920e9bb7933e8507bf88c1cac1538d4e5775d25f30c2b4434"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060svcNumber \u003E= 0 \u0026\u0026 svcNumber \u003C SVC_MAX - 1\u0060 appears character-identically in 3 files \u2014 unidbg-api/src/main/java/com/github/unidbg/arm/Arm64Svc.java, unidbg-api/src/main/java/com/github/unidbg/arm/ArmSvc.java, unidbg-api/src/main/java/com/github/unidbg/arm/ThumbSvc.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/Arm64Svc.java"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"72da445cca13d24897c9da26395ae733ff65081afbce78bd37a4cd0268f301dd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060symbol != null \u0026\u0026 address - symbol.getAddress() \u003C= Unwinder.SYMBOL_SIZE\u0060 appears character-identically in 2 files \u2014 unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java, unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":1189}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bf63985320f4da2b00f50fe76b191f42bcabfc78b704993a0bd0da32fa63de0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060symbol != null \u0026\u0026 pc - symbol.getAddress() \u003C= Unwinder.SYMBOL_SIZE\u0060 appears character-identically in 2 files \u2014 unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java, unidbg-api/src/main/java/com/github/unidbg/memory/MemoryTracker.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1164}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2d757c73caa75ad9e1a6db2eba1a0e99e8faa33db3b892196fcf5f063c9f556"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060task != null \u0026\u0026 task.setErrno(emulator, errno)\u0060 appears character-identically in 2 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java, unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":880}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b9e919f358fc01d2d2188f93895f451de5470ce21657155e8f6a9234c30bd22"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060threadDispatcherEnabled \u0026\u0026 runningTask != null\u0060 appears character-identically in 4 files \u2014 unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java, unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java, unidbg-ios/src/main/java/com/github/unidbg/ios/ARM64SyscallHandler.java, unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinSyscallHandler.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidSyscallHandler.java"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"478631f0699def3a6455c498b617a5da7f0bcfbfb9fa3928a24c4e9d4ac128f8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060traceBegin \u003E traceEnd || (address \u003E= traceBegin \u0026\u0026 address \u003C= traceEnd)\u0060 appears character-identically in 2 files \u2014 unidbg-api/src/main/java/com/github/unidbg/AssemblyCodeDumper.java, unidbg-api/src/main/java/com/github/unidbg/arm/FastTracer.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/AssemblyCodeDumper.java"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b9829ffd459db2cceb5c0056d5e662f46ef581723f3b918ba04cba27c0f9717"}},{"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":"unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARM64Emulator.java"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f9611c8bd759e0ebff8defd81d20b7ef7a82eaa5527586e0a0c137c967218b0"}},{"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":"unidbg-ios/src/main/java/com/github/unidbg/ios/DarwinARMEmulator.java"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4c5e437c9a51f79a07db5b31b5ceccea70babe95fe491aa3fbd69715a8a4924"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/assets/gpb.js"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cbc8ee23b7f7d38566fa8c65e54be92a5920d14d170bd64f4620ce635304ff4"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/assets/gpb.js"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddbbaf882e287336e80619264987f00ef6adf807c9dae7b986e57f78e8f8a1a5"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of \u0060close()\u0060 masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems \u2014 or, if it truly cannot matter, say why in a comment on the catch."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"713c5eb4ee90fa0633a7c961a4ce011d881752c69e78749070bf3e725be8bcdb"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of \u0060close()\u0060 masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems \u2014 or, if it truly cannot matter, say why in a comment on the catch."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/utils/Inspector.java"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae7edd79a9ed1673bb18d2e454201c4a5b175d99783a74dd567d25c25054f675"}},{"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":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c87cd6bad842124c480b3495ad585e361cc197ead91ad697eabd14070e2010a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":838}}}],"partialFingerprints":{"codehealthFindingId/v1":"b71bc3be55fba637b32d8f5737809baf76b843b1c3b20e70fccb4435371f8da9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1458}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e859a235847e6fce12b5f88165c1f11a70666042643bbf48d233c7cb22cf382"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1734}}}],"partialFingerprints":{"codehealthFindingId/v1":"57bc5a49942fec9f2dc897097db83c08411e9688b163c76d89560eb154978813"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1745}}}],"partialFingerprints":{"codehealthFindingId/v1":"35e11bf4c2cad9a4619aa05f089ea7ae58167bbb889b5231dfae6be153dc33ce"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/mcp/McpTools.java"},"region":{"startLine":1784}}}],"partialFingerprints":{"codehealthFindingId/v1":"050d9f65e0026bba371e088cae4c59b241dabfa3450340b62ed05a6c8b7c5cec"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/arm/AbstractARMDebugger.java"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2c6e1c0d374e0c3c4e8343c7e3f26e2439216ce289c4e623800e92680a8554d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/com/github/unidbg/linux/AndroidElfLoader.java"},"region":{"startLine":634}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecf6eb95baa316b70df91aa1970c6d8f2614f9e28f5627b23b31ac53bce2d752"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 1680 is handed a message assembled at the call \u2014 a string concatenated with a value, or \u0060String.format\u0060 \u2014 through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: \u0060log.debug(\u0022Order {} moved to {}\u0022, orderId, status)\u0060, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2\u0027s JsonTemplateLayout, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. An exception goes last, as the throwable argument, not into the text."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":1680}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bdecb16511080d721f2a06a40d5e36d19c2d2d9ec816c688b0ec78cd750c294"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 2894 is handed a message assembled at the call \u2014 a string concatenated with a value, or \u0060String.format\u0060 \u2014 through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: \u0060log.debug(\u0022Order {} moved to {}\u0022, orderId, status)\u0060, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2\u0027s JsonTemplateLayout, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. An exception goes last, as the throwable argument, not into the text."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/ARM32SyscallHandler.java"},"region":{"startLine":2894}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9e8db32477948dcc3530bc3491f1459f867945a6458ffade271fb47a36c3498"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060trace\u0060 at line 1892 is handed a message assembled at the call \u2014 a string concatenated with a value, or \u0060String.format\u0060 \u2014 through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: \u0060log.trace(\u0022Order {} moved to {}\u0022, orderId, status)\u0060, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2\u0027s JsonTemplateLayout, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. An exception goes last, as the throwable argument, not into the text."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-ios/src/main/java/com/github/unidbg/ios/MachOLoader.java"},"region":{"startLine":1892}}}],"partialFingerprints":{"codehealthFindingId/v1":"15f19a0e00b6ae60292d5c5da33f2c952774413d7ac5f9ccf77f27d471ee4c93"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warn\u0060 at line 269 is handed a message assembled at the call \u2014 a string concatenated with a value, or \u0060String.format\u0060 \u2014 through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: \u0060log.warn(\u0022Order {} moved to {}\u0022, orderId, status)\u0060, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2\u0027s JsonTemplateLayout, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. An exception goes last, as the throwable argument, not into the text."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-android/src/main/java/net/fornwall/jelf/ElfDynamicStructure.java"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4da3c83409f32ba7f6b81c62297e04e6f1a10639891c2db2c0181d9719b2c35"}},{"ruleId":"X5","level":"note","message":{"text":"Java packages are not null-marked everywhere: 0/79 of this repository\u0027s Java package directories are under a non-null default: a \u0060package-info.java\u0060 declaring \u0060@NullMarked\u0060 (JSpecify) or \u0060@NonNullApi\u0060, \u0060@ParametersAreNonnullByDefault\u0060, \u0060@NonNullByDefault\u0060, \u0060@DefaultQualifier(NonNull.class)\u0060; a \u0060module-info.java\u0060 declaring \u0060@NullMarked\u0060; every type in it \u0060@NullMarked\u0060; or a build that runs NullAway with the package in \u0060AnnotatedPackages\u0060, or the Checker Framework\u0027s \u0060NullnessChecker\u0060. Elsewhere every reference admits null and no checker warns on the dereference that throws a \u0060NullPointerException\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"419201f6fc7ba243aef2cfb154378641588a8190e6269cea04a7b48c3d343bd5"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on parse failure: \u0060parseProcFd\u0060 returns \u0060-1\u0060 when \u0060NumberFormatException\u0060 is thrown, with no log or throw \u2014 a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"unidbg-api/src/main/java/com/github/unidbg/unix/UnixSyscallHandler.java"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"59d70f0be9ec67d0f67a7cbd548cbb465862b7691e22a23ed8ee4884afa3a148"}}],"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-1032","guid":"5f21e517-68aa-a650-9a25-5771ef024637","name":"OWASP Top Ten \u2014 Security Misconfiguration category","shortDescription":{"text":"OWASP Top Ten \u2014 Security Misconfiguration category"},"helpUri":"https://cwe.mitre.org/data/definitions/1032.html"},{"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-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-16","guid":"659db3ea-affc-8453-8add-c1218fbfcb92","name":"Configuration","shortDescription":{"text":"Configuration"},"helpUri":"https://cwe.mitre.org/data/definitions/16.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-319","guid":"7af97476-9f0d-4458-9163-3d2043918a1a","name":"Cleartext Transmission of Sensitive Information","shortDescription":{"text":"Cleartext Transmission of Sensitive Information"},"helpUri":"https://cwe.mitre.org/data/definitions/319.html"},{"id":"CWE-330","guid":"f811ddf9-2e54-865b-9c76-f97905849790","name":"Use of Insufficiently Random Values","shortDescription":{"text":"Use of Insufficiently Random Values"},"helpUri":"https://cwe.mitre.org/data/definitions/330.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-732","guid":"1da27e8f-b330-7650-ab63-bd61953eae5d","name":"Incorrect Permission Assignment for Critical Resource","shortDescription":{"text":"Incorrect Permission Assignment for Critical Resource"},"helpUri":"https://cwe.mitre.org/data/definitions/732.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A04:2025","guid":"6a9f5bfd-1a56-6453-beec-a7eff0ba3007","name":"Cryptographic Failures","shortDescription":{"text":"Cryptographic Failures"},"helpUri":"https://top10.owasp.org/2025/A04_2025-Cryptographic_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-3","guid":"458c83a6-ebf7-cf55-8cc3-b4d949bbf271","name":"Dependency Chain Abuse","shortDescription":{"text":"Dependency Chain Abuse"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-03-Dependency-Chain-Abuse"},{"id":"CICD-SEC-5","guid":"cc7f4610-8859-e654-9029-d5f97d992220","name":"Insufficient PBAC (Pipeline-Based Access Controls)","shortDescription":{"text":"Insufficient PBAC (Pipeline-Based Access Controls)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-05-Insufficient-PBAC"},{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":38,"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."]}]}