{"$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":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"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":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"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":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX6","name":"Interface segregation","shortDescription":{"text":"Interface segregation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX6"},{"id":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"id":"AXB2","name":"Runtime readiness","shortDescription":{"text":"Runtime readiness"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB2"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"GD1","name":"Unfinished \u0026 placeholder code","shortDescription":{"text":"Unfinished \u0026 placeholder code"},"helpUri":"https://codehealth.canine.dev/dimensions/GD1"},{"id":"IC1","name":"Incompleteness \u0026 stubs","shortDescription":{"text":"Incompleteness \u0026 stubs"},"helpUri":"https://codehealth.canine.dev/dimensions/IC1"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X16","name":"Unfloored truncation loop","shortDescription":{"text":"Unfloored truncation loop"},"helpUri":"https://codehealth.canine.dev/dimensions/X16"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X5","name":"Nullable reference types","shortDescription":{"text":"Nullable reference types"},"helpUri":"https://codehealth.canine.dev/dimensions/X5"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"ElasticSource.createLogic (cyclomatic 22): ElasticSource.createLogic has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-streams-akka/src/main/scala/com/sksamuel/elastic4s/akka/streams/ElasticSource.scala"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b2934b703e700ac0b1906c93f377686302cf600d447b09616b2e98119e252ab"}},{"ruleId":"D1","level":"warning","message":{"text":"ElasticSource.createLogic (cyclomatic 22): ElasticSource.createLogic has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-streams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/streams/ElasticSource.scala"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"acd83bf4889eed27a3b8a857770f6b8b70f6c7e357e6981f709031e55ffd8f4a"}},{"ruleId":"D1","level":"warning","message":{"text":"SearchBodyBuilderFn.apply (cyclomatic 18): SearchBodyBuilderFn.apply 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/SearchBodyBuilderFn.scala"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"afc58b94a7ead644f1990b40994bc7b276d1079871e0cf3309afe63899cb095b"}},{"ruleId":"D1","level":"warning","message":{"text":"MappingBuilderFn.build (cyclomatic 16): MappingBuilderFn.build 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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/mapping/MappingBuilderFn.scala"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"d38d7ef1f06bec2feba9cb2588d3498c2d69a9c23329282625284efa778a805b"}},{"ruleId":"D2","level":"warning","message":{"text":"ElasticSource.createLogic (cognitive 29): ElasticSource.createLogic has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 5 (9 pts), boolean chains 5 (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":"elastic4s-streams-akka/src/main/scala/com/sksamuel/elastic4s/akka/streams/ElasticSource.scala"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"50d186c9537c651d6e1dfb99aa4e611fa347c7feb4fcc1da73d89b837edf2aad"}},{"ruleId":"D2","level":"warning","message":{"text":"ElasticSource.createLogic (cognitive 29): ElasticSource.createLogic has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 5 (9 pts), boolean chains 5 (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":"elastic4s-streams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/streams/ElasticSource.scala"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b08545c14a03d08e5cccc6dc31c8fe53488edb6bbfeca23b91c820185370964"}},{"ruleId":"D2","level":"warning","message":{"text":"AkkaHttpClient.queueRequestWithRetry (cognitive 22): AkkaHttpClient.queueRequestWithRetry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 4 (5 pts) (nesting depth added 5). 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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"dca2c341807425ad872a21321f3da49c3125987721b6a99b764839ab0711a359"}},{"ruleId":"D2","level":"warning","message":{"text":"PekkoHttpClient.queueRequestWithRetry (cognitive 22): PekkoHttpClient.queueRequestWithRetry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 4 (5 pts) (nesting depth added 5). 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":"elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a3acf5e91b0cc26919a3341f075833a11ca9f4d7023b1fb6408ec2287816098"}},{"ruleId":"D2","level":"warning","message":{"text":"SearchBodyBuilderFn.apply (cognitive 17): SearchBodyBuilderFn.apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (15 pts), match/switch 1 (2 pts) (nesting depth added 2). 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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/SearchBodyBuilderFn.scala"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9a9ac81f79a598c4c74bd8b3e8c113b209165e94b5855099bd357cf085d1869"}},{"ruleId":"D2","level":"warning","message":{"text":"MappingBuilderFn.build (cognitive 17): MappingBuilderFn.build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), loops 4 (5 pts), match/switch 2 (nesting depth added 2). 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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/mapping/MappingBuilderFn.scala"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cf7ce3d5b81779306d3dbd63d8ec5c5fa551dcd7690a1a9ae3995a474731f2c"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: QueryApi: TooManyMethods \u2014 82 methods. The bar is 30 methods; this is 52 over it, 2.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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/api/QueryApi.scala"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"5150217f1821c0287c857391908368ddb36d25597eee92506b56f6ee3808deb4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: XContentBuilder: TooManyMethods \u2014 41 methods. The bar is 30 methods; this is 11 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":"elastic4s-json-builder/src/main/scala/com/sksamuel/elastic4s/json/XContentBuilder.scala"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e8bf5d127eb855f55e23b4442fa2c9377ffa4c7f81e9cf690e5201970416322"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AggregationApi: TooManyMethods \u2014 38 methods. The bar is 30 methods; this is 8 over it, 1.27\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/api/AggregationApi.scala"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"b78396c183f47dcac042e45f11f1f0366da12e07a8e39ac9dcaa99d011d24332"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: HasAggregations: TooManyMethods \u2014 38 methods. The bar is 30 methods; this is 8 over it, 1.27\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"84bc1d6820928602206170d39cc4abe749145e882625cd415f606b608c75608b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: analysis/TokenFilter.scala: FileTooLong \u2014 557 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 57 over it, 1.11\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/analysis/TokenFilter.scala"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6ea34e2f1fe704460bfb4e01829f98df42cd0ccbb6117798d5e2b1acabedf87"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/GeoPointFieldBuilderFn.scala:7-18 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/TokenCountFieldBuilderFn.scala:7-17 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/GeoPointFieldBuilderFn.scala"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b848f93ea0fe22e1ea8e88781843314738a18549911502b0719f2e5cf683137"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/AvgBucketPipelineAggBuilder.scala:7-16 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/ExtendedStatsBucketPipelineAggBuilder.scala:7-16 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/MinBucketPipelineAggBuilder.scala:7-16 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/PercentilesBucketPipelineAggBuilder.scala:7-18 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/SerialDiffPipelineAggBuilder.scala:7-17 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/StatsBucketPipelineAggBuilder.scala:7-16 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/AvgBucketPipelineAggBuilder.scala"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7d5bcccb0ebcfe0e78109777a286c07150841789d28aeb2a78315317035b39b"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BooleanFieldBuilderFn.scala:8-22 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/KeywordFieldBuilderFn.scala:7-28 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NestedFieldBuilderFn.scala:7-19 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/ObjectFieldBuilderFn.scala:7-17 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/TextFieldBuilderFn.scala:17-42 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BooleanFieldBuilderFn.scala"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7e6078437ee5bb13396280ea5cca3519d6110a155357b554b52f5d79e7cf04d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/AvgAggregationBuilder.scala:8-18 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/MaxAggregationBuilder.scala:8-18 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/MinAggregationBuilder.scala:8-18 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/SumAggregationBuilder.scala:8-16 \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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/AvgAggregationBuilder.scala"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"6044bfaee2c990d74ea89d98bb4c2608769982e3f3ad80f5b9d7e41b7ead660a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateRangeAggregationBuilder.scala:17-61 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoDistanceAggregationBuilder.scala:16-70 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/IpRangeAggregationBuilder.scala:16-66 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/RangeAggregationBuilder.scala:16-59 \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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateRangeAggregationBuilder.scala"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ccc1ee6f802e1fd802df30a065c47afc940afc6f0c11197cf74558af66a794e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DateFieldBuilderFn.scala:20-36 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DateNanosFieldBuilderFn.scala:20-36 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/IpFieldBuilderFn.scala:17-28 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/TokenCountFieldBuilderFn.scala:19-33 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DateFieldBuilderFn.scala"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"5339315cd8498c361f79a007be3777142107ef26b3c5b58a0e84092156ba75a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/termvectors/TermVectorHandlers.scala:16-47 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/termvectors/TermVectorHandlers.scala:52-98 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/termvectors/TermVectorHandlers.scala"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1aa1b2aa0b333e6822b4a05c05d78fb86fb51b26d94951caad17a64067ba3c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/delete/DeleteHandlers.scala:56-83 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/update/UpdateHandlers.scala:93-122 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/delete/DeleteHandlers.scala"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc81ee9ee7fc39fbce3b783d0c09a1d12c262d23338545ec14135ade4f87dc57"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/text/MatchQueryBuilderFn.scala:9-32 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/text/MultiMatchBodyFn.scala:8-37 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/text/MatchQueryBuilderFn.scala"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"b26cc3dc7f4035ce675b7f46f61414a6c18614df0b0bc8170c047815a34da4a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 22\u002B corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala:35-75 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DynamicFieldBuilderFn.scala:8-42 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/GeoShapeFieldBuilderFn.scala:27-48 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/IcuCollationKeywordFieldBuilderFn.scala:35-64 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"032a82a096a224cd6c83012a3cbb83b778b8f1da60d527901e1e091407f48e69"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala:14-33 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/GeoShapeFieldBuilderFn.scala:7-25 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/SearchAsYouTypeFieldBuilderFn.scala:7-23 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"119df8441cf4cd85d96759eafc6fcf24f8b55d4413cb665315e3759f89c5f19a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateHistogramAggregationBuilder.scala:17-45 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/HistogramAggregationBuilder.scala:17-44 \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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateHistogramAggregationBuilder.scala"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f1bd23b40e93a7b4dd18d4e50eac175de3cfb540c55bcba1fddbee08d6793b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/KeywordFieldBuilderFn.scala:30-60 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/SearchAsYouTypeFieldBuilderFn.scala:25-45 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/KeywordFieldBuilderFn.scala"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"6411d97913ef58be7b8ef636fea32b1c982c273fbc2c117a6025546e3c6ab29e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClientSettings.scala:20-55 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClientSettings.scala:20-55 \u2014 These two members are one piece of code written twice and then edited apart: 36 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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClientSettings.scala"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"1804a26fe5d787685506ee5227f1e88bca8864d7d2525575292b3e96008fde11"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/analysis/TokenFilter.scala:66-85 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/analysis/TokenFilter.scala:550-567 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/analysis/TokenFilter.scala"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a81b89d6fc39411fdbf77410c5d6a1c931769372015df1cd1ffd200098f2910"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/delete/DeleteHandlers.scala:108-124 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/get/GetHandlers.scala:65-85 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/update/UpdateHandlers.scala:63-86 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/delete/DeleteHandlers.scala"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"54eaaa539b1f29e796f351c68475f42ae547bb462756c1971ffcf10043602d64"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/snapshot/SnapshotHandlers.scala:67-83 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/snapshot/SnapshotHandlers.scala:106-124 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/snapshot/SnapshotHandlers.scala"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7f5b0a1bfe4086d8010eb8f2aeb2abdd187f895b8d3f65f493ce690600459a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 19\u002B corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/GaussianDecayScoreBuilderFn.scala:9-27 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/GaussianDecayScoreBuilderFn.scala:78-96 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/GaussianDecayScoreBuilderFn.scala:100-118 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/GaussianDecayScoreBuilderFn.scala"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"f26116ac93a55cdd7065306403d11971c71304da5b2cbe16c405cbe92cb98d16"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala:127-150 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala:127-150 \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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"21f59570d08c7d8c3afdbed41c9481842d68610d3086c0661b16ce32a96381a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/nested/HasChildBodyFn.scala:10-25 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/nested/NestedQueryBodyFn.scala:9-21 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/nested/HasChildBodyFn.scala"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"49ea1e214d67aa3ed45e88b9c10ee113eacf23796a08d943780e17965193ce2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala:55-73 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala:78-98 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"91ada89f200f5d58e1b3a1f25e60db3715ebfe4fd68ad66f66a13ccdc475eae6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/mapping/MappingHandlers.scala:19-36 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/mapping/MappingHandlers.scala:50-68 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/mapping/MappingHandlers.scala"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"a41e97965fcf218cc3ae120199145d1fb54f41a53bf5927dba14cf1e36751665"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala:257-267 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala:324-339 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"cad57bb30252a0e5637105f4adaf3450e3d04183180ec18f977a1bb205b3cb37"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/AutoDateHistogramAggregationBuilder.scala:16-32 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/VariableWidthAggregationBuilder.scala:15-30 \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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/AutoDateHistogramAggregationBuilder.scala"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"7977e0a98ac8a4cc8e60901eee6d76868388bc473dc680b387993c25aa7188c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/alias/AliasActionBuilder.scala:24-39 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/alias/AliasActionBuilder.scala:41-56 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/alias/AliasActionBuilder.scala"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f51db1db816ab679b45047a872c209b08933259aa443319e4b44c92911db849"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 12\u002B corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/geo/GeoPolyonQueryBodyFn.scala:9-31 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/FuzzyQueryBodyFn.scala:8-23 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/RegexQueryBodyFn.scala:8-24 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/text/MatchPhrasePrefixBodyFn.scala:8-20 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/text/MatchPhraseQueryBodyFn.scala:8-19 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/geo/GeoPolyonQueryBodyFn.scala"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a992ab1b226ebb86e3c6aca2780c5b6b3e7eb277127415cad3949adc98558c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NestedFieldBuilderFn.scala:21-39 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/ObjectFieldBuilderFn.scala:19-35 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NestedFieldBuilderFn.scala"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"323139c8ec2847111b75bfb799c64c9198406d9258c4a96cfcb8c1ecba74e160"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/IpFieldBuilderFn.scala:41-51 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/RangeFieldBuilderFn.scala:61-78 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/IpFieldBuilderFn.scala"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c2554a715ba8ec66b58811cdfe7caa9542199923c06f4bbc6eef36628fd4dbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/TokenFilter.scala:77-84 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/TokenFilter.scala:117-124 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/TokenFilter.scala"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6f85aa705f119c0a9b4966eab2adda90755d77ecc3faad55333327995c32b5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala:262-278 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala:262-278 \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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"54846bf4c85be55daf2049d2ec473cfaac3fa0ec6a3e7efbcae28837712c95a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/AggregationBuilderFn.scala:121-130 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/MovFnPipelineAggBuilder.scala:7-18 \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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/AggregationBuilderFn.scala"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a301e5b3da1cdeb7add06688afbebfa538caca737a60f4c0f3181745a64ce99"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/IpFieldBuilderFn.scala:7-15 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/IpFieldBuilderFn.scala:32-39 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/IpFieldBuilderFn.scala"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf27d6e90027a469ddcc638540b80c5c92bb9bb142542eae97a84b966c2de7d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/span/SpanNearQueryBodyFn.scala:8-25 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/span/SpanOrQueryBodyFn.scala:8-22 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/span/SpanNearQueryBodyFn.scala"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab6eb4473bff6b390ba1bd277e984c94f2c5589a253a6532dd2468289f9f11b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/AnalyzerDefinition.scala:98-107 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/NormalizerDefinition.scala:39-47 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/AnalyzerDefinition.scala"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"c23b7b16aea190457b28d7318bd894f314b59c1fe6fd442dd550dcb1f2f54279"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/delete/DeleteHandlers.scala:45-54 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/reindex/ReindexHandlers.scala:46-55 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/delete/DeleteHandlers.scala"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ba0f655869d0b721adacf520220e9eb7d02251f0e49bb5a49c9f9cabf825f30"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/CardinalityAggregationBuilder.scala:8-17 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/StatsAggregationBuilder.scala:8-17 \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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/CardinalityAggregationBuilder.scala"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"000713402ea4ac1535d772fac8e753ee277c14912b0392ad1c42d1cc78f84560"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 15\u002B corresponding lines): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoBoundsAggregationBuilder.scala:8-24 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoCentroidAggregationBuilder.scala:8-23 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoHashGridAggregationBuilder.scala:15-29 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoTileGridAggregationBuilder.scala:15-29 \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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoBoundsAggregationBuilder.scala"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"8708e69456195acfa60b564a3740f167bdddfdea3a5ebc1b9443fff098495545"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/PrefixQueryBodyFn.scala:7-19 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/TermQueryBodyFn.scala:8-19 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/WildcardQueryBodyFn.scala:7-16 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/PrefixQueryBodyFn.scala"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"3498c5c3540d6f64d9fc503576c4be7ee28815bf80464bed583cb2f92ca8ebda"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala:94-102 | elastic4s-client-sttp4/src/main/scala/com/sksamuel/elastic4s/sttp4/SttpRequestHttpClient.scala:93-101 \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":"elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"7593fd7bcdebbd1caffe2c49d802fb1f153f565151839b053067313df4033a31"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/synonyms/SynonymsHandlers.scala:56-63 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/synonyms/SynonymsHandlers.scala:74-80 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/synonyms/SynonymsHandlers.scala"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e1b69a99d0d6831fb38c1208e263b0c42beb8bf1bb234327d934b1700367f4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/AnnotatedTextFieldBuilderFn.scala:15-26 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/PatternTextFieldBuilderFn.scala:14-25 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/AnnotatedTextFieldBuilderFn.scala"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b9fbfbb1706c2f0899781454e818673eae7b89972d0ecb66b4b1beccd514260"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 9\u002B corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/span/SpanContainingQueryBodyFn.scala:9-22 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/span/SpanFirstQueryBodyFn.scala:8-17 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/span/SpanMultiTermQueryBodyFn.scala:8-16 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/span/SpanWithinQueryBodyFn.scala:8-21 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/span/SpanContainingQueryBodyFn.scala"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"82020c2f7f0f467b545cba849b040cf04d38c62bd7f7510135f9e653026be266"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/delete/DeleteHandlers.scala:25-36 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/update/UpdateHandlers.scala:33-46 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/delete/DeleteHandlers.scala"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa454f19405f8bfb10661c8b42d210ffbc42ccd935c43056eaafd507bef24325"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala:77-90 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/multiterms.scala:27-38 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1d622e7e8c10703e623d42934bd94c584835de5cc7b3a637d78b16dbcba479a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala:236-248 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/synonyms/SynonymsHandlers.scala:34-44 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/synonyms/SynonymsHandlers.scala:107-114 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"022613c019bfbc1de9533304fdfc87851547bf768d7dadf053e6bf71b337ec55"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/ScriptQueryBodyFn.scala:9-18 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/ExistsQueryBodyFn.scala:7-16 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/IdQueryBodyFn.scala:8-19 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/ScriptQueryBodyFn.scala"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3aa6940461fdd70a2c28a1cf37c31298cfe6dbeef1ebeafee8e70343c6b90f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala:52-57 | elastic4s-client-sttp4/src/main/scala/com/sksamuel/elastic4s/sttp4/SttpRequestHttpClient.scala:51-56 \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":"elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"37e6ff0cf569a1e5f24409c45cbe7ba83a68d04a9588b24e1e64a795b863db55"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/cluster/NodeUsageHandler.scala:7-19 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/indexlifecyclemanagement/IndexLifecycleManagmentHandlers.scala:33-41 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/indexlifecyclemanagement/IndexLifecycleManagmentHandlers.scala:53-61 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/cluster/NodeUsageHandler.scala"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"28941d5336d34604a69ef73295641f3749b87d24c29b63f7594897265b426928"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/PatternTextFieldBuilderFn.scala:7-12 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/SemanticTextFieldBuilderFn.scala:20-25 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/PatternTextFieldBuilderFn.scala"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0f53df437ac6baccc506325736c4f7ec3a997c6d8762619ed4164dad896afb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/indexes/AnalysisDefinition.scala:26-41 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/indexes/AnalysisDefinition.scala:44-59 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/indexes/AnalysisDefinition.scala"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"22ded0ca9f844edd7753481d277201b39b37adf5be5ca84abcb9c67bf9efc8c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 11\u002B corresponding lines): elastic4s-testkit/src/main/scala/com/sksamuel/elastic4s/testkit/SearchMatchers.scala:19-29 | elastic4s-testkit/src/main/scala/com/sksamuel/elastic4s/testkit/SearchMatchers.scala:35-45 | elastic4s-testkit/src/main/scala/com/sksamuel/elastic4s/testkit/SearchMatchers.scala:51-61 | elastic4s-testkit/src/main/scala/com/sksamuel/elastic4s/testkit/SearchMatchers.scala:67-77 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-testkit/src/main/scala/com/sksamuel/elastic4s/testkit/SearchMatchers.scala"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"14fdaae303a0d8e57d5b894e80408151fba5f7f537d47c3fa4067b268606cdcc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala:137-146 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/snapshot/SnapshotHandlers.scala:48-55 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/snapshot/SnapshotHandlers.scala:87-92 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"76e4ac55ba79cde57071fa1091b603ff9fec2babe271fb2171651ef292811273"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/indexlifecyclemanagement/IndexLifecycleManagmentHandlers.scala:9-15 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/synonyms/SynonymsHandlers.scala:26-32 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/indexlifecyclemanagement/IndexLifecycleManagmentHandlers.scala"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"9180223627dc216ebb22451f0a668dfc30dfc6107937a1151b6285dea0525b1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/security/roles/RoleAdminHandlers.scala:36-47 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/security/users/UserAdminHandlers.scala:37-48 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/security/roles/RoleAdminHandlers.scala"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"81bc2de9630bd87ced30357b0867f64b57bdb6eda83cfddbb6eb847d15224906"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 6\u002B corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala:229-234 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexHandlers.scala:18-23 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/security/roles/RoleAdminHandlers.scala:51-56 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/security/users/UserAdminHandlers.scala:64-69 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/synonyms/SynonymsHandlers.scala:100-105 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"10a5698cb6eb38d58e602a291edeffdceff2c3c24c9a2793e841e07c9f5dffee"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/security/roles/RoleAdminHandlers.scala:29-34 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/security/users/UserAdminHandlers.scala:30-35 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/synonyms/SynonymsHandlers.scala:49-54 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/security/roles/RoleAdminHandlers.scala"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dc4fed36f186f232b903ff5fbfa844a10d585e4740b711fa1ddb8141548cef1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/indexes/CreateIndex.scala:66-69 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/indexes/CreateIndexTemplateRequest.scala:40-43 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/indexes/CreateIndex.scala"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"691d3408365ca10a17f381e69b083b7799e3be300802232ce55c80a2e628bf95"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/indexlifecyclemanagement/IndexLifecycleManagmentHandlers.scala:25-31 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/synonyms/SynonymsHandlers.scala:119-124 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/indexlifecyclemanagement/IndexLifecycleManagmentHandlers.scala"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"95fe625c0b40ed91e2b26a5a2938e78a7b455539a4baccd458e3cdbd351ebb9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/indexlifecyclemanagement/IndexLifecycleManagmentHandlers.scala:45-51 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/synonyms/SynonymsHandlers.scala:134-139 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/indexlifecyclemanagement/IndexLifecycleManagmentHandlers.scala"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"ada35d7e0548d324fa689f905ac9aa8f6aec7d69017f7b3f8399e6a0ce64ca78"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 10\u002B corresponding lines): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala:176-185 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/geohashgrid.scala:16-25 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/geotilegrid.scala:16-25 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/histogram.scala:8-17 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/terms.scala:27-38 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"f80dd18b151b0c8cc6b6b16114e74d7d53a79729e2e9b4e0a3c055cd40c97554"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/ReverseNestedAggregationBuilder.scala:15-22 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/SamplerAggregationBuilder.scala:10-18 \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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/ReverseNestedAggregationBuilder.scala"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"11717993a4d0af8d309ad98ac5125524e637303db3159aaa5f73fcc3ee4d1a76"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/geodistance.scala:37-43 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/iprange.scala:37-43 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/geodistance.scala"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d4623835d5e42d055dee676ba0a90ec219835fb803baaba2d351ad1511cbe8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/explain/ExplainHandlers.scala:10-14 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/reloadsearchanalyzers/ReloadSearchAnalyzersHandlers.scala:11-15 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/explain/ExplainHandlers.scala"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a8fba335f687238768aef16919fdb3a886be2b91bb6ec12c0589676136a1479"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala:293-303 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala:296-306 \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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc3fb5dd78edcbf7a63096c10496babe8044680283d5fbdb2bd3a9c7fed45e90"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/analysis/TokenFilter.scala:397-404 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/analysis/charFilter.scala:25-31 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/analysis/TokenFilter.scala"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef9d4cf1254b4df8d01f6881560514c0262a597c56a34c766a81e592579d32b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BinaryFieldBuilderFn.scala:8-12 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/JoinFieldBuilderFn.scala:7-11 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BinaryFieldBuilderFn.scala"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ce4bdaa1422f95b9feee86fd16fc863385b1f0dbb984b1b4ba66d0f7fee5ac8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala:40-44 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/daterange.scala:10-13 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f103a59a46c7dc9a542d44652b9a0ee905d1d553fb5261eb75722c303f0afc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/AliasFieldBuilderFn.scala:11-16 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/ConstantKeywordFieldBuilderFn.scala:12-17 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/AliasFieldBuilderFn.scala"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cbe7b208a2bd10e95ef0310ef04bd590db43dde24e428cc5734c38c564cbd2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala:74-77 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/DefaultBlacklist.scala:74-77 \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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"f06b26560712ad95f56d2f3ee5e3a89b1eafe46f7abbe4507070943e17cf314d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/QueryRescoreMode.scala:7-13 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/ScoreMode.scala:6-13 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/QueryRescoreMode.scala"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"5590f05016f7d98357c4ee9b89a2f9cf2cd741bd2f570649f8863cca44309401"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/explain/ExplainBodyFn.scala:8-12 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/validate/ValidateHandlers.scala:9-13 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/explain/ExplainBodyFn.scala"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef21f2a0d796c8f2b14bbd5294982a6a512c123c5eab4e3af2048ab4cd51c906"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala:25-29 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/daterange.scala:46-49 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2bf9a4f83e677a2c14d20cdf5076a1fadee19324223e7a4c79fa4d278d39fe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (81 lines \u00D7 2): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala:129-209 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala:132-212 \u2014 before extracting anything, compare \u0060elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala\u0060 and \u0060elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 165 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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bb6ff1987614579303bb005474a4f5a45ebbccd66f0159f6d19405b6ef50189"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (74 lines \u00D7 2): elastic4s-streams-akka/src/main/scala/com/sksamuel/elastic4s/akka/streams/ElasticSource.scala:37-110 | elastic4s-streams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/streams/ElasticSource.scala:38-111 \u2014 before extracting anything, compare \u0060elastic4s-streams-akka/src/main/scala/com/sksamuel/elastic4s/akka/streams/ElasticSource.scala\u0060 and \u0060elastic4s-streams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/streams/ElasticSource.scala\u0060 as WHOLE FILES: 91% 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":"elastic4s-streams-akka/src/main/scala/com/sksamuel/elastic4s/akka/streams/ElasticSource.scala"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b2b43b4ed3537cd981f0671e55103bc8bf39efe9e43621fb0f65a68fa74b4fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (48 lines \u00D7 2): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala:204-251 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala:204-251 \u2014 before extracting anything, compare \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala\u0060 and \u0060elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 134 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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b756ae6a8aba8e2e10e925c45b823d0d55a126bef486f476b68b878101b0581"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (47 lines \u00D7 2): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala:136-182 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala:136-182 \u2014 before extracting anything, compare \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala\u0060 and \u0060elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 134 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 \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala:136\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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"0212f5145a357c5d4e61f13c0e031834d8b4714aef54ea49791f3864feb63d3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 2): elastic4s-streams-akka/src/main/scala/com/sksamuel/elastic4s/akka/streams/BatchElasticSink.scala:27-67 | elastic4s-streams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/streams/BatchElasticSink.scala:27-67 \u2014 before extracting anything, compare \u0060elastic4s-streams-akka/src/main/scala/com/sksamuel/elastic4s/akka/streams/BatchElasticSink.scala\u0060 and \u0060elastic4s-streams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/streams/BatchElasticSink.scala\u0060 as WHOLE FILES: 92% 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":"elastic4s-streams-akka/src/main/scala/com/sksamuel/elastic4s/akka/streams/BatchElasticSink.scala"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"e960f7361b09de3a36c3fba0aa9ceb344e4e1a6342460c0241704b2b38bf9f02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala:156-189 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala:156-189 \u2014 before extracting anything, compare \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala\u0060 and \u0060elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala\u0060 as WHOLE FILES: this scan already matched 5 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 \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala:156\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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"65a698f248f3070a982336528107ee46474ce2971945835d7d0414581eda92dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/SigTermsAggregationBuilder.scala:12-46 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/SigTextAggregationBuilder.scala:12-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. 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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/SigTermsAggregationBuilder.scala"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bbe8c7b11e193ce6b5815f712af739aad2210d934004bca11b9489abed4aeee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala:262-286 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala:265-289 \u2014 before extracting anything, compare \u0060elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala\u0060 and \u0060elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 165 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: \u0060ByteString\u0060 names \u0060akka.util.ByteString\u0060 in one and \u0060org.apache.pekko.util.ByteString\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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"59fd8e56710813914428c51516f67251a087c902af9c3e33da9680bd855d380e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala:27-50 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/DefaultBlacklist.scala:27-50 \u2014 before extracting anything, compare \u0060elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala\u0060 and \u0060elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/DefaultBlacklist.scala\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"880059a9a55bab48996737b1e9e82fcee1a3c54e1ff66fcbc7a40c260c257ad9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 3): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoDistanceAggregationBuilder.scala:39-61 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/IpRangeAggregationBuilder.scala:28-50 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/RangeAggregationBuilder.scala:28-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 all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoDistanceAggregationBuilder.scala"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"7206d8bc16277ee0bed5e29766700e22409d0adee071a534a98933caeb4125a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala:231-251 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala:234-254 \u2014 before extracting anything, compare \u0060elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala\u0060 and \u0060elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 165 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: \u0060Query\u0060 names \u0060akka.http.scaladsl.model.Uri.Query\u0060 in one and \u0060org.apache.pekko.http.scaladsl.model.Uri.Query\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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"056d554c087b61aa43d20afb1b670bfb7467cc2dfc9624b1184536d5f98e34ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala:130-150 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala:130-150 \u2014 before extracting anything, compare \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala\u0060 and \u0060elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala\u0060 as WHOLE FILES: this scan already matched 5 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 \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala: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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6a26f7f5393d7737eee9b32bef8feeeb6911379041775d5f5ba84df549b20f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala:31-50 | elastic4s-client-sttp4/src/main/scala/com/sksamuel/elastic4s/sttp4/SttpRequestHttpClient.scala:30-49 \u2014 before extracting anything, compare \u0060elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala\u0060 and \u0060elastic4s-client-sttp4/src/main/scala/com/sksamuel/elastic4s/sttp4/SttpRequestHttpClient.scala\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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":"elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"de0cbbee8b51f39a5634b5f598e9581df1c103a45f5b23a23445b02660c0970d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala:57-73 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala:80-98 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"6342a7beb78635212502ce7bc7e440f5b1ba1b55950851ba453e9d228c49d4d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClientSettings.scala:21-42 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClientSettings.scala:21-42 \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: \u0060ConnectionPoolSettings\u0060 names \u0060akka.http.scaladsl.settings.ConnectionPoolSettings\u0060 in one and \u0060org.apache.pekko.http.scaladsl.settings.ConnectionPoolSettings\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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClientSettings.scala"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8d0385cac61c65e0a49e7bcf03735cb93a2ef4f8d45ae0449c00d18969a7fa9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/datehistogram.scala:14-31 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/geodistance.scala:17-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/datehistogram.scala:14\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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/datehistogram.scala"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"baf5af076c21901d2b9e9102549ef7a22626d2ab7d41b54d4a5373835ccfc08f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala:264-278 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala:264-278 \u2014 before extracting anything, compare \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala\u0060 and \u0060elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 134 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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"548a6b4a9bb402e2b8b724f10f18581c589d063897021c086c192637fd9cd094"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/MultiTermsAggregationBuilder.scala:36-49 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/TermsAggregationBuilder.scala:44-57 \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 \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/MultiTermsAggregationBuilder.scala:36\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, \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/MultiTermsAggregationBuilder.scala:33\u0060 calls \u0060rawField\u0060, \u0060ScriptBuilderFn\u0060 and \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/TermsAggregationBuilder.scala:43\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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/MultiTermsAggregationBuilder.scala"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1fc21c83392cce3d6b3d43249b2bbf35c91511587143cb94e166a12b581767e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala:111-124 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala:111-124 \u2014 before extracting anything, compare \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala\u0060 and \u0060elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala\u0060 as WHOLE FILES: this scan already matched 5 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. 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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4c5f7dd897bdfa62045dc4222ef565ba920659e7a5a55cc401332d7f0a43bea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala:110-122 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala:113-125 \u2014 before extracting anything, compare \u0060elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala\u0060 and \u0060elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 165 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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5aee535ea9b3db39a3ad2427450b94e344855154f0b0193e38e74ffc059bddf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoHashGridAggregationBuilder.scala:17-29 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoTileGridAggregationBuilder.scala:17-29 \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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoHashGridAggregationBuilder.scala"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"4437bc6b26e9d24f89f3b3bb1e05d1624b104a05214b6607b0b74e9ee6055735"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/GaussianDecayScoreBuilderFn.scala:10-21 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/GaussianDecayScoreBuilderFn.scala:79-90 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/GaussianDecayScoreBuilderFn.scala:101-112 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/GaussianDecayScoreBuilderFn.scala:91\u0060 calls \u0060foreach\u0060, \u0060field\u0060 and \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/GaussianDecayScoreBuilderFn.scala:22\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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/GaussianDecayScoreBuilderFn.scala"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"19b7e3c65098d95b4f12d5b4e30cb4267f58b6cfe1a050e933e676311fe66045"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/span/SpanContainingQueryBodyFn.scala:11-22 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/span/SpanWithinQueryBodyFn.scala:10-21 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/span/SpanContainingQueryBodyFn.scala"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"54e35f83d6c68933d47509e542a6e12fb830b93a673145abb46925ea351be094"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/get/GetResponse.scala:27-37 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/InnerHit.scala:20-30 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/SearchHit.scala:35-45 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/get/GetResponse.scala"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"e291c57a17d78dbe1edf3638d98c8b256500901a3c440e33e99f66d1c44b2fdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultHttpPoolFactory.scala:49-59 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/DefaultHttpPoolFactory.scala:49-59 \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: \u0060Flow\u0060 names \u0060akka.stream.scaladsl.Flow\u0060 in one and \u0060org.apache.pekko.stream.scaladsl.Flow\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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultHttpPoolFactory.scala"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1f5ea956157ac38ec1c8f2c5994977cae193472dcd7f6943cefefd8d2c3ed40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/AvgAggregationBuilder.scala:9-18 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/MaxAggregationBuilder.scala:9-18 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/MinAggregationBuilder.scala:9-18 \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. 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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/AvgAggregationBuilder.scala"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2c78866ffa714f89864fefd58363656b86b809ecc30641a80dd415b0d635c06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala:98-107 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala:101-110 \u2014 before extracting anything, compare \u0060elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala\u0060 and \u0060elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 165 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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"3840357e25d6d493b0bae74f67eb3e621f4a7847d25a6e35d78984f20bf2cf14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BooleanFieldBuilderFn.scala:45-54 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:225-234 \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 \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BooleanFieldBuilderFn.scala:45\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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BooleanFieldBuilderFn.scala"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"cccf28bfc85f082af1a6425c2114508bce3a45cd8ed5e6bf3160b1d5699efda3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NestedFieldBuilderFn.scala:30-39 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/ObjectFieldBuilderFn.scala:26-35 \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 \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NestedFieldBuilderFn.scala:30\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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NestedFieldBuilderFn.scala"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2d82e831c9007cb3ea0980fff44c59f611ab49c0a388221244bd9f15280af32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateRangeAggregationBuilder.scala:26-34 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoDistanceAggregationBuilder.scala:35-43 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/IpRangeAggregationBuilder.scala:24-32 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/RangeAggregationBuilder.scala:24-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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateRangeAggregationBuilder.scala: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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateRangeAggregationBuilder.scala:23\u0060 calls \u0060foreach\u0060, \u0060field\u0060 and \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/IpRangeAggregationBuilder.scala:22\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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateRangeAggregationBuilder.scala"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4e53a50e3359d347aab4c51f4062d42b593735d84dae8c2b66b62564c6b2819"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20139 lines \u00D7 3): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BooleanFieldBuilderFn.scala:18-19 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NestedFieldBuilderFn.scala:8-15 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/ObjectFieldBuilderFn.scala:8-16 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BooleanFieldBuilderFn.scala:18\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BooleanFieldBuilderFn.scala"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"a58d59f8b1d745ce1dee134de060b980ffe5c636feeb98f0fa779bfea1bde9ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20138 lines \u00D7 3): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala:37-44 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/SearchAsYouTypeFieldBuilderFn.scala:32-34 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/TextFieldBuilderFn.scala:46-53 \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. 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, \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala:44\u0060 calls \u0060array\u0060 and \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/SearchAsYouTypeFieldBuilderFn.scala:34\u0060 does not \u2014 after which the two agree again for 5 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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"95da1e7bba30449d5294bb05e6fc0cdb995e6d646ebc951471c9a730a2477b93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/indexlifecyclemanagement/IndexLifecycleManagmentHandlers.scala:34-41 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/indexlifecyclemanagement/IndexLifecycleManagmentHandlers.scala:54-61 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/indexlifecyclemanagement/IndexLifecycleManagmentHandlers.scala"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd9fa0957d337f39f6f5f66509265adaece400b983ffdda2cce6a7a64971392b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/MoreLikeThisQueryBuilderFn.scala:18-25 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/MoreLikeThisQueryBuilderFn.scala:41-48 \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 \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/MoreLikeThisQueryBuilderFn.scala:18\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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/MoreLikeThisQueryBuilderFn.scala"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c1c3f1ade4fceb02ddb20a674c5a3106d35266c12c7005df17457650669d9da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateHistogramAggregationBuilder.scala:33-39 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/HistogramAggregationBuilder.scala:29-35 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/HistogramAggregationBuilder.scala:37\u0060 calls \u0060rawField\u0060, \u0060ExtendedBoundsBuilderFn\u0060 and \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateHistogramAggregationBuilder.scala:40\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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateHistogramAggregationBuilder.scala"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"50020d22cc25474749067326eded9feaed9bff948267293819549877571b02d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/AnalyzerDefinition.scala:101-107 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/NormalizerDefinition.scala:41-47 \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 \u0060elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/AnalyzerDefinition.scala:101\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, \u0060elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/AnalyzerDefinition.scala:100\u0060 calls \u0060field\u0060 and \u0060elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/NormalizerDefinition.scala:40\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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/AnalyzerDefinition.scala"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a33e2d046c52d6503be65c98aff52ddc455fcdab7a70f142de9b4d308594666"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DenseVectorFieldBuilderFn.scala:45-52 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DenseVectorFieldBuilderFn.scala:55-62 \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 \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DenseVectorFieldBuilderFn.scala:45\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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DenseVectorFieldBuilderFn.scala"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"7271d605e585727efe2ef77110b1d5e88a3b8515bbd2b2902407cfcc34f1eb07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 4): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/AvgAggregationBuilder.scala:11-15 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/MaxAggregationBuilder.scala:11-15 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/MinAggregationBuilder.scala:11-15 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/SumAggregationBuilder.scala:10-15 \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. 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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/AvgAggregationBuilder.scala"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb3e2af0f510e191d19baa97082d651a86462e8a7d1b6fed9610bd878b77566d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20136 lines \u00D7 6): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/AvgBucketPipelineAggBuilder.scala:11-16 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/ExtendedStatsBucketPipelineAggBuilder.scala:11-16 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/MinBucketPipelineAggBuilder.scala:11-16 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/PercentilesBucketPipelineAggBuilder.scala:8-11 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/SerialDiffPipelineAggBuilder.scala:8-11 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/StatsBucketPipelineAggBuilder.scala:11-16 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 6 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/AvgBucketPipelineAggBuilder.scala:11\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/AvgBucketPipelineAggBuilder.scala:9\u0060 calls \u0060startObject\u0060, \u0060field\u0060, \u0060foreach\u0060 and \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/PercentilesBucketPipelineAggBuilder.scala:8\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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/AvgBucketPipelineAggBuilder.scala"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cfbe0bd46367b42618068d0d0d5b0a848e816053499f4e462d145625ec80e13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/text/MatchBoolPrefixBodyFn.scala:8-13 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/text/MatchPhrasePrefixBodyFn.scala:9-14 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/text/MatchPhraseQueryBodyFn.scala:9-14 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/text/MatchPhrasePrefixBodyFn.scala:17\u0060 calls \u0060foreach\u0060, \u0060field\u0060 and \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/text/MatchPhraseQueryBodyFn.scala:17\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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/text/MatchBoolPrefixBodyFn.scala"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d8858c343a2ddd17947dcc6cdc32da22211127d074d8c66e14d7d0277c4d91f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala:95-102 | elastic4s-client-sttp4/src/main/scala/com/sksamuel/elastic4s/sttp4/SttpRequestHttpClient.scala:94-101 \u2014 before extracting anything, compare \u0060elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala\u0060 and \u0060elastic4s-client-sttp4/src/main/scala/com/sksamuel/elastic4s/sttp4/SttpRequestHttpClient.scala\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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":"elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"ead150c00cfba978e5cd1301dddddcaf7a9359c1d1606203380dfe0052d928d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/analysis/TokenFilter.scala:27-37 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/analysis/TokenFilter.scala:123-133 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/analysis/TokenFilter.scala"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cde9e1eeb0ff9a683dacb7447cb9864f6771d454ead77ee72cf75294b27a652"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/snapshot/SnapshotHandlers.scala:71-79 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/snapshot/SnapshotHandlers.scala:109-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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/snapshot/SnapshotHandlers.scala:118\u0060 calls \u0060foreach\u0060, \u0060field\u0060 and \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/snapshot/SnapshotHandlers.scala:80\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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/snapshot/SnapshotHandlers.scala"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"6833fcf4a8fec641e40c1ab6460c740bebff8a8ac62da4205821cc6583fe44e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DateFieldBuilderFn.scala:31-36 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DateNanosFieldBuilderFn.scala:31-36 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/IpFieldBuilderFn.scala:24-28 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/TokenCountFieldBuilderFn.scala:28-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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DateFieldBuilderFn.scala:31\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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DateFieldBuilderFn.scala"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fdad871b840c60373a25950758188373bea3af97c8ccb956bf73fa262ce741a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoBoundsAggregationBuilder.scala:10-14 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoCentroidAggregationBuilder.scala:10-14 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/IpRangeAggregationBuilder.scala:18-22 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoBoundsAggregationBuilder.scala:15\u0060 calls \u0060foreach\u0060, \u0060field\u0060 and \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoCentroidAggregationBuilder.scala:15\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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoBoundsAggregationBuilder.scala"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b3906a44ded772a9199bd6fb057e19115413cf408bcfd58a9a8d2ec784352b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateRangeAggregationBuilder.scala:19-23 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/RangeAggregationBuilder.scala:18-22 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateRangeAggregationBuilder.scala:24\u0060 calls \u0060foreach\u0060, \u0060field\u0060 and \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/RangeAggregationBuilder.scala:23\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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/DateRangeAggregationBuilder.scala"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"1328e1ab5ad9c733225530f11d68cea008744bb9404f95383861ab712e7bb5c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/TokenFilter.scala:78-84 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/TokenFilter.scala:118-124 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/TokenFilter.scala"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"09d290f5ebe8606f2755b86af91cd89b003ced1de4fd4e35b0c69af64c8f4aee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala:258-262 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala:327-331 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6a9e8b78a4e5ad5a1a90d820cab526be712bd4b58121495a26aa03001e6488c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20135 lines \u00D7 3): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BooleanFieldBuilderFn.scala:19-21 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/KeywordFieldBuilderFn.scala:13-17 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/TextFieldBuilderFn.scala:23-28 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. 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, \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/KeywordFieldBuilderFn.scala:11\u0060 calls \u0060get\u0060 and \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/TextFieldBuilderFn.scala:21\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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BooleanFieldBuilderFn.scala"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e4b0876689c3b812cb3a31a4639c15e00cad8ecd3e5a68a5cab7cac0441e9fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/IntervalsQueryBuilderFn.scala:63-67 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/IntervalsQueryBuilderFn.scala:69-73 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/IntervalsQueryBuilderFn.scala"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"49c8b8cda4510b5d67494f131255edebc97d2c8eb731a096fe4c3b08b791c5ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/geo/GeoDistanceQueryBodyFn.scala:23-27 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/geo/GeoPolyonQueryBodyFn.scala:24-28 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. 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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/geo/GeoDistanceQueryBodyFn.scala"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"82527bb1f92c88d17d526b79ca0110e49abcda14228401b6e1c23bad79e3e7da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20135 lines \u00D7 3): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/PrefixQueryBodyFn.scala:14-19 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/RegexQueryBodyFn.scala:18-21 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/WildcardQueryBodyFn.scala:12-16 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/PrefixQueryBodyFn.scala:14\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/RegexQueryBodyFn.scala:21\u0060 calls \u0060foreach\u0060, \u0060field\u0060 and \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/PrefixQueryBodyFn.scala:19\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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/PrefixQueryBodyFn.scala"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"04ac436e3e4e58fef1b39edbfd4ef5dfbac0744ca7a29108d61745071eb85e69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201312 lines \u00D7 33): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BooleanFieldBuilderFn.scala:9-11 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala:17-18 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala:19-20 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala:25-27 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala:28-30 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DateFieldBuilderFn.scala:7-18 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/DateNanosFieldBuilderFn.scala:7-18 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/FlattenedFieldBuilderFn.scala:14-16 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/GeoPointFieldBuilderFn.scala:8-10 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/GeoPointFieldBuilderFn.scala:14-16 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/GeoShapeFieldBuilderFn.scala:8-10 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/GeoShapeFieldBuilderFn.scala:14-16 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/GeoShapeFieldBuilderFn.scala:17-19 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/IpFieldBuilderFn.scala:11-13 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/IpFieldBuilderFn.scala:35-37 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/KeywordFieldBuilderFn.scala:8-10 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/KeywordFieldBuilderFn.scala:21-23 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/KeywordFieldBuilderFn.scala:24-26 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:24-25 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:41-42 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:57-58 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:73-74 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:89-90 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:106-107 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:123-124 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:140-141 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:158-159 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/RangeFieldBuilderFn.scala:26-28 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/SearchAsYouTypeFieldBuilderFn.scala:11-12 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/TextFieldBuilderFn.scala:20-21 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/TextFieldBuilderFn.scala:38-40 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/TokenCountFieldBuilderFn.scala:10-11 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/TokenCountFieldBuilderFn.scala:13-15 \u2014 there are 33 copies across 14 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 33 sites; resolving a subset leaves the remainder to drift apart. 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, \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BooleanFieldBuilderFn.scala:11\u0060 calls \u0060get\u0060, \u0060getOrElse\u0060 and \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala:20\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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/BooleanFieldBuilderFn.scala"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ac86cc01478e8c26829a289ba28d0b254364c86a91ce419641b3d94f350131e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 8): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/AvgAggregation.scala:19-24 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/CardinalityAggregation.scala:18-24 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoBoundsAggregation.scala:19-26 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoCentroidAggregation.scala:20-27 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/MaxAggregation.scala:18-24 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/MinAggregation.scala:18-24 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/PercentileRanksAggregation.scala:29-43 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/SumAggregation.scala:17-22 \u2014 before extracting anything, compare \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoBoundsAggregation.scala\u0060 and \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoCentroidAggregation.scala\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/AvgAggregation.scala"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"905fb511f6563001b07898f6c51c19a71ed006e91f9b2371f077b8b6b78a1030"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoHashGridAggregation.scala:17-23 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoTileGridAggregation.scala:17-23 \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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoHashGridAggregation.scala"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"05537d177653dc893fcf745aaaf7a21e66cbb149e2507b4f70c9eebd95c12190"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoBoundsAggregation.scala:19-26 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoCentroidAggregation.scala:20-27 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/MaxAggregation.scala:18-24 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/MinAggregation.scala:18-24 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/PercentileRanksAggregation.scala:29-43 \u2014 before extracting anything, compare \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoBoundsAggregation.scala\u0060 and \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoCentroidAggregation.scala\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoBoundsAggregation.scala"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"525028f49dc57969cc99871c4551c1c12891deacee149cbb9f36c129dde1e7a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoDistanceAggregation.scala:28-50 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/RangeAggregation.scala:22-40 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoDistanceAggregation.scala"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4bd5403a8434f7699bcd8df6f8c30e9b6818d25a6d30169084d8cb2510ba643"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/SigTermsAggregation.scala:26-51 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/SigTextAggregation.scala:26-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":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/SigTermsAggregation.scala"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b442ecf7602ec75a36911027f3d081fa0646e158e0b58772157d8cb80407a61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 9): elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/AvgAggregation.scala:19-24 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/CardinalityAggregation.scala:18-24 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoBoundsAggregation.scala:19-26 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoCentroidAggregation.scala:20-27 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/MaxAggregation.scala:18-24 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/MinAggregation.scala:18-24 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/PercentileRanksAggregation.scala:29-43 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/SumAggregation.scala:17-22 | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/ValueCountAggregation.scala:16-20 \u2014 before extracting anything, compare \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoBoundsAggregation.scala\u0060 and \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoCentroidAggregation.scala\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/AvgAggregation.scala"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7e72601a43099b8dde69021ebe914c6e9731c3a89f2784502b4f50d69a06388"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/alias/AddAliasActionRequest.scala:18-26 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/alias/RemoveAliasAction.scala:17-23 \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. 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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/alias/AddAliasActionRequest.scala"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdf87fd45dab7b9fbcbbae7680757cf0f634ef068445bca7dbf1fc972f50b0b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/cluster/NodeUsageRequest.scala:15-21 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/indexlifecyclemanagement/GetIlmStatusRequest.scala:8-12 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/indexlifecyclemanagement/StartIlmRequest.scala:8-12 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/indexlifecyclemanagement/StopIlmRequest.scala:8-12 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/cluster/NodeUsageRequest.scala"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7a26b6df4b39cc816b6e07901ffc6ea0223a769447419a96c109701daaa0214"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/ExistsQuery.scala:5-9 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/matches/MatchAllQuery.scala:6-14 \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 \u0060elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/matches/MatchAllQuery.scala:6\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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/ExistsQuery.scala"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"852647f5527e54f530157992ca9e1280980a9808d6de18765d3643e81725b215"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/funcscorer/GaussianDecayScore.scala:18-23 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/funcscorer/LinearDecayScore.scala:18-23 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/funcscorer/GaussianDecayScore.scala"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aa29f90be2b6bed8a35c504e94133895bc0ca445b5cf65c8232df7bfcd3922c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 2): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/update/UpdateByQueryAsyncRequest.scala:36-79 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/update/UpdateByQueryRequest.scala:81-127 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/update/UpdateByQueryAsyncRequest.scala"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba49f23506865b450073292e0b102c8d8798d22a1e047c5ae89478b5f9d7ae78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): elastic4s-json-zio-1/src/main/scala/com/sksamuel/elastic4s/ziojson/package.scala:9-20 | elastic4s-json-zio/src/main/scala/com/sksamuel/elastic4s/ziojson/package.scala:9-20 \u2014 before extracting anything, compare \u0060elastic4s-json-zio-1/src/main/scala/com/sksamuel/elastic4s/ziojson/package.scala\u0060 and \u0060elastic4s-json-zio/src/main/scala/com/sksamuel/elastic4s/ziojson/package.scala\u0060 as WHOLE FILES: 100% 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":"elastic4s-json-zio-1/src/main/scala/com/sksamuel/elastic4s/ziojson/package.scala"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"873ab23b2af246d3f9836dc2da3e2f25c53fad098a5f522cfdb103246a7bed14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (52 lines \u00D7 2): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ReactiveElastic.scala:21-72 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ReactiveElastic.scala:21-72 \u2014 before extracting anything, compare \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ReactiveElastic.scala\u0060 and \u0060elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ReactiveElastic.scala\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. Note first that the copies are not typed on the same thing: \u0060ActorRefFactory\u0060 names \u0060akka.actor.ActorRefFactory\u0060 in one and \u0060org.apache.pekko.actor.ActorRefFactory\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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ReactiveElastic.scala"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b5d0acfb6eca126e16d2225b5d5bffdb2e804424b63d9a93549936cdd1c38f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala:211-218 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala:214-221 \u2014 before extracting anything, compare \u0060elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala\u0060 and \u0060elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 165 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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7dc9e475a7d084dd76a1f6a805059930753026c79ded0753d1fe512837badc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala:253-259 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala:256-262 \u2014 before extracting anything, compare \u0060elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala\u0060 and \u0060elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 165 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: \u0060ByteString\u0060 names \u0060akka.util.ByteString\u0060 in one and \u0060org.apache.pekko.util.ByteString\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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"04c1441a5af3b33f49c5a4afa3411e9a1f192c6f75ce0137ca7c408055ec2156"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala:56-64 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/DefaultBlacklist.scala:56-64 \u2014 before extracting anything, compare \u0060elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala\u0060 and \u0060elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/DefaultBlacklist.scala\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"91cd794daa464af5a9dcf3741a97c1a5bca72f0c58d48b38005b6dbd8cef6828"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala:66-72 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/DefaultBlacklist.scala:66-72 \u2014 before extracting anything, compare \u0060elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala\u0060 and \u0060elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/DefaultBlacklist.scala\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"36f17bc92d62b6d9d164b72eeefe355dec85564e9406b726c5a0ac3cb499a8d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala:79-85 | elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/DefaultBlacklist.scala:79-85 \u2014 before extracting anything, compare \u0060elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala\u0060 and \u0060elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/DefaultBlacklist.scala\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/DefaultBlacklist.scala"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"32caabd74f05bece6530bbd1f3e0ec338396da16579ee6c75b6d71696578de21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/funcscorer/MultiValueMode.scala:6-12 | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/sort/SortMode.scala:6-12 \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/funcscorer/MultiValueMode.scala"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a4eda017a1053634fa121293d4fd899f5eb831e97d63e708f29a09421ef023d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/RankFeatureFieldBuilderFn.scala:12-18 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/RankFeaturesFieldBuilderFn.scala:13-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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/RankFeatureFieldBuilderFn.scala"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"bacd97a1e1b6751003a5fa310adbb44306a74a67652b62eba2883202974d9aec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala:37-47 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala:37-47 \u2014 before extracting anything, compare \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala\u0060 and \u0060elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 134 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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"a97115c2e1cb8ffbb8d3002516fcf1da0d2621c2f1a2c820c4d68f18d9577ee9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala:123-128 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala:123-128 \u2014 before extracting anything, compare \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala\u0060 and \u0060elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 134 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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"a74b2415d3add3d6f7e1a3ed650f18d7df4c86281cab79d08fdb7ccc648d7b03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala:191-197 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala:191-197 \u2014 before extracting anything, compare \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala\u0060 and \u0060elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 134 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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2d608b1cd2b79fc599d996b9414ac59113f7617e4cd9166db42fe750791aef7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala:35-44 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala:35-44 \u2014 before extracting anything, compare \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala\u0060 and \u0060elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala\u0060 as WHOLE FILES: this scan already matched 5 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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"9928eb1d2ce630ced74c90effdcbf1aee84a2e5421c49af0d73f74cfa051b755"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala:64-69 | elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala:64-69 \u2014 before extracting anything, compare \u0060elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala\u0060 and \u0060elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala\u0060 as WHOLE FILES: this scan already matched 5 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":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"066da19426440f136ef1c9f33e9e0621b542c7cb29563d4be75dea7c0ee652d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala:74-83 | elastic4s-client-sttp4/src/main/scala/com/sksamuel/elastic4s/sttp4/SttpRequestHttpClient.scala:73-82 \u2014 before extracting anything, compare \u0060elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala\u0060 and \u0060elastic4s-client-sttp4/src/main/scala/com/sksamuel/elastic4s/sttp4/SttpRequestHttpClient.scala\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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":"elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"6badf79c90c5d427a26557edf614ea8d4cbc791ac4504bf9e987a6dd9e693630"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala:53-57 | elastic4s-client-sttp4/src/main/scala/com/sksamuel/elastic4s/sttp4/SttpRequestHttpClient.scala:52-56 \u2014 before extracting anything, compare \u0060elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala\u0060 and \u0060elastic4s-client-sttp4/src/main/scala/com/sksamuel/elastic4s/sttp4/SttpRequestHttpClient.scala\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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":"elastic4s-client-sttp/src/main/scala/com/sksamuel/elastic4s/sttp/SttpRequestHttpClient.scala"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d4cd3584318b3357ea0e1d794a877aee82b405b71cd837ef50c93d4b9e48b0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/GeoPointFieldBuilderFn.scala:23-30 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/GeoShapeFieldBuilderFn.scala: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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/GeoPointFieldBuilderFn.scala"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"f972109adce4eec74540e9ce816e2013f9e749b1aab3d8be9084c78953dbd8a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 9): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:32-36 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:48-52 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:64-68 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:80-84 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:97-101 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:114-118 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:131-135 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:149-153 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:166-170 \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 \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:32\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, \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:31\u0060 calls \u0060get\u0060 and \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:47\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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"542b15126b129411340573c8c746be7ac2a88e250a40da5cf6d6363c713afa76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:126-130 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala:161-165 \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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/NumberFieldBuilderFn.scala"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"daf6d81bcdbd53ee35e1e88945a31f19a99c6502283e000853d15e6c275fcc59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/task/TaskHandlers.scala:34-38 | elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/task/TaskHandlers.scala:79-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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/task/TaskHandlers.scala:39\u0060 calls \u0060foreach\u0060, \u0060put\u0060 and \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/task/TaskHandlers.scala:84\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":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/task/TaskHandlers.scala"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"c648297136863c80292017b31d05fd03825c85fa00cd057b346871033b9793ef"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: json_builder: json_builder: abstractness 0.13, instability 0.00, distance 0.87 \u2014 zone of pain \u2014 concrete and depended on by 3 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"9d3e406cac2eb85f3453d34ef79b69c209fc27d14b583d80324cfde1ba0849a7"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: core: core: abstractness 0.05, instability 0.15, distance 0.80 \u2014 zone of pain \u2014 concrete and depended on by 23 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"deda6fd6cb2c3d74f7dc0fecd76cc36d1d58966a5bcb861efc01f7e84f6f398d"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: XContentBuilder (LCOM4 5): XContentBuilder\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-json-builder/src/main/scala/com/sksamuel/elastic4s/json/XContentBuilder.scala"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fbb77bf40003085e3f5c08e1a48800c66b56022e5c258e0088ad3370e63edff"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AkkaHttpClient (LCOM4 4): AkkaHttpClient\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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30ee36c3ef4229f8b653b1c50da1ff97d9d8de9806bfc148bad5a6d314bda48"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: PekkoHttpClient (LCOM4 4): PekkoHttpClient\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":"elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4c514f86214b95265c39e1f2ad4ca5b7d3ac74c5dbc6e09e1379e7f0330a6de"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 31 significant file(s) lose their only recent owner: elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/analyzers/TokenFilter.scala, elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/BulkIndexingSubscriber.scala, elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/BulkIndexingSubscriber.scala, elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClient.scala, elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClient.scala, elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala, elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/ElasticFieldBuilderFn.scala, elastic4s-client-esjava/src/main/scala/com/sksamuel/elastic4s/http/JavaClient.scala (\u002B23 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"1a79a461f2b9080a12d826a702750b254d1fc24a322d4bf168c69be32b6273c6"}},{"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 (33 single-owned of 142 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; 142 of the 865 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 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: project/Dependencies.scala, elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/bulk/BulkBuilderFn.scala."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: //      // todo add back in candidate generators \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":"elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/suggestions/PhraseSuggestionsTest.scala"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"73804310db1f0a91af2cbf02110ef3a56a993e8d99988e30f0787715ef4b24eb"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: //      // todo add back in candidate generators \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":"elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/suggestions/PhraseSuggestionsTest.scala"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3eb0432d9ff3ff6530c76257a1fa7eedbdfe5ced707afcb0bc6651a1905b077"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: //    // todo add a test back in once (if?) elasticsearch 6.0 supports char filters again \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":"elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/requests/analyzers/NormalizerTest.scala"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"167c59288dd29a37980c6e1ecc10272019ec098859c444a911c4a8898ce88c1f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // todo put back ? \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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/InnerHit.scala"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"e77019038ad29821bf4a49f8efb051afadfb0c643a2e01ab29ee94aceb247b8e"}},{"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":"1a4cba461b2514b3e62ec5de57bb69080886fd613c18d48f725946482ed72dbb"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"54ad879ef25bee321d14852b81f8406f11ed45d6a8cf23e49e8e5e948e499151"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6a8df0ac2b27584eeb7b78e13be2cc64b4a9cdd9a0d78dc6d04ba8691a7e8bbe"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"63971014418d75eef7a8e55f7f272933c4622a893210d5a7fcc7a42b6eb9ba96"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"51dd62fe277839ce4deadbd67846e232d9332c3f416437abfb786dad3f4c6509"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ed9d2d1f740612c624f6c88ba08c8ca90ffab7e476cf610e82604e3d5c7bc742"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0785580a1e7dd96ab21e199402cc77080d242428dee2f89742c1b732ae05130c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"46fdfe39de576b024c3326df6c5c5b49bacab0a1a1166f1a1b47a3995d5876fd"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e38765411b37f59efc315526ef4500b910873eeb76da4e00aad04cbadc7f501c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ec44100209f4b66ad77505b06372fba13e79dec29ef4f6833781bb2a42fe6200"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a6e89df9c52983d1ac4db00e6172358b2cd5f14fba8262ad476d06759f4beb68"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b6639ccea7f2765b24323abaeb5c7c34eb3d529bfd30c4b4259bc9402ed40d8"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e430b221fce766ccf11007a5fc323a580f1a5070a58d6bd54a331d80ad4da192"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e003b87655b56da5c116cb15f54d38f6922b7ffacec42f72f79f35b1abf65909"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c112c1d4a580f4db77c3339f4bfc2afba0574a469936dd17ec717c886ba9723c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"693249723480b7d3690fbc9002e4acaa2fd5c4f5277d52948268b51530c89d1e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3bfe1342b2b2ff7ec30198c5be7e878786f57df0b5165ac1d200ed7af2efb121"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"38d21ae4a0f169ecb4ed1031dc65cd5ae3dc61b8e2c8518bb52f1f2ddde09f3b"},"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":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c7488e69a58f0f656e33fd2a1d5e6f40a413e9befef9e9e01c52fc19a499dce9"},"properties":{"dependency":{"package":"com.fasterxml.jackson.core:jackson-databind","version":"2.9.6","advisory":"[GHSA redacted]","aliases":["BIT-nifi-2021-20190","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"aa68f8cb9582d1d51455f006e487f6061da393a4c5976401b062d74714f6ed30"},"properties":{"dependency":{"package":"com.fasterxml.jackson.core:jackson-core","version":"2.9.6","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c9ffb9d362440c8243b956758925f848aa4e263e25f120a334d7599a4d3c9f3d"},"properties":{"dependency":{"package":"org.apache.httpcomponents:httpclient","version":"4.5.2","advisory":"[GHSA redacted]","aliases":["[CVE redacted]"],"reachability":{"kind":"unknown"}}}},{"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":"476176a40f7dde5968156df41a3ad51fabec36db7b9ad2c78af7fdee298fccfb"},"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":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: SearchScrollHandlers.scala \u2194 UpdateHandlers.scala: \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/SearchScrollHandlers.scala\u0060 (context elastic4s-core) and \u0060elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/update/UpdateHandlers.scala\u0060 (context elastic4s-handlers) sit in DIFFERENT parts of the tree yet change together 55% of the time (6 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) \u2014 the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can\u0027t see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u0060d41b6980\u0060 Fix some warnings (#4150); \u0060c57dbf2a\u0060 Convert expressions to Single Abstract Methods (#4117); \u0060373a858a\u0060 Pluggable HTTP clients #958 (at that commit the files were still \u0060elastic4s-http/src/main/scala/com/sksamuel/elastic4s/http/search/SearchScrollImplicits.scala\u0060 and \u0060elastic4s-http/src/main/scala/com/sksamuel/elastic4s/http/update/UpdateImplicits.scala\u0060) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/SearchScrollHandlers.scala"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"877924688a4cbfb3f7099264802362a651826c6280be1d2bde3fada593e41283"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: SearchHandlers.scala \u2194 SearchScrollHandlers.scala: \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/SearchHandlers.scala\u0060 and \u0060elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/SearchScrollHandlers.scala\u0060 change together 64% of the time (7 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 7 shared commits counted here, the most recent 3 are \u0060c57dbf2a\u0060 Convert expressions to Single Abstract Methods (#4117); \u00604083dcca\u0060 Added akka streams source; \u0060373a858a\u0060 Pluggable HTTP clients #958 (at that commit the files were still \u0060elastic4s-http/src/main/scala/com/sksamuel/elastic4s/http/search/SearchImplicits.scala\u0060 and \u0060elastic4s-http/src/main/scala/com/sksamuel/elastic4s/http/search/SearchScrollImplicits.scala\u0060) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/SearchHandlers.scala"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9447fd6f6459a21c02824b9b076d493fa4ec368d0be00fc92571235341aae6c"}},{"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":"171a5915161e926e35d9f9302156f7a2c57d16c96d5bdd1af3f21e2d4308269b"},"taxa":[{"id":"CICD-SEC-5","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":"d3602e3230d82fb9d1f03db29baff358a65fd735b14907054a6a8f1e398d007e"},"taxa":[{"id":"CICD-SEC-5","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":"1108e927c7d1bd1da27d18d8c887badca7066c689aa2ddaf610d21ba427c3225"},"taxa":[{"id":"CICD-SEC-5","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":"65d87ec21c1ecf43a0424ab644272e64330044f506a9f75bd32965b5f8696841"},"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: MappingDefinitionLike (18 abstract members): \u0060MappingDefinitionLike\u0060 declares 18 abstract members: \u0060all\u0060, \u0060source\u0060, \u0060sourceExcludes\u0060, \u0060dateDetection\u0060, \u0060numericDetection\u0060, \u0060size\u0060, \u0060dynamicDateFormats\u0060, \u0060properties\u0060, \u0060analyzer\u0060, \u0060boostName\u0060, \u0060boostNullValue\u0060, \u0060parent\u0060, \u0060dynamic\u0060, \u0060meta\u0060, \u0060routing\u0060, \u0060templates\u0060, \u0060rawSource\u0060, \u0060runtimes\u0060. Counted over its ABSTRACT members \u2014 a \u0060def\u0060 with no body or a \u0060val\u0060/\u0060var\u0060 with no initializer, once per signature; concrete members, private and protected members, and members of a companion \u0060object\u0060 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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/mappings/MappingDefinitionLike.scala"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4a944075c045a6e4c371518dc9fdf83f68994ea718c7e4489877e753eab6ed4"}},{"ruleId":"AX6","level":"note","message":{"text":"Fat interface: BaseUpdateByQueryRequest (21 abstract members): \u0060BaseUpdateByQueryRequest\u0060 declares 21 abstract members: \u0060indexes\u0060, \u0060query\u0060, \u0060requestsPerSecond\u0060, \u0060maxRetries\u0060, \u0060proceedOnConflicts\u0060, \u0060pipeline\u0060, \u0060refresh\u0060, \u0060script\u0060, \u0060waitForActiveShards\u0060, \u0060retryBackoffInitialTime\u0060, \u0060scroll\u0060, \u0060scrollSize\u0060, \u0060slices\u0060, \u0060slice\u0060, \u0060timeout\u0060, \u0060shouldStoreResult\u0060, \u0060size\u0060, \u0060waitForCompletion\u0060, \u0060indicesOptions\u0060, \u0060routing\u0060, \u0060preference\u0060. Counted over its ABSTRACT members \u2014 a \u0060def\u0060 with no body or a \u0060val\u0060/\u0060var\u0060 with no initializer, once per signature; concrete members, private and protected members, and members of a companion \u0060object\u0060 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":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/update/UpdateByQueryRequest.scala"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a48a79e8f782f28668b0aff74a83eda5a2f82d49fcc2a86b34afdf5e86914aa"}},{"ruleId":"GD1","level":"warning","message":{"text":"Unfinished stub \u2014 body is \u0060???\u0060: \u0060build\u0060 is a shipped member whose whole body is still \u0060???\u0060, and nothing in the repository overrides it \u2014 generated scaffolding that was never completed. Implement it or remove the dead surface."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexTemplateHandlers.scala"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"5015a9fb3e7a94957fb72845cbbaaf80326669992066766159005cd37d995c71"}},{"ruleId":"IC1","level":"warning","message":{"text":"Unfinished stub \u2014 body is ??? / NotImplementedError: \u0060build\u0060 is a shipped method whose whole body is \u0060???\u0060 (or throws NotImplementedError), and nothing in the repository overrides it \u2014 scaffolding that was never completed. Implement it or remove the dead surface."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexTemplateHandlers.scala"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"43e022041ea9b88bbb78c8876821145fea4a8aeeda42f8bc19325352d5cedb74"}},{"ruleId":"IC1","level":"note","message":{"text":"Disabled test: A test is skipped/ignored \u2014 coverage that looks present but never runs. Re-enable it or delete it so the green run means something."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-reactivestreams-akka/src/test/scala/com/sksamuel/elastic4s/akka/reactivestreams/SubscriberListenerTest.scala"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac8670d07e226390caf59a9db5dd26eac9d3a51dc5892e5a7bf3f5287a297752"}},{"ruleId":"IC1","level":"note","message":{"text":"Disabled test: A test is skipped/ignored \u2014 coverage that looks present but never runs. Re-enable it or delete it so the green run means something."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-reactivestreams-pekko/src/test/scala/com/sksamuel/elastic4s/pekko/reactivestreams/SubscriberListenerTest.scala"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"c08eeae8735995534094d9c0be34025a61071114b6a39006ed0a61ba14458983"}},{"ruleId":"IC1","level":"note","message":{"text":"Disabled test: A test is skipped/ignored \u2014 coverage that looks present but never runs. Re-enable it or delete it so the green run means something."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/requests/cat/CatShardsTest.scala"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"0be08573a6f2cb6543e2e55b7191430f00de65e34ed18fb73466302e8b817de7"}},{"ruleId":"IC1","level":"note","message":{"text":"Disabled test: A test is skipped/ignored \u2014 coverage that looks present but never runs. Re-enable it or delete it so the green run means something."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/requests/indexes/CreateIndexApiTest.scala"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fb514e320c2c754c40efbb59a5beefc7a4da831aff8d3321e3be96cd9cb8b11"}},{"ruleId":"IC1","level":"note","message":{"text":"Disabled test: A test is skipped/ignored \u2014 coverage that looks present but never runs. Re-enable it or delete it so the green run means something."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/requests/indexes/CreateIndexApiTest.scala"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6570bdf5e12c98c6976979bb32eed5418c6cfb9a51bd6083c8cb34ccf31e1ec"}},{"ruleId":"IC1","level":"note","message":{"text":"Disabled test: A test is skipped/ignored \u2014 coverage that looks present but never runs. Re-enable it or delete it so the green run means something."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/SearchDslTest.scala"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9cad61e93d178e12a469201719d684484eed1f469ede3d85ae857866bfee23b"}},{"ruleId":"IC1","level":"note","message":{"text":"Disabled test: A test is skipped/ignored \u2014 coverage that looks present but never runs. Re-enable it or delete it so the green run means something."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/queries/MoreLikeThisQueryTest.scala"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"57edc20bb3cc63b24eb53cd58aad9883cd8642eb72c401cb5ab633b5f2ec2b7b"}},{"ruleId":"IC1","level":"note","message":{"text":"Disabled test: A test is skipped/ignored \u2014 coverage that looks present but never runs. Re-enable it or delete it so the green run means something."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/queries/MoreLikeThisQueryTest.scala"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9242cb6f22c6356f96a49cc9316a3d38061b5703f8416fea4aabd7452561e8b"}},{"ruleId":"IC1","level":"note","message":{"text":"Disabled test: A test is skipped/ignored \u2014 coverage that looks present but never runs. Re-enable it or delete it so the green run means something."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/queries/MoreLikeThisQueryTest.scala"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"05df0654e7bcb38e80e080aac2e3a6668ec6f75aebb48ceab9fa0fd79f7a748b"}},{"ruleId":"IC1","level":"note","message":{"text":"Disabled test: A test is skipped/ignored \u2014 coverage that looks present but never runs. Re-enable it or delete it so the green run means something."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/queries/RawQueryTest.scala"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddea9bbc523a2e8f2a1eac42106a00d95b610172ab25987605dbdaf18288337f"}},{"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":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add scalafix or scapegoat (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 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/lint.yml"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P4","level":"note","message":{"text":"No rollback/health safety: Deployment is orchestrated by compose, but no service declares a \u0060healthcheck:\u0060 and nothing pins a previous image to fall back to \u2014 the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"db6bab8a28a2145f47e5a4e6683cda39d2ba0296c723238e8057da979ae1c706"}},{"ruleId":"P4","level":"note","message":{"text":"No release approval gate: Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY\u0027S PIPELINE FILES. What was read: every file under \u0060.github/workflows/\u0060, \u0060.forgejo/workflows/\u0060, \u0060.gitea/workflows/\u0060, \u0060.azuredevops/\u0060 and \u0060.azure-pipelines/\u0060, plus \u0060.gitlab-ci*\u0060 and \u0060azure-pipelines*\u0060 \u2014 with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab\u0027s \u0060when: manual\u0060, CircleCI\u0027s \u0060type: approval\u0060, an Azure \u0060ManualValidation@\u0060 task or an \u0060approvals:\u0060 block, a Jenkins \u0060input\u0060 step, a \u0060uses:\u0060 step naming an approval action, an \u0060environment:\u0060 paired with \u0060reviewers\u0060 / \u0060required_reviewers\u0060 / \u0060protection\u0060 / \u0060wait-timer\u0060 / \u0060deployment_branch_policy\u0060, a draft-release step, a \u0060workflow_dispatch\u0060 promotion, or a release-event gate. \u2605 What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy \u2014 all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6c11e2dbd483b4b423b95ac61bfcc7af1d55351b28a20d2b1105b31cfe38cc60"}},{"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!upstreamExhausted \u0026\u0026 (buffer.isEmpty || buffer.size \u003C= settings.fetchThreshold)\u0060 appears character-identically in 2 files \u2014 elastic4s-streams-akka/src/main/scala/com/sksamuel/elastic4s/akka/streams/ElasticSource.scala, elastic4s-streams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/streams/ElasticSource.scala. 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":"elastic4s-streams-akka/src/main/scala/com/sksamuel/elastic4s/akka/streams/ElasticSource.scala"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"68d6a8b72c39728c776f61a044610268ebb9242fbfebca78b7d3abc2dc3db364"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060upstreamExhausted \u0026\u0026 buffer.isEmpty \u0026\u0026 !fetching\u0060 appears character-identically in 2 files \u2014 elastic4s-streams-akka/src/main/scala/com/sksamuel/elastic4s/akka/streams/ElasticSource.scala, elastic4s-streams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/streams/ElasticSource.scala. 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":"elastic4s-streams-akka/src/main/scala/com/sksamuel/elastic4s/akka/streams/ElasticSource.scala"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5cd3f3de009bb5b2a4614a2a738dbf3a6981772071fbffad6ea6c0791018c3b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060username.isDefined \u0026\u0026 password.isDefined\u0060 appears character-identically in 2 files \u2014 elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClientSettings.scala, elastic4s-client-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/PekkoHttpClientSettings.scala. 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":"elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClientSettings.scala"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"40e0b7681736ead40c26dff663078daa8be19f9fb26c4ecd2de580ffb19c931b"}},{"ruleId":"X17","level":"warning","message":{"text":"Recursive walk over a caller-supplied document has no depth cap: \u0060JacksonBuilder.toNode\u0060 is public and takes \u0060value: JsonValue\u0060 from its caller, and it calls itself at line 37 with a piece of \u0060value\u0060, not as a tail call the compiler turns into a loop \u2014 and nowhere in \u0060JacksonBuilder.toNode\u0060 is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller\u0027s document \u2014 not this code \u2014 decides how deep the stack goes. On the JVM\u0027s default 1 MB thread stack a walk like this one throws \u0060StackOverflowError\u0060 from about 500\u20132,000 levels on a cold first call and 6,000\u201317,000 once warmed up (OpenJDK 21 and 25), while \u0060ujson.read\u0060, Jackson\u0027s \u0060readTree\u0060 before 2.15 and circe before 0.14.16 accept any nesting (2,000,000 levels from 4 MB) and circe 0.14.16 accepts 4,096 \u2014 on a cold JVM even play-json\u0027s cap of 1,000 is past the point the walk fails. \u0060StackOverflowError\u0060 is not \u0060NonFatal\u0060: \u0060Try\u0060, \u0060case NonFatal(e)\u0060 and \u0060recover\u0060 do not stop it, and in a \u0060Future\u0060 on the global execution context it leaves the future forever incomplete. Thread a depth argument through \u0060JacksonBuilder.toNode\u0060 and reject the value past a fixed maximum, or rewrite the descent with an explicit stack."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-json-builder/src/main/scala/com/sksamuel/elastic4s/json/JacksonBuilder.scala"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"918830c4e072706d3aabe07bb72fe272584194969b6a345703d49547b37b424e"}},{"ruleId":"X17","level":"warning","message":{"text":"Recursive walk over a caller-supplied document has no depth cap: \u0060FieldsMapper.mapper\u0060 is public and takes \u0060m: Map [ String, Any ]\u0060 from its caller, and it calls itself at line 12 with a piece of \u0060m\u0060 (and at line 13), not as a tail call the compiler turns into a loop \u2014 and nowhere in \u0060FieldsMapper.mapper\u0060 is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller\u0027s document \u2014 not this code \u2014 decides how deep the stack goes. On the JVM\u0027s default 1 MB thread stack a walk like this one throws \u0060StackOverflowError\u0060 from about 500\u20132,000 levels on a cold first call and 6,000\u201317,000 once warmed up (OpenJDK 21 and 25), while \u0060ujson.read\u0060, Jackson\u0027s \u0060readTree\u0060 before 2.15 and circe before 0.14.16 accept any nesting (2,000,000 levels from 4 MB) and circe 0.14.16 accepts 4,096 \u2014 on a cold JVM even play-json\u0027s cap of 1,000 is past the point the walk fails. \u0060StackOverflowError\u0060 is not \u0060NonFatal\u0060: \u0060Try\u0060, \u0060case NonFatal(e)\u0060 and \u0060recover\u0060 do not stop it, and in a \u0060Future\u0060 on the global execution context it leaves the future forever incomplete. Thread a depth argument through \u0060FieldsMapper.mapper\u0060 and reject the value past a fixed maximum, or rewrite the descent with an explicit stack."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/FieldsMapper.scala"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e7b53cdc2db382b5711d7ba7c20098bace930be350c8b61466a9ae51ac664ec"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 132 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bc90ea4ef683df600d61924ffa4bef4ab530284c56e82278746d5c4c4089b34"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 148 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"a212e229943d5c4293ab7e9ee440c9e29e698537374103df4d6d5044dea12691"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 157 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-reactivestreams-pekko/src/main/scala/com/sksamuel/elastic4s/pekko/reactivestreams/ScrollPublisher.scala"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b6f84d063c4669ede5851dd4808528a935194f9b338d8d317bb60f412c6101f"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 132 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"07da0ff97d09300550abe698e9b6dbf50ddc49389fbaf428b7e8f648f231c517"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 148 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"f47391db84121e85bb243e7df7d3f2b0519b9686a8cb0e07bb0d5a2acd951043"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 157 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-reactivestreams-akka/src/main/scala/com/sksamuel/elastic4s/akka/reactivestreams/ScrollPublisher.scala"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"3556875337b894febfb15c1d15f037f15e353e2e7ce893335f3f30c5a8cd17fc"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 31 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/ResponseHandler.scala"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"6db4b6a840c6a69c88c1e6a210e6a3e847fe03277b6d316bf783c741fe796ca8"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 41 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/ResponseHandler.scala"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"78dc11a7a3db7c960a2ef71df5208b9482c8a3b49bdd8a754014294e430c906e"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 118 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/update/UpdateHandlers.scala"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d0ea1d5e254f9a34ede3b22d7e0abb544a05d869f35d3eeadb4b697418ecf97"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 53 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexHandlers.scala"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"262d2aa48250695ed2b1cb05cfd817796b290ef5ee42a961c84576883e4a45c3"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 90 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexHandlers.scala"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d621a9b1c0176dd0bc7f84a147a8330b8c29a959bf0ad079ccf511ed6817355"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug\u0060 at line 79 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/delete/DeleteHandlers.scala"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"73073400be364260d21a9c58a95031b9f5974faf497b99fde149eb0a40c98797"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 58 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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.info(\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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-client-sniffed/src/main/scala/com/sksamuel/elastic4s/http/JavaClientSniffed.scala"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ab35712b84b2534e44ba8d4aa8b078af67216af5a0c7e67c388100630fd882a"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 157 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string \u2014 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.info(\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, OpenTelemetry), or \u0060log.atInfo().addKeyValue(\u0022order_id\u0022, orderId).log(\u0022order moved\u0022)\u0060 with SLF4J 2\u0027s fluent API. scala-logging\u0027s \u0060LazyLogging\u0060 logger takes an \u0060s\u0022\u2026\u0022\u0060 message apart into that pattern at compile time, so switching to it is also a fix."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"elastic4s-client-esjava/src/main/scala/com/sksamuel/elastic4s/http/JavaClient.scala"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e2b46495600d205c512fc6af8a814305f98c4d38d1e4a1cdf08f75dfeced693"}},{"ruleId":"X5","level":"note","message":{"text":"Scala\u0027s null is not held to the type system everywhere: No build over this repository\u0027s 861 Scala product file(s) passes \u0060-Yexplicit-nulls\u0060, enables WartRemover\u0027s \u0060Null\u0060 wart or runs Scalafix\u0027s \u0060DisableSyntax.noNulls\u0060, so every reference type admits null and nothing reports a \u0060null\u0060 written into the code or returned from a Java API \u2014 the first one to reach a method call is a \u0060NullPointerException\u0060. \u0060Option\u0060 by convention is a habit no tool here holds the code to."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"23e7c3c6da50151f07723c64ca4f881fd5903e713d143161a7c0594ad7ba29cc"}}],"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-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-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-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-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-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-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-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"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":30,"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."]}]}