{"$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":"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"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"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":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"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"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"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"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"]}},{"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"]}],"properties":{"cwe":["CWE-1357","CWE-494"]}}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"BrokerController.shutdownBasicService (cyclomatic 66): BrokerController.shutdownBasicService has cyclomatic complexity 66 (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":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":1519}}}],"partialFingerprints":{"codehealthFindingId/v1":"34f98a25d03877d2ed63845881d60e9de59e04f6d8c7f18c2f3ede1c4460c1b1"}},{"ruleId":"D1","level":"warning","message":{"text":"PopMessageProcessor.processRequest (cyclomatic 61): PopMessageProcessor.processRequest has cyclomatic complexity 61 (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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"233af7d6e2d692f0079b026a24715f00a1a20ff513a9ef154e800c78b37c5346"}},{"ruleId":"D1","level":"warning","message":{"text":"ComparisonExpression.__compare (cyclomatic 54): ComparisonExpression.__compare has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9ffd31bc3a8ceea926b085befdc45be9be813d0e45c3f24bd9f49da71e8483"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultAuthorizationContextBuilder.build (cyclomatic 47): DefaultAuthorizationContextBuilder.build has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"28a289de8c8b1935c6de952b27a26319ba88503a303f8c86f3e277a9bd270257"}},{"ruleId":"D1","level":"warning","message":{"text":"PullMessageProcessor.processRequest (cyclomatic 47): PullMessageProcessor.processRequest has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bcf4774e451225355bb334ad06d1095a60ad5a7f0cc295fab9b0182957f0b92"}},{"ruleId":"D1","level":"warning","message":{"text":"RouteInfoManager.registerBroker (cyclomatic 43): RouteInfoManager.registerBroker has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee32618c86a497240808e82db41540a6a49256313360220bb87938ad51ac5283"}},{"ruleId":"D1","level":"warning","message":{"text":"TransactionalMessageServiceImpl.check (cyclomatic 42): TransactionalMessageServiceImpl.check has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8bc29d838feeb4e110378d9bfc494d15478000044a4a46dc520670bec877f47"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMQPushConsumerImpl.checkConfig (cyclomatic 38): DefaultMQPushConsumerImpl.checkConfig has cyclomatic complexity 38 (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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java"},"region":{"startLine":1025}}}],"partialFingerprints":{"codehealthFindingId/v1":"587de87383f570c37eb70e16ddf6f592a5fdea5b7db5f793aabcf28e1c8928ad"}},{"ruleId":"D1","level":"warning","message":{"text":"MQAdminImpl.queryMessage (cyclomatic 38): MQAdminImpl.queryMessage has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd1434e26dee1137e39d759df8724a9b6a99d80f4b8995878ec7046e16f30d49"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMessageStore.getMessage (cyclomatic 38): DefaultMessageStore.getMessage has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ef283e03f2cf1f20723b8943addfb058c44a8678166a7700ea43ad2d076bcf6"}},{"ruleId":"D1","level":"warning","message":{"text":"BrokerController.startBasicService (cyclomatic 37): BrokerController.startBasicService has cyclomatic complexity 37 (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":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":1827}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f0006eff0dfcac2cff2bcf5229b151d08453481412da50c91b841457643321"}},{"ruleId":"D1","level":"warning","message":{"text":"CommitLog.asyncPutMessage (cyclomatic 37): CommitLog.asyncPutMessage has cyclomatic complexity 37 (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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":999}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a2dffc554af7d9cf23ed88baf43f1d60bfb9e6dd454e24cd6d574c84fede4cc"}},{"ruleId":"D1","level":"warning","message":{"text":"RebalanceImpl.updateMessageQueueAssignment (cyclomatic 36): RebalanceImpl.updateMessageQueueAssignment has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef510f37ae518f873b8e8af52922881dac5d2bd49c8bca1f9e90c93ed93dff87"}},{"ruleId":"D1","level":"warning","message":{"text":"PopReviveService.consumeReviveMessage (cyclomatic 35): PopReviveService.consumeReviveMessage has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"c53450a9c35aa8f78f0ac8278d25e58c2dc8f50404db08eb3968f3720909fc15"}},{"ruleId":"D1","level":"warning","message":{"text":"Producer.main (cyclomatic 34): Producer.main has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/benchmark/Producer.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e0346090b6eb91e08b26b10473bf9a9979faf0bb00b6fa43010ea6253d79cb3"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMQProducerImpl.sendDefaultImpl (cyclomatic 33): DefaultMQProducerImpl.sendDefaultImpl has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":738}}}],"partialFingerprints":{"codehealthFindingId/v1":"44dfd513212f5996a86b82386dfba0a8f82c103d5ac1598dd9dbe94f938d42c6"}},{"ruleId":"D1","level":"warning","message":{"text":"CommitLog.checkMessageAndReturnSize (cyclomatic 33): CommitLog.checkMessageAndReturnSize has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"df3a46af845723d54f5ae7425cb082e2bf80fa24ed0ca09f710b1221436231c7"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageStoreDispatcherImpl.doScheduleDispatch (cyclomatic 32): MessageStoreDispatcherImpl.doScheduleDispatch has cyclomatic complexity 32 (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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreDispatcherImpl.java"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7a1fecb330eda5e105d50c811cadefcb71f366b77d62824c04a23a7bdc19161"}},{"ruleId":"D1","level":"warning","message":{"text":"PopBufferMergeService.scan (cyclomatic 31): PopBufferMergeService.scan has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbfb7bf0f87ab62b47425fcde7919b93c553e962fd5d1c0056adbbcf9eac4f1e"}},{"ruleId":"D1","level":"warning","message":{"text":"CommitLog.asyncPutMessages (cyclomatic 31): CommitLog.asyncPutMessages has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1172}}}],"partialFingerprints":{"codehealthFindingId/v1":"b323df8734a6c6bd54f4f7d0f2d3a4d4df01a63ffda45e671f707934b4e092af"}},{"ruleId":"D1","level":"warning","message":{"text":"PopMessageProcessor.popMsgFromQueue (cyclomatic 30): PopMessageProcessor.popMsgFromQueue has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java"},"region":{"startLine":677}}}],"partialFingerprints":{"codehealthFindingId/v1":"d78cd40e19c90c394a58ee1cf32ce49d483cca5be418385f8d029a2c080e3019"}},{"ruleId":"D1","level":"warning","message":{"text":"PopConsumerService.popAsync (cyclomatic 29): PopConsumerService.popAsync has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc1068079347bac3e8a8277576d18e2084245738068b135dbc5cd6ceb6d7f77c"}},{"ruleId":"D1","level":"warning","message":{"text":"AbstractSendMessageProcessor.consumerSendMsgBack (cyclomatic 29): AbstractSendMessageProcessor.consumerSendMsgBack has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed709d437d6450a122bcdeeb00ccb2eb7f3af0aad5df33cafc8f0c18b276fd92"}},{"ruleId":"D1","level":"warning","message":{"text":"PullTaskImpl.run (cyclomatic 29): PullTaskImpl.run has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java"},"region":{"startLine":890}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3bc148c31264cf162a50a14ea84db72161660f618e2e64a092a134bd785933"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsumeQueue.correctMinOffset (cyclomatic 29): ConsumeQueue.correctMinOffset has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"f65f1402e9c2944dc3cfa970d13edbe39fd344d95dc26bc07575d071ecfab36f"}},{"ruleId":"D1","level":"warning","message":{"text":"TopicQueueMappingCleanService.cleanItemListMoreThanSecondGen (cyclomatic 28): TopicQueueMappingCleanService.cleanItemListMoreThanSecondGen has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"df924c2e168ab0f6067b87db772bc4a60c40d951d568cac9327a5d93574c6111"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsumeRequest.run (cyclomatic 28): ConsumeRequest.run has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3e5e63ca8e74ec9422f0e586231a48ca16e2625cd7e94731210b8b710d00c3b"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageRocksDBStorage.queryOffsetForIndex (cyclomatic 28): MessageRocksDBStorage.queryOffsetForIndex has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"2188a19dce7153aba2362084340be03844531df52fdb03e92ea5bbe9ee433f73"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsumeQueue.binarySearchInQueueByTime (cyclomatic 28): ConsumeQueue.binarySearchInQueueByTime has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"eac9f8697978ff98053f543225afc5d1b523663dbe803f35cb82d73f145a65de"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMQProducerImpl.sendKernelImpl (cyclomatic 27): DefaultMQProducerImpl.sendKernelImpl has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"f82c10d54544c4f6f20fb8b5e48af4b6605dbcb2bfe554dd3c0c15dc03dc375f"}},{"ruleId":"D1","level":"warning","message":{"text":"IndexRocksDBStore.buildIndex (cyclomatic 27): IndexRocksDBStore.buildIndex has cyclomatic complexity 27 (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":"store/src/main/java/org/apache/rocketmq/store/index/rocksdb/IndexRocksDBStore.java"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6bec421d150aca67ced9df0b54445e92cebf7b1ced650a50fca5d2b0787b40f"}},{"ruleId":"D1","level":"warning","message":{"text":"RocksDBConsumeQueueTable.binarySearchInCQByTime (cyclomatic 26): RocksDBConsumeQueueTable.binarySearchInCQByTime has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueTable.java"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b2fde94d6f0b98445682521fe1a39b0e2a77f45b2879be67e2f75a47d4daf4b"}},{"ruleId":"D1","level":"warning","message":{"text":"TimerMessageStore.checkAndReviseMetrics (cyclomatic 26): TimerMessageStore.checkAndReviseMetrics has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1291}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ca48528cb44635c227e04d26dfdd239d7453ec15636b7a7727253f8176e1cd6"}},{"ruleId":"D1","level":"warning","message":{"text":"TimerMessageStore.dequeue (cyclomatic 26): TimerMessageStore.dequeue has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1018}}}],"partialFingerprints":{"codehealthFindingId/v1":"58d9b987a63f57fad9fbeed99d3d30583a6db01f382984c22cd2391be54054d1"}},{"ruleId":"D1","level":"warning","message":{"text":"CommitLog.recoverAbnormally (cyclomatic 26): CommitLog.recoverAbnormally has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":768}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2cc2a7ac8943674ae613a92a793a14eca3596ab38bea71b9461c6d26e5b584f"}},{"ruleId":"D1","level":"warning","message":{"text":"TopicQueueMappingCleanService.cleanItemExpired (cyclomatic 25): TopicQueueMappingCleanService.cleanItemExpired has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e05bf9a1a16677f9ad385b5b623172240c3e4f2aa4e336d6dfe79512354ad4c"}},{"ruleId":"D1","level":"warning","message":{"text":"SendMessageProcessor.sendMessage (cyclomatic 25): SendMessageProcessor.sendMessage has cyclomatic complexity 25 (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":"broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"98024a7630db01985fcd93b945b2828f1cebd79031fa94964ba95e51c4f547bb"}},{"ruleId":"D1","level":"warning","message":{"text":"TimerMessageStore.shutdown (cyclomatic 25): TimerMessageStore.shutdown has cyclomatic complexity 25 (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":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"57573b6bb1d0f16e15e445937397916a2dc2f3de495e1c340a5d72c5a17cf335"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsumerLagCalculator.processAllGroup (cyclomatic 24): ConsumerLagCalculator.processAllGroup has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0f9d8c375bb4e54984d0be6bff038b380bd40d552b9f97294d5e926cc5f5f68"}},{"ruleId":"D1","level":"warning","message":{"text":"SendMessageProcessor.handlePutMessageResult (cyclomatic 24): SendMessageProcessor.handlePutMessageResult has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"e27d0aa6fc05ca4e58e16879ead039e7b72841b218b6037323b375c456945905"}},{"ruleId":"D1","level":"warning","message":{"text":"PolishExpr.participle (cyclomatic 24): PolishExpr.participle has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/filter/impl/PolishExpr.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"531b51c45bfbd17888243f20ce09e2cd56da0a3c6331a6d2d8bab01379169e63"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsumerProgressSubCommand.execute (cyclomatic 24): ConsumerProgressSubCommand.execute has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerProgressSubCommand.java"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cd14e8d9fbdb54cd91f9731d352cf6f3b8d45c940976df4ba436534a95c30a1"}},{"ruleId":"D1","level":"warning","message":{"text":"NotificationProcessor.processRequest (cyclomatic 23): NotificationProcessor.processRequest has cyclomatic complexity 23 (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":"broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"9583683c0dca4f59e1f7593141f28f4f644342be61b3df4125debfb7156921b4"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMQPushConsumerImpl.pullMessage (cyclomatic 23): DefaultMQPushConsumerImpl.pullMessage has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"2925e12fb4259fff57ea05feae571894114c9a9eacf37680915b71422dacd9f0"}},{"ruleId":"D1","level":"warning","message":{"text":"RouteInfoManager.pickupTopicRouteData (cyclomatic 23): RouteInfoManager.pickupTopicRouteData has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java"},"region":{"startLine":700}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c935186f658b5177c418170b9dd261bca51db10dd7e3294cc27c29231a73d15"}},{"ruleId":"D1","level":"warning","message":{"text":"DLedgerCommitLog.asyncPutMessages (cyclomatic 23): DLedgerCommitLog.asyncPutMessages has cyclomatic complexity 23 (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":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd6ede1a349710ea81a8b470041110b672b4cc87616049a58f68ea9b1ce0d19"}},{"ruleId":"D1","level":"warning","message":{"text":"SubscriptionFilterHandler.register (cyclomatic 22): SubscriptionFilterHandler.register has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"3aed989a3ac3f692baf183e720c3b285f5ac2fc0eb174c2f48c2c54ba0aa1c08"}},{"ruleId":"D1","level":"warning","message":{"text":"Consumer.main (cyclomatic 22): Consumer.main has cyclomatic complexity 22 (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":"example/src/main/java/org/apache/rocketmq/example/benchmark/Consumer.java"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"80d528ae8ea86410d7b4d063cc8f900437d9b6db67862bdb13ad58cc27adb4af"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMessageStore.shutdown (cyclomatic 22): DefaultMessageStore.shutdown has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"160b01967dc9efa88a2e6d78a93ae5058192ea75f191c3b30d9656b94501e8c9"}},{"ruleId":"D1","level":"warning","message":{"text":"PeekMessageProcessor.processRequest (cyclomatic 21): PeekMessageProcessor.processRequest has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"109aabaeee0b3d9a1b9f810f78258310832ad0f56d8a8d8c625ea5fbcd737696"}},{"ruleId":"D1","level":"warning","message":{"text":"PullMessageProcessor.rewriteResponseForStaticTopic (cyclomatic 21): PullMessageProcessor.rewriteResponseForStaticTopic has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"276e289805c890978bb0d2475353f8420d6f8731ae116e1ab280a12696ad087b"}},{"ruleId":"D1","level":"warning","message":{"text":"PullMessageRequestHeader.decode (cyclomatic 21): PullMessageRequestHeader.decode has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"31f479c84bf8cfc8ea928046e80f780ca7b0e98cda4b9bfc7f58eb756a67cba2"}},{"ruleId":"D1","level":"warning","message":{"text":"SubscriptionData.equals (cyclomatic 21): SubscriptionData.equals has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/heartbeat/SubscriptionData.java"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ddec060d3737253d5efe3a2e50a37a4cec391231d91cd1a3e0aa319f85403dd"}},{"ruleId":"D1","level":"warning","message":{"text":"RemotingCommand.decodeCommandCustomHeaderDirectly (cyclomatic 21): RemotingCommand.decodeCommandCustomHeaderDirectly has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"08c4ee0a3fc0dda5bc111fba8d4b2186fe872f76a00745e9d43ada7579efcb6a"}},{"ruleId":"D1","level":"warning","message":{"text":"MQClientInstance.updateTopicRouteInfoFromNameServer (cyclomatic 21): MQClientInstance.updateTopicRouteInfoFromNameServer has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"6441e7fcc58904c3af9e01804a63c862b841d24358241774e1b7bdaf68ffde7e"}},{"ruleId":"D1","level":"warning","message":{"text":"MQClientAPIImpl.processPopResponse (cyclomatic 21): MQClientAPIImpl.processPopResponse has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1113}}}],"partialFingerprints":{"codehealthFindingId/v1":"677e3a266fea6cadce846452b38a70d27fcb85aa4c45b5bf6eb281dde016bd83"}},{"ruleId":"D1","level":"warning","message":{"text":"HAClientReader.processReadResult (cyclomatic 21): HAClientReader.processReadResult has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAClient.java"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"523fdd55ee2772d480b99fd2264b2c9d5d880571cacfdbb44c6e3b3a1d950a46"}},{"ruleId":"D1","level":"warning","message":{"text":"TimerMessageRocksDBStore.doPut (cyclomatic 21): TimerMessageRocksDBStore.doPut has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c4b6af620cb6457e1104bea24281a2cb17c546217218823ab8f40a2d7dab1fe"}},{"ruleId":"D1","level":"warning","message":{"text":"TimerMessageStore.doPut (cyclomatic 21): TimerMessageStore.doPut has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1191}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1ba3d151e4251ad6b17ff19f2c161e65dd8ca627c3cdeb188f8be5ee2b5425e"}},{"ruleId":"D1","level":"warning","message":{"text":"TimerMessageStore.warmDequeue (cyclomatic 21): TimerMessageStore.warmDequeue has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"444ad2cfbd79d6a4d885bfdc197022b3ff7e6312deab71d6402e2a5782d9ca72"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMQAdminExtImpl.examineConsumeStats (cyclomatic 21): DefaultMQAdminExtImpl.examineConsumeStats has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"a27c1a91a470ccd779c45809d1a35136b0d4cb1e3539ef1ba1b5235f63c3250e"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultAuthorizationContextBuilder.build (cyclomatic 20): DefaultAuthorizationContextBuilder.build has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea2c4d223ae128de76e16c92745010d8167c2d31a8c99b440aa864dfcd133fdd"}},{"ruleId":"D1","level":"warning","message":{"text":"BrokerMetricsManager.init (cyclomatic 20): BrokerMetricsManager.init has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0f25cfefeb2c09706b7114ff14853c027b94c2200c2073ce8858d832aabc178"}},{"ruleId":"D1","level":"warning","message":{"text":"BrokerController.\u003Cinit\u003E (cyclomatic 20): BrokerController.\u003Cinit\u003E has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff1ee0f0d2588c9554e96ffe40b50ff9501d5be22e2461fa2fc744e334d480aa"}},{"ruleId":"D1","level":"warning","message":{"text":"AbstractRocksDBStorage.iterate (cyclomatic 20): AbstractRocksDBStorage.iterate has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a5c6802c506f46ae74dfee305ad2934e91c25633e4b7656f919e23c1bc9d21b"}},{"ruleId":"D1","level":"warning","message":{"text":"3.run (cyclomatic 20): 3.run has cyclomatic complexity 20 (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":"example/src/main/java/org/apache/rocketmq/example/benchmark/Producer.java"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a3a0f676112de734e69769ee1d61828dc67a80638843038b3c61bbfa746c6c3"}},{"ruleId":"D1","level":"warning","message":{"text":"SendMessageActivity.buildMessageProperty (cyclomatic 20): SendMessageActivity.buildMessageProperty has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/producer/SendMessageActivity.java"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"35a5457320b0fb5f146c892033975fa930849a8e1b90109d83cadcbcf3b9c0d1"}},{"ruleId":"D1","level":"warning","message":{"text":"GroupTransferService.doWaitTransfer (cyclomatic 20): GroupTransferService.doWaitTransfer has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/GroupTransferService.java"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"e339c95b3df253f0bb90b6cf9999c77ce4791258ef8db7d0a16145a8836c9743"}},{"ruleId":"D1","level":"warning","message":{"text":"CompactionLog.getMessage (cyclomatic 20): CompactionLog.getMessage has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ec1c7078d4e5e5b19eddc938e484284a6a9cf43d04b6d049b3f36c4d4ca2bd8"}},{"ruleId":"D1","level":"warning","message":{"text":"ReputMessageService.doReput (cyclomatic 20): ReputMessageService.doReput has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":2711}}}],"partialFingerprints":{"codehealthFindingId/v1":"985de190d66f8c445a28696741352a0b2adcb370a4c3f4d747340b87d78de8aa"}},{"ruleId":"D1","level":"warning","message":{"text":"GetLiteGroupInfoSubCommand.execute (cyclomatic 20): GetLiteGroupInfoSubCommand.execute has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteGroupInfoSubCommand.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fe2594ee36a10801bda879ec1a476a1da3b0b707259e0e3048003fdaca630d3"}},{"ruleId":"D1","level":"warning","message":{"text":"UpdateTopicPermSubCommand.execute (cyclomatic 20): UpdateTopicPermSubCommand.execute has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"d607695c7c8764a20eee770c53dc72948919ca55fa89e926e25e8dc6943ba2cb"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultConsumerIdsChangeListener.handle (cyclomatic 19): DefaultConsumerIdsChangeListener.handle has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/DefaultConsumerIdsChangeListener.java"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc370c6ad5be3ec30b574970161de7844caaaff922d8cbd1ae660e116537742a"}},{"ruleId":"D1","level":"warning","message":{"text":"PopLiteLongPollingService.run (cyclomatic 19): PopLiteLongPollingService.run has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"fed727e43e26b60683517ac682325e65ec35ce28a7f8536b32e30ef5e55fad0f"}},{"ruleId":"D1","level":"warning","message":{"text":"PopLongPollingService.run (cyclomatic 19): PopLongPollingService.run has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"024e59c9cd299d52608d19b9a42378d6137f1731b8a7c97bc83e894ae727c76a"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultPullMessageResultHandler.handle (cyclomatic 19): DefaultPullMessageResultHandler.handle has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"03bdd8e2b2c3562855c2f635ff4a258ae3e5c3a57ceded2bcb771ec3481c7f6a"}},{"ruleId":"D1","level":"warning","message":{"text":"PullMessageProcessor.composeResponseHeader (cyclomatic 19): PullMessageProcessor.composeResponseHeader has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"93533053c7e2c870062b5a5f3394fdde0c0498d3dc8d1201c6125d7c517ac76f"}},{"ruleId":"D1","level":"warning","message":{"text":"TopicRouteData.equals (cyclomatic 19): TopicRouteData.equals has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/route/TopicRouteData.java"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"59f483fd790ebde34f8ec885cb1cd2217aa8a56fa82c715f3a43ba3aa6854aac"}},{"ruleId":"D1","level":"warning","message":{"text":"PullAPIWrapper.processPullResult (cyclomatic 19): PullAPIWrapper.processPullResult has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/PullAPIWrapper.java"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"34ff8048568ad05bf537485564aac983de5b6561926e5b6654b3cb26b30b45f1"}},{"ruleId":"D1","level":"warning","message":{"text":"RebalancePushImpl.computePullFromWhereWithException (cyclomatic 19): RebalancePushImpl.computePullFromWhereWithException has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalancePushImpl.java"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"619d9f0529f95875ec6832517a9f7325e8d53f8265ecc07fe8a57d39f89d39da"}},{"ruleId":"D1","level":"warning","message":{"text":"BrokerContainerProcessor.addBroker (cyclomatic 19): BrokerContainerProcessor.addBroker has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"4536cc2f58c3f8d6515756acdaf16a9968efa4f346229f91f83752823f4cb13f"}},{"ruleId":"D1","level":"warning","message":{"text":"ControllerMetricsManager.init (cyclomatic 19): ControllerMetricsManager.init has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/metrics/ControllerMetricsManager.java"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"015fe043c18551ab3a8b891b49415fe6f5823407e490be3cf74a394709769fe0"}},{"ruleId":"D1","level":"warning","message":{"text":"ProxyMetricsManager.start (cyclomatic 19): ProxyMetricsManager.start has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/metrics/ProxyMetricsManager.java"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"453a36c10ab07e23d9a38994fb36f06a01ab91432d9ecec8e1365eb44312880b"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalMessageService.popMessage (cyclomatic 19): LocalMessageService.popMessage has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"805e2c3e98fe6d598ffef30ae1497eef775812e23611d9e91ee0f9ce8458add0"}},{"ruleId":"D1","level":"warning","message":{"text":"TimerDequeueGetMessageService.run (cyclomatic 19): TimerDequeueGetMessageService.run has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1705}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbb34f2a445db4cc26779725162bb4cb4e24a3a1fcc27ef870b94b65794472f8"}},{"ruleId":"D1","level":"warning","message":{"text":"CleanCommitLogService.isSpaceToDelete (cyclomatic 19): CleanCommitLogService.isSpaceToDelete has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":2428}}}],"partialFingerprints":{"codehealthFindingId/v1":"86cadd16b5da725b5ef4ddfe5c5d54dcde8ce81649233fd7bcfc61e14833a0d4"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMQAdminExtImpl.messageTrackDetail (cyclomatic 19): DefaultMQAdminExtImpl.messageTrackDetail has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":1350}}}],"partialFingerprints":{"codehealthFindingId/v1":"1300a197a76005b926465fb42fd7640bbfa1e8d70f6f53ded2e23476bb1406f7"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsumeMessageCommand.execute (cyclomatic 19): ConsumeMessageCommand.execute has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/message/ConsumeMessageCommand.java"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"491a8aa47df73e91e07f25da5adcc441ce709392c8976e7e462577cdf7d6949a"}},{"ruleId":"D1","level":"warning","message":{"text":"EndTransactionProcessor.processRequest (cyclomatic 18): EndTransactionProcessor.processRequest has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"45b37ac94fac54746fe1ff9480e6bef97f2d3ef188f934ca3f7b16baa5ea0afc"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsumeRequest.run (cyclomatic 18): ConsumeRequest.run 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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"33d4f56650223ad4d639a2d5351e8634ccf906178d18e20904ed2226f338160a"}},{"ruleId":"D1","level":"warning","message":{"text":"TransactionProducer.main (cyclomatic 18): TransactionProducer.main 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":"example/src/main/java/org/apache/rocketmq/example/benchmark/TransactionProducer.java"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dedca58b42d934cd48edcfe394a17efbbeadcfeb862d03c005333cc8be657fc"}},{"ruleId":"D1","level":"warning","message":{"text":"GrpcConverter.buildSystemProperties (cyclomatic 18): GrpcConverter.buildSystemProperties 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":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/common/GrpcConverter.java"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb610fbcdbafc8f22c3a4f59f65dd2812e1add33ca8532656d508977a93a5c7a"}},{"ruleId":"D1","level":"warning","message":{"text":"ReceiveMessageActivity.receiveMessage (cyclomatic 18): ReceiveMessageActivity.receiveMessage has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/ReceiveMessageActivity.java"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8de75586d46bd12b40a52510de01c385fbaf70652c62061a6640bc88b1e1fd2"}},{"ruleId":"D1","level":"warning","message":{"text":"AbstractWriteSocketService.run (cyclomatic 18): AbstractWriteSocketService.run has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAConnection.java"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"d44ca4c26b0b27ca6ec43c775be23c1c88aaf072eded4cfcb5ddd2cba3fe951e"}},{"ruleId":"D1","level":"warning","message":{"text":"WriteSocketService.run (cyclomatic 18): WriteSocketService.run has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAConnection.java"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab5aca6fc3db7efb60236c44574be1b4f078c3f6b49ad0f6b3ba1a101c81005f"}},{"ruleId":"D1","level":"warning","message":{"text":"IndexService.buildIndex (cyclomatic 18): IndexService.buildIndex has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/index/IndexService.java"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eb5d8c4953cb01a23d3d3196a2f0ca913b1f3e048bd89c3b709aacd17a23e9a"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultAppendMessageCallback.doAppend (cyclomatic 18): DefaultAppendMessageCallback.doAppend has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1990}}}],"partialFingerprints":{"codehealthFindingId/v1":"318ec9e37fb356795df5a68e111db673cba1893f6caa6b8fa0b430919068501a"}},{"ruleId":"D1","level":"warning","message":{"text":"MappedFileQueue.getConsumeQueueMappedFileByTime (cyclomatic 18): MappedFileQueue.getConsumeQueueMappedFileByTime has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"59dcbb7a2328683d395cbb19df00881b0f99b45cd99f33e183f9c8d0b5cb2a64"}},{"ruleId":"D1","level":"warning","message":{"text":"ResetOffsetByTimeCommand.execute (cyclomatic 18): ResetOffsetByTimeCommand.execute 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":"tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2535e71ff09004e4fc4a107a38e9b7aefb323b455449a99f63728440fa697e8"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsumerManager.doChannelCloseEvent (cyclomatic 17): ConsumerManager.doChannelCloseEvent has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c9aa602f52aa7ffadb1f17acabfd413d3d690795b84285196a329027d2eba57"}},{"ruleId":"D1","level":"warning","message":{"text":"ProducerManager.doChannelCloseEvent (cyclomatic 17): ProducerManager.doChannelCloseEvent has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/ProducerManager.java"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c36e29f9de969144f9503dfc22e397f9f291d373896b42a0e520dd5b0adc4c7"}},{"ruleId":"D1","level":"warning","message":{"text":"AdminBrokerProcessor.resetOffsetInner (cyclomatic 17): AdminBrokerProcessor.resetOffsetInner has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":2267}}}],"partialFingerprints":{"codehealthFindingId/v1":"87f0cb4112861fab6b191eeb3e6b0fc92a585ef7c643710bffdf945274fa4c54"}},{"ruleId":"D1","level":"warning","message":{"text":"BrokerStartup.buildBrokerController (cyclomatic 17): BrokerStartup.buildBrokerController has cyclomatic complexity 17 (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":"broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5ae3102a949b3d0fa6468e39a38acd7f124f8c3752cdac738fdcd7c56fcd149"}},{"ruleId":"D1","level":"warning","message":{"text":"RemotingHelper.invokeSync (cyclomatic 17): RemotingHelper.invokeSync has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"8879e58f4fef3aad0ef83b276bbc8c5cbecd437b6c610b2c836fa92c600608f1"}},{"ruleId":"D1","level":"warning","message":{"text":"MQClientInstance.sendHeartbeatToAllBrokerConcurrently (cyclomatic 17): MQClientInstance.sendHeartbeatToAllBrokerConcurrently has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":814}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cbf1fbfd61d0fb45243ac0ba71126a99a95abe72ecd92461c627e53c8621e20"}},{"ruleId":"D1","level":"warning","message":{"text":"AbstractRocksDBStorage.shutdown (cyclomatic 17): AbstractRocksDBStorage.shutdown has cyclomatic complexity 17 (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":"common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"efef4a2d33c531f9dd01e3d9fb926b0f400d8a0964287d4bafa03cc77bd2a31d"}},{"ruleId":"D1","level":"warning","message":{"text":"MixAll.properties2Object (cyclomatic 17): MixAll.properties2Object has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/MixAll.java"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"14743d50472ee8c10a1a27da58a1054dcf71d4caee32b4ad0640e852d82f3bca"}},{"ruleId":"D1","level":"warning","message":{"text":"1.run (cyclomatic 17): 1.run has cyclomatic complexity 17 (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":"example/src/main/java/org/apache/rocketmq/example/simple/PullConsumer.java"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec1c342a7538093d16e7503ae1816449b2b3150e33804139887becfd6730cf1f"}},{"ruleId":"D1","level":"warning","message":{"text":"BatchConsumeQueue.estimateMessageCount (cyclomatic 17): BatchConsumeQueue.estimateMessageCount has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":1102}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2594a088b9502df80862db9853723d28ab7cb02550848438af34fbef528d49f"}},{"ruleId":"D1","level":"warning","message":{"text":"TimerMessageStore.recoverAndRevise (cyclomatic 17): TimerMessageStore.recoverAndRevise has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"803241acc5590abe1a177b9afa82a7932e72f50ccad4f44eb88126c9f5fd863c"}},{"ruleId":"D1","level":"warning","message":{"text":"TimerDequeuePutMessageService.run (cyclomatic 17): TimerDequeuePutMessageService.run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1609}}}],"partialFingerprints":{"codehealthFindingId/v1":"515ef7304dba124eebe68b4cbb08f9e33b0c53cea49085eafac6b56f7f0f9d5f"}},{"ruleId":"D1","level":"warning","message":{"text":"TransMessageRocksDBStore.buildTransIndex (cyclomatic 17): TransMessageRocksDBStore.buildTransIndex has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/transaction/TransMessageRocksDBStore.java"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f9f07599588d72023cac69399b9d940918ec773c2c3b66a5b25bf8557373b15"}},{"ruleId":"D1","level":"warning","message":{"text":"CommitLog.recoverNormally (cyclomatic 17): CommitLog.recoverNormally has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2e5862226380fbbe69e8d4702f4b2a83e7ae8463ceb43170cefc5db0fafe837"}},{"ruleId":"D1","level":"warning","message":{"text":"ClusterListSubCommand.printClusterBaseInfo (cyclomatic 17): ClusterListSubCommand.printClusterBaseInfo has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8236e8b99bec8fa06b940ab15d195377e783ede52c89923a70be91dbbd7d8e2"}},{"ruleId":"D1","level":"warning","message":{"text":"ClusterSendMsgRTCommand.execute (cyclomatic 17): ClusterSendMsgRTCommand.execute has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterSendMsgRTCommand.java"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9622bb359b8766c868ba4a284c518530893b167fd87c9a2a0f87a14d680f264"}},{"ruleId":"D1","level":"warning","message":{"text":"UpdateSubGroupSubCommand.execute (cyclomatic 17): UpdateSubGroupSubCommand.execute has cyclomatic complexity 17 (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":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupSubCommand.java"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"28cfbef4228af642a9e272e71944a2740f868af8820b0d41dc7fe73d4ab18a76"}},{"ruleId":"D1","level":"warning","message":{"text":"StatsAllSubCommand.printTopicDetail (cyclomatic 17): StatsAllSubCommand.printTopicDetail has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/stats/StatsAllSubCommand.java"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c5619cc3f48162f90db157833eea0b5ba4e5331cf11ce5784b52a01854af05a"}},{"ruleId":"D1","level":"warning","message":{"text":"RemappingStaticTopicSubCommand.execute (cyclomatic 17): RemappingStaticTopicSubCommand.execute has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"1406a1cb6ea6856394edd8f97f9171726c443859d0b4b63a84cd857a346fb7cc"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsumerManager.registerConsumer (cyclomatic 16): ConsumerManager.registerConsumer has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"b936c3c98e6cff7b4b8215f46341634ced39551f7c7cbcbf1f98918363b0747e"}},{"ruleId":"D1","level":"warning","message":{"text":"BrokerMetricsManager.shutdown (cyclomatic 16): BrokerMetricsManager.shutdown has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5b01f1c227b6c05bd5e8b2488fd352f484990f982f0763ca1af9e20addfe257"}},{"ruleId":"D1","level":"warning","message":{"text":"AckMessageProcessor.appendAck (cyclomatic 16): AckMessageProcessor.appendAck has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"355f97d0f220a337f52473d78c371e9d7063c951c26f0f4a941d4d7528e6d4d5"}},{"ruleId":"D1","level":"warning","message":{"text":"AckMessageProcessor.processRequest (cyclomatic 16): AckMessageProcessor.processRequest has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fe06f07155da31597b136bb5819c5ef17e05ea99380e5668b1266127a10a92a"}},{"ruleId":"D1","level":"warning","message":{"text":"AdminBrokerProcessor.deleteTopicList (cyclomatic 16): AdminBrokerProcessor.deleteTopicList has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":812}}}],"partialFingerprints":{"codehealthFindingId/v1":"a672dd30361de2a2396e25a7e518157383a36cf52d37fd102ed24bba857622db"}},{"ruleId":"D1","level":"warning","message":{"text":"PopBufferMergeService.addAk (cyclomatic 16): PopBufferMergeService.addAk has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"6de8de00ab39e26627cf89603816d5a9248ddef5519257eaa33d26ddaae275ee"}},{"ruleId":"D1","level":"warning","message":{"text":"TopicQueueMappingUtils.checkLogicQueueMappingItemOffset (cyclomatic 16): TopicQueueMappingUtils.checkLogicQueueMappingItemOffset has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"6014a331c5fd0516043ec445707a9feee5dd6bf6d2861e6317820f9f3103535c"}},{"ruleId":"D1","level":"warning","message":{"text":"TopicQueueMappingUtils.checkNameEpochNumConsistence (cyclomatic 16): TopicQueueMappingUtils.checkNameEpochNumConsistence has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"579b56c8ecc3a8006a28cf5db5ba8f650b6f6f9eb233652dff0a82df95ec0433"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsumeRequest.run (cyclomatic 16): ConsumeRequest.run 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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"59ba574f0c63735bb98a2d16e8e36e820a0d9369d2d4dbeed87997cf4f661c29"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMQPushConsumerImpl.processPopResult (cyclomatic 16): DefaultMQPushConsumerImpl.processPopResult has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfb5bb3ba465d193190758ce625805d48fa4e15abbe4b02eda5f9c7cf284a87f"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMQProducerImpl.sendMessageInTransaction (cyclomatic 16): DefaultMQProducerImpl.sendMessageInTransaction has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":1433}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fcd29bc0832c24c2854c7f96cc56f3b4c68075ba4f6930aa90b0a106b494511"}},{"ruleId":"D1","level":"warning","message":{"text":"PolishExpr.reversePolish (cyclomatic 16): PolishExpr.reversePolish has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/filter/impl/PolishExpr.java"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"6776557d3be0d20c5412e59816a33a5e00923d4cfc99312cc142a7ecfeac782a"}},{"ruleId":"D1","level":"warning","message":{"text":"RouteInfoManager.unRegisterBroker (cyclomatic 16): RouteInfoManager.unRegisterBroker has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee30172c9a294a4f33f59e700a1175b197b2bdb360618ddc8070365d1f6cb3ab"}},{"ruleId":"D1","level":"warning","message":{"text":"DLedgerCommitLog.asyncPutMessage (cyclomatic 16): DLedgerCommitLog.asyncPutMessage has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d191a5c75905eea5e6e175b8f799934debd3f6da327b690d42d88cae4e8d202"}},{"ruleId":"D1","level":"warning","message":{"text":"TimerMessageStore.enqueue (cyclomatic 16): TimerMessageStore.enqueue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":754}}}],"partialFingerprints":{"codehealthFindingId/v1":"142a6d94133cae42789bfc8401af97dc70d3332df6fd4153629c564a9cfb1891"}},{"ruleId":"D1","level":"warning","message":{"text":"AllocateMappedFileService.mmapOperation (cyclomatic 16): AllocateMappedFileService.mmapOperation has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"9696916f369953ea7f33dbb27e0ebcdf43fed91caae2ac903009f679de53ec63"}},{"ruleId":"D1","level":"warning","message":{"text":"AllocateMappedFileService.putRequestAndReturnMappedFile (cyclomatic 16): AllocateMappedFileService.putRequestAndReturnMappedFile has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b4a2f86a796484f66f2b5adeca5e9097a8cf3c3071a9aa3316f15fe05f07379"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsumeQueue.estimateMessageCount (cyclomatic 16): ConsumeQueue.estimateMessageCount has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":1176}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce773510e42afe1f5e6368f2bb6eb3693a739b71a95e333967f7d0562acd6c2e"}},{"ruleId":"D1","level":"warning","message":{"text":"StoreStatsService.setPutMessageEntireTimeMax (cyclomatic 16): StoreStatsService.setPutMessageEntireTimeMax 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":"store/src/main/java/org/apache/rocketmq/store/StoreStatsService.java"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e9c49002df40c9cda30a02a8d888cfa09da205952fcf5f0facd3600e23d9b2c"}},{"ruleId":"D1","level":"warning","message":{"text":"TieredStoreMetricsManager.init (cyclomatic 16): TieredStoreMetricsManager.init has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/metrics/TieredStoreMetricsManager.java"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d5cff79d6ce1769d0b8b5cad54a6e6f0b1668715d3ea58ce27edca535fdee2a"}},{"ruleId":"D1","level":"warning","message":{"text":"TieredMessageStore.getMessageAsync (cyclomatic 16): TieredMessageStore.getMessageAsync 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"208fdaa1bc0ba0c1556f45df194ac16bd7149c70e7bd5965d71de938652ee39d"}},{"ruleId":"D1","level":"warning","message":{"text":"7.run (cyclomatic 16): 7.run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":1449}}}],"partialFingerprints":{"codehealthFindingId/v1":"d96dd9dfdb6a2ddcc470b60d8b16e98eda5ab189e777443edf678de3e1eb61aa"}},{"ruleId":"D1","level":"warning","message":{"text":"PrintMessageSubCommand.execute (cyclomatic 16): PrintMessageSubCommand.execute has cyclomatic complexity 16 (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":"tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageSubCommand.java"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2ed5533adc31da2fbacdbd3a7ab038d74a7b164bce01521e66e29eddcabdf05"}},{"ruleId":"D1","level":"warning","message":{"text":"QueryMsgByIdSubCommand.execute (cyclomatic 16): QueryMsgByIdSubCommand.execute has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByIdSubCommand.java"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f0138c87702f8d7c696aebe58befab81529cf62957b4d3da86db3f7feb7c8c0"}},{"ruleId":"D1","level":"warning","message":{"text":"UpdateStaticTopicSubCommand.execute (cyclomatic 16): UpdateStaticTopicSubCommand.execute has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateStaticTopicSubCommand.java"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"968109a02ccb7559157359eeb4f8778e1699194ad3c7bbfa5d79583474eff90d"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMessageStore.getMessage (cognitive 168): DefaultMessageStore.getMessage has cognitive complexity 168 (threshold 15). Drivers by points: if/else 141, loops 13, boolean chains 7, error handling 7 (nesting depth added 128). 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":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b2acf40a468a3c776db51160fa10f675f851a0f86567325a4828c2dfb9025da"}},{"ruleId":"D2","level":"warning","message":{"text":"PopReviveService.consumeReviveMessage (cognitive 132): PopReviveService.consumeReviveMessage has cognitive complexity 132 (threshold 15). Drivers by points: if/else 103, ternaries 11, loops 10, boolean chains 5, error handling 3 (nesting depth added 92). 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fbc91895532bab6b9c25238d200703e29f4bf579bac0aceef45a4273aa698d9"}},{"ruleId":"D2","level":"warning","message":{"text":"MQAdminImpl.queryMessage (cognitive 132): MQAdminImpl.queryMessage has cognitive complexity 132 (threshold 15). Drivers by points: if/else 95, loops 24, boolean chains 9, error handling 4 (nesting depth added 90). 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":"client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"6459c40dc8cc5ad509c40f31e876b1b6c8dd07b3ba5abde1ac4092b0ba228102"}},{"ruleId":"D2","level":"warning","message":{"text":"TransactionalMessageServiceImpl.check (cognitive 126): TransactionalMessageServiceImpl.check has cognitive complexity 126 (threshold 15). Drivers by points: if/else 92, ternaries 15, boolean chains 9, error handling 7, loops 3 (nesting depth added 79). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd2c925a6a373b9fe99ecc13fcdfcc242b9ef80437991e12b121e93a4dae3ae4"}},{"ruleId":"D2","level":"warning","message":{"text":"ComparisonExpression.__compare (cognitive 108): ComparisonExpression.__compare has cognitive complexity 108 (threshold 15). Drivers by points: if/else 98, boolean chains 8, error handling 2 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"d03bfb7bf963a3662ebf97da3b50d3d45d162d148c93b370c04210c51a717950"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQProducerImpl.sendDefaultImpl (cognitive 101): DefaultMQProducerImpl.sendDefaultImpl has cognitive complexity 101 (threshold 15). Drivers by points: if/else 72, error handling 16, ternaries 5, match/switch 4, boolean chains 2, loops 2 (nesting depth added 69). 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":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":738}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ef4179876a1af5ba3e24aac4f451b27f2b36ae6b6b048b5fce4cc0f316c01d7"}},{"ruleId":"D2","level":"warning","message":{"text":"PopBufferMergeService.scan (cognitive 90): PopBufferMergeService.scan has cognitive complexity 90 (threshold 15). Drivers by points: if/else 71, loops 13, boolean chains 6 (nesting depth added 59). 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"835c82f46f3b8f9740f70afba7f2cc5d734e1c29420a7884ba016de147db4836"}},{"ruleId":"D2","level":"warning","message":{"text":"PopMessageProcessor.processRequest (cognitive 90): PopMessageProcessor.processRequest has cognitive complexity 90 (threshold 15). Drivers by points: if/else 66, error handling 11, boolean chains 7, ternaries 4, loops 1, match/switch 1 (nesting depth added 19). 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9ce87f81aeaaa24a811de93cad8d9c0443342889b1f0301c3e70567b0870a8a"}},{"ruleId":"D2","level":"warning","message":{"text":"CompactionLog.getMessage (cognitive 90): CompactionLog.getMessage has cognitive complexity 90 (threshold 15). Drivers by points: if/else 77, loops 11, boolean chains 2 (nesting depth added 67). 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":"store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5335f075ccf72b27458884a1368d2ae48ab71708579422dc83b012f61697503"}},{"ruleId":"D2","level":"warning","message":{"text":"RouteInfoManager.registerBroker (cognitive 82): RouteInfoManager.registerBroker has cognitive complexity 82 (threshold 15). Drivers by points: if/else 55, boolean chains 13, loops 11, ternaries 2, error handling 1 (nesting depth added 39). 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":"namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec6f620fa32c22961e7ad0106635acf87fed72433cbee3d205b7527852b5a119"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeQueue.binarySearchInQueueByTime (cognitive 82): ConsumeQueue.binarySearchInQueueByTime has cognitive complexity 82 (threshold 15). Drivers by points: if/else 50, match/switch 16, loops 13, ternaries 2, boolean chains 1 (nesting depth added 57). 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":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c1954e43a4c91bb3a836df769a4fa7c41fac119f6a0741e341fb2e51c7b25fe"}},{"ruleId":"D2","level":"warning","message":{"text":"PullMessageProcessor.processRequest (cognitive 79): PullMessageProcessor.processRequest has cognitive complexity 79 (threshold 15). Drivers by points: if/else 66, boolean chains 8, error handling 4, match/switch 1 (nesting depth added 30). 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"560d727712ba6aa4bee05ea71f825c7a933490b066488de7d238f46f279437c8"}},{"ruleId":"D2","level":"warning","message":{"text":"CommitLog.recoverAbnormally (cognitive 73): CommitLog.recoverAbnormally has cognitive complexity 73 (threshold 15). Drivers by points: if/else 63, boolean chains 4, loops 4, error handling 2 (nesting depth added 41). 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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":768}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d9d1687121144691cccc13acebe1a61044f573b1e3d99c7a8dd54319c6ad734"}},{"ruleId":"D2","level":"warning","message":{"text":"CommitLog.checkMessageAndReturnSize (cognitive 71): CommitLog.checkMessageAndReturnSize has cognitive complexity 71 (threshold 15). Drivers by points: if/else 57, loops 5, ternaries 4, boolean chains 3, error handling 1, match/switch 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"14e0bc519dadd345cf9ff2fd61af157c8f1cdb2f67391a9088604a2c5cbf3ea9"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultAuthorizationContextBuilder.build (cognitive 70): DefaultAuthorizationContextBuilder.build has cognitive complexity 70 (threshold 15). Drivers by points: if/else 50, loops 17, error handling 2, match/switch 1 (nesting depth added 38). 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":"auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"40c3317fca071d5b6e1c392140e8fd56f1b8aba271d826104aa07988f760105f"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeRequest.run (cognitive 70): ConsumeRequest.run has cognitive complexity 70 (threshold 15). Drivers by points: if/else 58, boolean chains 6, error handling 4, loops 2 (nesting depth added 40). 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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"8daa225f519ebedb7d10e6e1207f97f46fe907771f8702a40b79928da269600e"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerController.shutdownBasicService (cognitive 68): BrokerController.shutdownBasicService has cognitive complexity 68 (threshold 15). Drivers by points: if/else 65, loops 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":1519}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd915ed36e2fec03833f81b52d023c3f01460e1545d3115597b301b2dd3971af"}},{"ruleId":"D2","level":"warning","message":{"text":"RebalanceImpl.updateMessageQueueAssignment (cognitive 68): RebalanceImpl.updateMessageQueueAssignment has cognitive complexity 68 (threshold 15). Drivers by points: if/else 46, error handling 10, loops 7, boolean chains 5 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9373f0a99503cfd36406560ae2582fcbb9367174fe5943514207a32365e946"}},{"ruleId":"D2","level":"warning","message":{"text":"GroupTransferService.doWaitTransfer (cognitive 68): GroupTransferService.doWaitTransfer has cognitive complexity 68 (threshold 15). Drivers by points: if/else 46, loops 15, boolean chains 4, ternaries 3 (nesting depth added 48). 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":"store/src/main/java/org/apache/rocketmq/store/ha/GroupTransferService.java"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"cffd2e9cf998affeea57ebd1e37affa7b6e7a5f4aed34bcded8d386c661a7c35"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerProgressSubCommand.execute (cognitive 65): ConsumerProgressSubCommand.execute has cognitive complexity 65 (threshold 15). Drivers by points: if/else 33, error handling 16, ternaries 11, loops 4, boolean chains 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerProgressSubCommand.java"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8efe5f3ad13089b51e67215fd83363f51dde68f07fbc3b891b918242b9eec71"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientInstance.updateTopicRouteInfoFromNameServer (cognitive 64): MQClientInstance.updateTopicRouteInfoFromNameServer has cognitive complexity 64 (threshold 15). Drivers by points: if/else 40, loops 17, error handling 5, boolean chains 2 (nesting depth added 40). 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":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"addfabb2a670f1d8cd9ff2d590e677d1c7bda7a8749b25f2f58db32740b1372d"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerLagCalculator.processAllGroup (cognitive 61): ConsumerLagCalculator.processAllGroup has cognitive complexity 61 (threshold 15). Drivers by points: if/else 52, boolean chains 6, loops 3 (nesting depth added 36). 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":"broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a05f4047ce8e7c560798d79cc0f6347d6b42edfe449e8e14e78fe83b043b364"}},{"ruleId":"D2","level":"warning","message":{"text":"HAClientReader.processReadResult (cognitive 60): HAClientReader.processReadResult has cognitive complexity 60 (threshold 15). Drivers by points: if/else 46, loops 5, ternaries 4, match/switch 3, boolean chains 1, error handling 1 (nesting depth added 41). 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":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAClient.java"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"89d5b9094b8408bf27f078f9cedb81ef92d1043ab05ef4acc46a85907bfff724"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerMessageStore.checkAndReviseMetrics (cognitive 60): TimerMessageStore.checkAndReviseMetrics has cognitive complexity 60 (threshold 15). Drivers by points: if/else 42, loops 12, ternaries 4, boolean chains 1, error handling 1 (nesting depth added 30). 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":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1291}}}],"partialFingerprints":{"codehealthFindingId/v1":"366f81864b62c96fd5593a7fd9e40d1a2618d8345b9b862a95a8900b02cf8a33"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicQueueMappingCleanService.cleanItemListMoreThanSecondGen (cognitive 59): TopicQueueMappingCleanService.cleanItemListMoreThanSecondGen has cognitive complexity 59 (threshold 15). Drivers by points: if/else 40, loops 11, error handling 6, boolean chains 2 (nesting depth added 32). 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":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdb96b794b1807b16124d51bdda9896f8c5c0b29622e02e5a86ac41daadbe5ac"}},{"ruleId":"D2","level":"warning","message":{"text":"PullTaskImpl.run (cognitive 58): PullTaskImpl.run has cognitive complexity 58 (threshold 15). Drivers by points: if/else 42, error handling 6, boolean chains 5, ternaries 3, match/switch 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java"},"region":{"startLine":890}}}],"partialFingerprints":{"codehealthFindingId/v1":"198f2c783a2d6062255785c4284fe54116bc71948e40bca51d4d4b6278239596"}},{"ruleId":"D2","level":"warning","message":{"text":"ClusterListSubCommand.printClusterBaseInfo (cognitive 57): ClusterListSubCommand.printClusterBaseInfo has cognitive complexity 57 (threshold 15). Drivers by points: if/else 37, error handling 10, loops 7, boolean chains 3 (nesting depth added 41). 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":"tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9109c3d3287df65f8b1b5557ccfbc0256ffb0b04ffc9b62988d7dc70da3a874"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQAdminExtImpl.messageTrackDetail (cognitive 56): DefaultMQAdminExtImpl.messageTrackDetail has cognitive complexity 56 (threshold 15). Drivers by points: if/else 35, error handling 13, loops 5, match/switch 2, boolean chains 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":1350}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a7e56ca651e5f67e9f3012cb0c9a03cdd0bb02a8e7a64827da837edf4864451"}},{"ruleId":"D2","level":"warning","message":{"text":"RemotingHelper.invokeSync (cognitive 55): RemotingHelper.invokeSync has cognitive complexity 55 (threshold 15). Drivers by points: if/else 45, loops 6, error handling 4 (nesting depth added 34). 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":"remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ce2d563b2c2ece49b853c4b2c501c5f56ac17668f59f6c34679b2bf3e60b8d4"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQProducerImpl.sendKernelImpl (cognitive 55): DefaultMQProducerImpl.sendKernelImpl has cognitive complexity 55 (threshold 15). Drivers by points: if/else 49, boolean chains 2, error handling 2, match/switch 2 (nesting depth added 31). 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":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0263ddf9ce363c20f50397be8492073ead6ab1a5f1a4088e3a75db243388f74"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerDequeueGetMessageService.run (cognitive 54): TimerDequeueGetMessageService.run has cognitive complexity 54 (threshold 15). Drivers by points: if/else 35, loops 9, boolean chains 5, error handling 5 (nesting depth added 32). 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":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1705}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aef6c020eb8338a066bafb4b769ba1b60e894e0521667db6f3c7b23fe1ff162"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicQueueMappingCleanService.cleanItemExpired (cognitive 53): TopicQueueMappingCleanService.cleanItemExpired has cognitive complexity 53 (threshold 15). Drivers by points: if/else 38, loops 7, error handling 6, boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e5e15ef9d67ea62d886d691b8b7a107588c934d47a1d3e1dbbebbab869eb454"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeQueue.correctMinOffset (cognitive 53): ConsumeQueue.correctMinOffset has cognitive complexity 53 (threshold 15). Drivers by points: if/else 44, loops 4, boolean chains 3, error handling 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"389b45dd1da2f00119d4f6f8d0790f31f1b40a0ba98501839d24512ea33f03b3"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeQueue.truncateDirtyLogicFiles (cognitive 53): ConsumeQueue.truncateDirtyLogicFiles has cognitive complexity 53 (threshold 15). Drivers by points: if/else 48, loops 4, boolean chains 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"df4901b648e37d2f4e1055856e0acf051cdeb8319f434c024fe094fba7301bfb"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientAPIImpl.processPopResponse (cognitive 52): MQClientAPIImpl.processPopResponse has cognitive complexity 52 (threshold 15). Drivers by points: if/else 47, boolean chains 3, loops 1, match/switch 1 (nesting depth added 34). 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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1113}}}],"partialFingerprints":{"codehealthFindingId/v1":"e85f2d083835dc5aedfb51bb7dbd06813c70112631419c5183ca5e625bd683e9"}},{"ruleId":"D2","level":"warning","message":{"text":"PullMessageProcessor.rewriteResponseForStaticTopic (cognitive 51): PullMessageProcessor.rewriteResponseForStaticTopic has cognitive complexity 51 (threshold 15). Drivers by points: if/else 48, boolean chains 2, error handling 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3e3645429751be48e89e9df35989705ff023cc6d74f3a5e071eeb06c728af0e"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractWriteSocketService.run (cognitive 51): AbstractWriteSocketService.run has cognitive complexity 51 (threshold 15). Drivers by points: if/else 45, error handling 3, match/switch 2, loops 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAConnection.java"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"659e7556efd015ce00dad64001027d9ff8225f466ac1ab7d57638d0b6eba8b09"}},{"ruleId":"D2","level":"warning","message":{"text":"RocksDBConsumeQueueTable.binarySearchInCQByTime (cognitive 50): RocksDBConsumeQueueTable.binarySearchInCQByTime has cognitive complexity 50 (threshold 15). Drivers by points: if/else 33, match/switch 10, loops 7 (nesting depth added 27). 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":"store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueTable.java"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ebcae95845c3cd1f8dcddabaa6651e404881e7d04dd0c836012eee5a9190bb4"}},{"ruleId":"D2","level":"warning","message":{"text":"ProducerManager.doChannelCloseEvent (cognitive 49): ProducerManager.doChannelCloseEvent has cognitive complexity 49 (threshold 15). Drivers by points: if/else 41, loops 5, boolean chains 3 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/ProducerManager.java"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"748e360a281d6dbe1460883b26e05bf475ec3c2d891098ae0325b93ade3a6e22"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageRocksDBStorage.queryOffsetForIndex (cognitive 49): MessageRocksDBStorage.queryOffsetForIndex has cognitive complexity 49 (threshold 15). Drivers by points: if/else 30, boolean chains 11, error handling 5, loops 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"27f802d76bd6eb0b9569fde1ff806ee3ec7fb181c7eb21acb7532e43aaf97dab"}},{"ruleId":"D2","level":"warning","message":{"text":"PullRequestHoldService.notifyMessageArriving (cognitive 48): PullRequestHoldService.notifyMessageArriving has cognitive complexity 48 (threshold 15). Drivers by points: if/else 28, error handling 16, loops 3, boolean chains 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/longpolling/PullRequestHoldService.java"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"841a45f55c5b819c2207e0f5f17061ad06c358626f929eda303c7628917bcd77"}},{"ruleId":"D2","level":"warning","message":{"text":"RouteInfoManager.pickupTopicRouteData (cognitive 48): RouteInfoManager.pickupTopicRouteData has cognitive complexity 48 (threshold 15). Drivers by points: if/else 31, loops 12, boolean chains 4, error handling 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java"},"region":{"startLine":700}}}],"partialFingerprints":{"codehealthFindingId/v1":"4414c6473ce74dccc4ea328b6357265356e9948ca04ff3e17d62ee51796f79eb"}},{"ruleId":"D2","level":"warning","message":{"text":"PopLiteLongPollingService.run (cognitive 47): PopLiteLongPollingService.run has cognitive complexity 47 (threshold 15). Drivers by points: if/else 34, loops 9, error handling 3, boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f7d9079d10cf25d2840169e88b8c03c3da72423fef923f966649dc93b9fb09c"}},{"ruleId":"D2","level":"warning","message":{"text":"PopLongPollingService.run (cognitive 47): PopLongPollingService.run has cognitive complexity 47 (threshold 15). Drivers by points: if/else 34, loops 9, error handling 3, boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"277c07c36348a856141e9250418e965906747efb54d24526abc6fd1d4da2d195"}},{"ruleId":"D2","level":"warning","message":{"text":"PolishExpr.participle (cognitive 47): PolishExpr.participle has cognitive complexity 47 (threshold 15). Drivers by points: if/else 37, boolean chains 9, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/filter/impl/PolishExpr.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3232ce67714fa1595c3e4f7233f78c6522188047ee2e3fff3acb90be491dce6"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerController.startBasicService (cognitive 46): BrokerController.startBasicService has cognitive complexity 46 (threshold 15). Drivers by points: if/else 42, boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":1827}}}],"partialFingerprints":{"codehealthFindingId/v1":"545500d911bc5839d50cc9e12e2c982d7d022e3d8e27ac3cefcf7f570e65b95a"}},{"ruleId":"D2","level":"warning","message":{"text":"PullAPIWrapper.processPullResult (cognitive 46): PullAPIWrapper.processPullResult has cognitive complexity 46 (threshold 15). Drivers by points: if/else 30, loops 10, boolean chains 3, error handling 3 (nesting depth added 27). 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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/PullAPIWrapper.java"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"852022e362b09f5a3b58ac0203b00f394d55de42707c95cdb3210f05fb3b4b88"}},{"ruleId":"D2","level":"warning","message":{"text":"IndexRocksDBStore.buildIndex (cognitive 46): IndexRocksDBStore.buildIndex has cognitive complexity 46 (threshold 15). Drivers by points: if/else 22, loops 11, error handling 9, boolean chains 3, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/index/rocksdb/IndexRocksDBStore.java"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"54c3e6da70a5cdf9a51205599cae239c8c82a9481860bbd277a56c7abccf2a92"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractSendMessageProcessor.consumerSendMsgBack (cognitive 45): AbstractSendMessageProcessor.consumerSendMsgBack has cognitive complexity 45 (threshold 15). Drivers by points: if/else 34, ternaries 5, boolean chains 2, error handling 2, match/switch 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"532876505f2674c7406c307858268a3458f813733b67aac3c908a611c15bd95e"}},{"ruleId":"D2","level":"warning","message":{"text":"PopMessageProcessor.popMsgFromQueue (cognitive 45): PopMessageProcessor.popMsgFromQueue has cognitive complexity 45 (threshold 15). Drivers by points: if/else 24, error handling 12, boolean chains 5, loops 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java"},"region":{"startLine":677}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2ee031fdf73910c9e71e41394136db07e07194193885bf1cfd6854e359e4922"}},{"ruleId":"D2","level":"warning","message":{"text":"RemotingCommand.decodeCommandCustomHeaderDirectly (cognitive 45): RemotingCommand.decodeCommandCustomHeaderDirectly has cognitive complexity 45 (threshold 15). Drivers by points: if/else 32, error handling 6, boolean chains 5, loops 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba83e51cb0558cb995314d2dc2be570784c6002391ea7dec63111e4351edd546"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQPushConsumerImpl.processPopResult (cognitive 45): DefaultMQPushConsumerImpl.processPopResult has cognitive complexity 45 (threshold 15). Drivers by points: if/else 27, loops 12, error handling 5, boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a209d9f55b307ac5e3046697ffa60953264a308106ccd23803d54eca5952ef4"}},{"ruleId":"D2","level":"warning","message":{"text":"UtilAll.getIP (cognitive 45): UtilAll.getIP has cognitive complexity 45 (threshold 15). Drivers by points: if/else 40, loops 3, boolean chains 1, error handling 1 (nesting depth added 30). 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":"common/src/main/java/org/apache/rocketmq/common/UtilAll.java"},"region":{"startLine":597}}}],"partialFingerprints":{"codehealthFindingId/v1":"e36203bc64a9df22816fa7d32468fd6322829b3e53ade5d5dc2682a4b6cdc656"}},{"ruleId":"D2","level":"warning","message":{"text":"3.run (cognitive 45): 3.run has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20, error handling 17, loops 7, boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/benchmark/Producer.java"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d9b02dbdd08ff9cb844227b7b5f09e492e69769173470bccce7800a372327c0"}},{"ruleId":"D2","level":"warning","message":{"text":"SubscriptionFilterHandler.register (cognitive 44): SubscriptionFilterHandler.register has cognitive complexity 44 (threshold 15). Drivers by points: if/else 37, boolean chains 7 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"f784233ab087da9befa4505b90ed2146d8f6f60151157bcacebc8e06dcfd02b0"}},{"ruleId":"D2","level":"warning","message":{"text":"WriteSocketService.run (cognitive 44): WriteSocketService.run has cognitive complexity 44 (threshold 15). Drivers by points: if/else 40, error handling 3, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAConnection.java"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"6433014466639aecfc83877d9f71f90032c02c577863d2a3f8ed0582c3d85b8a"}},{"ruleId":"D2","level":"warning","message":{"text":"ReputMessageService.doReput (cognitive 44): ReputMessageService.doReput has cognitive complexity 44 (threshold 15). Drivers by points: if/else 32, boolean chains 4, loops 3, ternaries 3, error handling 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":2711}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b22cf0233a773717a717eb3e9ecf2077fdb71eb3117ab54705072b9829cf9c2"}},{"ruleId":"D2","level":"warning","message":{"text":"UpdateTopicPermSubCommand.execute (cognitive 44): UpdateTopicPermSubCommand.execute has cognitive complexity 44 (threshold 15). Drivers by points: if/else 28, loops 11, boolean chains 4, error handling 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"38259ae8f5d5d8d0ac8a5899af531b74e0e821d6f8d579937da16cd1c04e03e1"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientInstance.topicRouteData2TopicPublishInfo (cognitive 43): MQClientInstance.topicRouteData2TopicPublishInfo has cognitive complexity 43 (threshold 15). Drivers by points: if/else 23, loops 18, boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a2c0802f3fccc1e41a94f58b307a94e97596a812e9f14d3ef72fb281b6d6953"}},{"ruleId":"D2","level":"warning","message":{"text":"Producer.main (cognitive 43): Producer.main has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 20, if/else 12, boolean chains 7, error handling 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/benchmark/Producer.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee7a835c1b1bd45140f156cbc7630d648982d6f6f88e383726b9e613538a5c2c"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerDequeuePutMessageService.run (cognitive 43): TimerDequeuePutMessageService.run has cognitive complexity 43 (threshold 15). Drivers by points: if/else 29, loops 6, error handling 5, boolean chains 3 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1609}}}],"partialFingerprints":{"codehealthFindingId/v1":"a09b5a5c44f3ccca8a9fb8736b0e3f33d708441c98e0b1134df9970e0893583a"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerFilterManager.decode (cognitive 42): ConsumerFilterManager.decode has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22, loops 10, ternaries 5, error handling 4, boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eed7985869b8330ccb8efa8793d28d2d04d45cad3dc180d22d93a2f398d8972"}},{"ruleId":"D2","level":"warning","message":{"text":"PopConsumerService.popAsync (cognitive 42): PopConsumerService.popAsync has cognitive complexity 42 (threshold 15). Drivers by points: if/else 26, boolean chains 9, ternaries 4, loops 2, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"e45ea4fe88067dc188d369e72f08c1cdc698be5b4f891f8c41fcdd3efefd2cf4"}},{"ruleId":"D2","level":"warning","message":{"text":"DLedgerCommitLog.dledgerRecoverAbnormally (cognitive 42): DLedgerCommitLog.dledgerRecoverAbnormally has cognitive complexity 42 (threshold 15). Drivers by points: if/else 38, loops 4 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"5335c26532ba19abd7e0cbf81093ea0f861484f91ffa233550be4023135053de"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQPushConsumerImpl.pullMessage (cognitive 41): DefaultMQPushConsumerImpl.pullMessage has cognitive complexity 41 (threshold 15). Drivers by points: if/else 34, error handling 6, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"1547b0e145430965006fd5eeaca503fe2a5162e8e0ef01df9c919ba3f9270bc2"}},{"ruleId":"D2","level":"warning","message":{"text":"CommitLog.asyncPutMessage (cognitive 41): CommitLog.asyncPutMessage has cognitive complexity 41 (threshold 15). Drivers by points: if/else 33, boolean chains 6, error handling 1, match/switch 1 (nesting depth added 8). 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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":999}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a95dff2a3983c7ebd86547e2011145d7b8c9e10bda9aba419c4caede5adbd20"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageStoreDispatcherImpl.doScheduleDispatch (cognitive 41): MessageStoreDispatcherImpl.doScheduleDispatch has cognitive complexity 41 (threshold 15). Drivers by points: if/else 34, boolean chains 5, error handling 1, loops 1 (nesting depth added 6). 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreDispatcherImpl.java"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"93312fa633d6a95caa760b0ff58a4738e5abafc88c15122f2ff6537bdc74433c"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerManager.doChannelCloseEvent (cognitive 39): ConsumerManager.doChannelCloseEvent has cognitive complexity 39 (threshold 15). Drivers by points: if/else 33, boolean chains 3, loops 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"620e667ded1efced317f9d916bd4f436bd705663c789c68608d630dc947267e7"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQPushConsumerImpl.checkConfig (cognitive 39): DefaultMQPushConsumerImpl.checkConfig has cognitive complexity 39 (threshold 15). Drivers by points: if/else 26, boolean chains 13 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java"},"region":{"startLine":1025}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d45daf4b4e768256441e15205765727d54e87aa6af3a3d0069faf6cf2bb2f08"}},{"ruleId":"D2","level":"warning","message":{"text":"RebalancePushImpl.computePullFromWhereWithException (cognitive 39): RebalancePushImpl.computePullFromWhereWithException has cognitive complexity 39 (threshold 15). Drivers by points: if/else 23, error handling 15, match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalancePushImpl.java"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"281a75443ac26010e37ff7c875bbf3bf893e364038f5ca7776af7b9cf0847427"}},{"ruleId":"D2","level":"warning","message":{"text":"MappedFileQueue.getConsumeQueueMappedFileByTime (cognitive 39): MappedFileQueue.getConsumeQueueMappedFileByTime has cognitive complexity 39 (threshold 15). Drivers by points: if/else 32, loops 5, boolean chains 1, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"150038e1e5463c39c24b5c8a5067e2f9384ec7412229f9c575c452bed239db51"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerMetricsManager.shutdown (cognitive 38): BrokerMetricsManager.shutdown has cognitive complexity 38 (threshold 15). Drivers by points: loops 24, if/else 14 (nesting depth added 22). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"de86d5817dd80e57e12d2cdc9e76fdd63de56eeae2271454de18b6b6689b7079"}},{"ruleId":"D2","level":"warning","message":{"text":"AdminBrokerProcessor.fetchAllConsumeStatsInBroker (cognitive 38): AdminBrokerProcessor.fetchAllConsumeStatsInBroker has cognitive complexity 38 (threshold 15). Drivers by points: if/else 26, loops 6, error handling 4, boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":2708}}}],"partialFingerprints":{"codehealthFindingId/v1":"05991bf3ae4315dfdc8b74e42847ff5f1493c3b1c995fcf526a16e76362ace80"}},{"ruleId":"D2","level":"warning","message":{"text":"RebalanceLitePullImpl.computePullFromWhereWithException (cognitive 38): RebalanceLitePullImpl.computePullFromWhereWithException has cognitive complexity 38 (threshold 15). Drivers by points: if/else 22, error handling 15, match/switch 1 (nesting depth added 21). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceLitePullImpl.java"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ea3fa523cb07de7f1b1ee24fba8940de8b8b24dce0690b6487e3be8ced5251d"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQAdminExtImpl.examineConsumeStats (cognitive 38): DefaultMQAdminExtImpl.examineConsumeStats has cognitive complexity 38 (threshold 15). Drivers by points: if/else 22, loops 9, error handling 4, boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"25f00c154466816bad85bf44a4a0ba072a8251362575d06615dc278a08376232"}},{"ruleId":"D2","level":"warning","message":{"text":"StatsAllSubCommand.printTopicDetail (cognitive 38): StatsAllSubCommand.printTopicDetail has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18, error handling 11, loops 6, boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/stats/StatsAllSubCommand.java"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f4194a5f5ef943a461e3cef89f9e270738eacc5b3b8545ddf87152aca76f775"}},{"ruleId":"D2","level":"warning","message":{"text":"PolishExpr.reversePolish (cognitive 37): PolishExpr.reversePolish has cognitive complexity 37 (threshold 15). Drivers by points: if/else 26, loops 7, boolean chains 4 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/filter/impl/PolishExpr.java"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"256198e8b31660b3dc887c9047affd6a81c92ce39abbe665c402b331a397f181"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalMessageService.popMessage (cognitive 37): LocalMessageService.popMessage has cognitive complexity 37 (threshold 15). Drivers by points: if/else 29, loops 4, boolean chains 2, error handling 1, match/switch 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"bee62a35b0354c1a8422bd0459857c91edb212b8b21af5bf617c8095d1599369"}},{"ruleId":"D2","level":"warning","message":{"text":"CommitLog.recoverNormally (cognitive 37): CommitLog.recoverNormally has cognitive complexity 37 (threshold 15). Drivers by points: if/else 30, loops 4, boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9b9ddb694329dd752e3f5678078d9299e50d77fa57c8116591a04abf7194146"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeQueue.estimateMessageCount (cognitive 37): ConsumeQueue.estimateMessageCount has cognitive complexity 37 (threshold 15). Drivers by points: if/else 32, loops 4, boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":1176}}}],"partialFingerprints":{"codehealthFindingId/v1":"9813bcee14226da6aa617828f73986217fa59231a6a13e96f779e84414e1ae4f"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMessageStore.shutdown (cognitive 37): DefaultMessageStore.shutdown has cognitive complexity 37 (threshold 15). Drivers by points: if/else 30, error handling 6, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"75b75373d5d5c5b099cf754483e7a1f0543b88f983673620ff2eee63c9459440"}},{"ruleId":"D2","level":"warning","message":{"text":"ClusterSendMsgRTCommand.execute (cognitive 37): ClusterSendMsgRTCommand.execute has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16, loops 10, error handling 6, ternaries 4, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterSendMsgRTCommand.java"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"da1d899be1836092a9e6c7a172bec7e1e8904722f7a5d836860c25aa75d67ca9"}},{"ruleId":"D2","level":"warning","message":{"text":"AdminBrokerProcessor.lockBatchMQ (cognitive 36): AdminBrokerProcessor.lockBatchMQ has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16, loops 10, error handling 9, boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1509}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba9324affb3f4876b0c14135f1fb5bcca645c17a8d734fbf0be75eb8987e3f42"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageUtils.deleteProperty (cognitive 36): MessageUtils.deleteProperty has cognitive complexity 36 (threshold 15). Drivers by points: if/else 27, loops 7, boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/utils/MessageUtils.java"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"c14d4ce05d4fabb6e8dbef906076781a7583e6c8f89bdd3b8d0776bb5be86425"}},{"ruleId":"D2","level":"warning","message":{"text":"IndexService.buildIndex (cognitive 36): IndexService.buildIndex has cognitive complexity 36 (threshold 15). Drivers by points: if/else 29, loops 3, boolean chains 2, match/switch 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/index/IndexService.java"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e5da927a7364fd360ad4f9e1614ed930b5414a27497b1abaad435c4ff2cde8e"}},{"ruleId":"D2","level":"warning","message":{"text":"CombineConsumeQueueStore.verifyAndInitOffsetForAllStore (cognitive 36): CombineConsumeQueueStore.verifyAndInitOffsetForAllStore has cognitive complexity 36 (threshold 15). Drivers by points: if/else 26, loops 6, boolean chains 4 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/CombineConsumeQueueStore.java"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ba6c4c0b1971ed8c15537d6c5fd38030ed49b71c260ebb2c34a0c8aaaa17191"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerMessageStore.dequeue (cognitive 36): TimerMessageStore.dequeue has cognitive complexity 36 (threshold 15). Drivers by points: if/else 22, loops 8, boolean chains 3, error handling 3 (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":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1018}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c2a3532968427f0182e7eebf48248a26d5b3bc51dd94e696550c816fd386a13"}},{"ruleId":"D2","level":"warning","message":{"text":"QueryMsgByIdSubCommand.execute (cognitive 36): QueryMsgByIdSubCommand.execute has cognitive complexity 36 (threshold 15). Drivers by points: if/else 24, loops 9, boolean chains 1, error handling 1, ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByIdSubCommand.java"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b2da684b698e26d53258d373c12b666428fdc77e67d645a1d08a7c27fcf941e"}},{"ruleId":"D2","level":"warning","message":{"text":"SendMessageProcessor.sendMessage (cognitive 35): SendMessageProcessor.sendMessage has cognitive complexity 35 (threshold 15). Drivers by points: if/else 28, boolean chains 6, ternaries 1 (nesting depth added 6). 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e095d9b876929a096d7917d7599683d32c57adc8788c5309ac52cbaa17b9dcb"}},{"ruleId":"D2","level":"warning","message":{"text":"NettyRemotingClient.updateNameServerAddressList (cognitive 35): NettyRemotingClient.updateNameServerAddressList has cognitive complexity 35 (threshold 15). Drivers by points: if/else 26, loops 8, boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff06e75c6d90d2397aea49d295480c0a593745e02cb5dbe2376441c70b4ab0f4"}},{"ruleId":"D2","level":"warning","message":{"text":"BatchConsumeQueue.estimateMessageCount (cognitive 35): BatchConsumeQueue.estimateMessageCount has cognitive complexity 35 (threshold 15). Drivers by points: if/else 30, loops 4, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":1102}}}],"partialFingerprints":{"codehealthFindingId/v1":"e782a2a1b4dca2aad998a5cc130681617886c2cff0e5636d74839c64ebb5f3b2"}},{"ruleId":"D2","level":"warning","message":{"text":"MappedFileQueue.deleteExpiredFileByTime (cognitive 35): MappedFileQueue.deleteExpiredFileByTime has cognitive complexity 35 (threshold 15). Drivers by points: if/else 25, error handling 6, boolean chains 2, loops 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"96d9ec702b3c5e3cc8f0c7aae1d15321e6ce96d95c1643203454b25f4e49454e"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerStatusSubCommand.execute (cognitive 35): ConsumerStatusSubCommand.execute has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19, loops 6, ternaries 5, error handling 4, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerStatusSubCommand.java"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4ca30ab6ade415d2b15f77fa56aad93a7fe0cd47dbf7947c81827132c16264c"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerLagCalculator.calculateMessageCount (cognitive 34): ConsumerLagCalculator.calculateMessageCount has cognitive complexity 34 (threshold 15). Drivers by points: if/else 21, error handling 6, loops 4, boolean chains 2, ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e8c55bfad9bcbad960c7307c2fca5b029d7c511803717aca7e3f846a4593445"}},{"ruleId":"D2","level":"warning","message":{"text":"TlsHelper.buildSslContext (cognitive 34): TlsHelper.buildSslContext has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 18, if/else 16 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/TlsHelper.java"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"316054701a05fdc12df9240e8686cc567db71512e7b8e03b56389b72aa64f800"}},{"ruleId":"D2","level":"warning","message":{"text":"CommitLog.asyncPutMessages (cognitive 34): CommitLog.asyncPutMessages has cognitive complexity 34 (threshold 15). Drivers by points: if/else 27, boolean chains 5, error handling 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1172}}}],"partialFingerprints":{"codehealthFindingId/v1":"83fabfd2a01239ae4a8ff7c5c5924039678f437e9e294eeebfd2c2aa50dc3542"}},{"ruleId":"D2","level":"warning","message":{"text":"7.run (cognitive 34): 7.run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 21, error handling 8, loops 3, boolean chains 1, match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":1449}}}],"partialFingerprints":{"codehealthFindingId/v1":"217aa9415a0aec6fe00adce809465e1a239662bafaf6ab8569d412abdef9a70f"}},{"ruleId":"D2","level":"warning","message":{"text":"ExportMetadataCommand.execute (cognitive 34): ExportMetadataCommand.execute has cognitive complexity 34 (threshold 15). Drivers by points: if/else 21, loops 11, error handling 1, ternaries 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetadataCommand.java"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6faf1ee149a7461cd18745edf83f2580b4d803a038e2e14df76bf843f9fa3f6"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerMetricsManager.init (cognitive 33): BrokerMetricsManager.init has cognitive complexity 33 (threshold 15). Drivers by points: if/else 24, loops 5, boolean chains 2, ternaries 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa93f9ace9292a3ba7a7cb69e18a2ee58122a7bdeed4c16a894e8307841c5f33"}},{"ruleId":"D2","level":"warning","message":{"text":"AckMessageProcessor.processRequest (cognitive 33): AckMessageProcessor.processRequest has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, boolean chains 3, loops 3, error handling 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f7c2342d068d72450d1c7ddc31a393e82293d5c6db155f5fef4ec4171ea2696"}},{"ruleId":"D2","level":"warning","message":{"text":"PeekMessageProcessor.processRequest (cognitive 33): PeekMessageProcessor.processRequest has cognitive complexity 33 (threshold 15). Drivers by points: if/else 20, loops 8, error handling 3, boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"c78651c2516c675fdc2d4e974a8cfd84d40537f8dc4626a1a5ded2fe2392afec"}},{"ruleId":"D2","level":"warning","message":{"text":"RouteInfoManager.unRegisterBroker (cognitive 33): RouteInfoManager.unRegisterBroker has cognitive complexity 33 (threshold 15). Drivers by points: if/else 20, ternaries 9, boolean chains 2, error handling 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"e68d1ba994ad173d5a6920f886fe9479a20492cd36b927835c22e8cc0efaf50d"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerMessageStore.shutdown (cognitive 33): TimerMessageStore.shutdown has cognitive complexity 33 (threshold 15). Drivers by points: if/else 27, loops 4, error handling 2 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"304baa3ca07a1c298fad876d9e2db7b1e7a64d6d6a571fb419c0334bd5f46c19"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerMessageStore.warmDequeue (cognitive 33): TimerMessageStore.warmDequeue has cognitive complexity 33 (threshold 15). Drivers by points: if/else 24, loops 5, boolean chains 2, error handling 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"f29705188890c50751827e61cfdacc32669e340760716cd533948b8c699ee254"}},{"ruleId":"D2","level":"warning","message":{"text":"CleanCommitLogService.isSpaceToDelete (cognitive 33): CleanCommitLogService.isSpaceToDelete has cognitive complexity 33 (threshold 15). Drivers by points: if/else 30, boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":2428}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8564efa840fa1d617c868457161b169c52df398dc862bffb69dd57e3017c288"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerSubCommand.execute (cognitive 33): ConsumerSubCommand.execute has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18, loops 6, error handling 4, ternaries 4, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerSubCommand.java"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"965ec04f07b21af7e982f1a9c8b91a1d15bad77e820c249039ead70a2c15085c"}},{"ruleId":"D2","level":"warning","message":{"text":"EndTransactionProcessor.processRequest (cognitive 32): EndTransactionProcessor.processRequest has cognitive complexity 32 (threshold 15). Drivers by points: if/else 28, match/switch 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdbf5710189ea50df54b84b06d820d96a21bf4b84c34fbc7f6a9c99a7699d34c"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerContainerProcessor.addBroker (cognitive 32): BrokerContainerProcessor.addBroker has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18, error handling 5, loops 4, match/switch 3, boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e8fb4fea6fc06c911afccfdf078635b161475acbcd734263cf55c9a54be6684"}},{"ruleId":"D2","level":"warning","message":{"text":"BatchConsumeQueue.truncateDirtyLogicFiles (cognitive 32): BatchConsumeQueue.truncateDirtyLogicFiles has cognitive complexity 32 (threshold 15). Drivers by points: if/else 27, loops 4, boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3692a822553f7244d604e78ae9ae375260db09022f9e99a82c8086660baf05e"}},{"ruleId":"D2","level":"warning","message":{"text":"Broker2Client.resetOffset (cognitive 31): Broker2Client.resetOffset has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19, error handling 7, loops 3, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/net/Broker2Client.java"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f3d0bc19fd299053f29db96ad2e536eea1961d13769fb6e479ec6e96ec9d662"}},{"ruleId":"D2","level":"warning","message":{"text":"NotificationProcessor.processRequest (cognitive 31): NotificationProcessor.processRequest has cognitive complexity 31 (threshold 15). Drivers by points: if/else 26, boolean chains 3, error handling 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"61625c14bf2194bf00b2352f8452a0060d493080fbc5c0290d1dd9b34fdd4f1d"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerController.\u003Cinit\u003E (cognitive 31): BrokerController.\u003Cinit\u003E has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 19, if/else 8, boolean chains 4 (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":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"127d42dc2beaa5f532f1cf70bd7b3980ad96071ac4a42df6e1818d801cc0069a"}},{"ruleId":"D2","level":"warning","message":{"text":"MQAdminImpl.createTopic (cognitive 31): MQAdminImpl.createTopic has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17, error handling 6, loops 6, boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"1efb002066b4fb66c50d0ee4f616bd7e720e3dea2da3ee21c6997b9b6976a5ae"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultConsumerIdsChangeListener.handle (cognitive 30): DefaultConsumerIdsChangeListener.handle has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21, loops 4, boolean chains 3, match/switch 1, ternaries 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/DefaultConsumerIdsChangeListener.java"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"b660b817acf632d387c9ca53585589593b1419df83b3847c26f3ce8fa3234ec6"}},{"ruleId":"D2","level":"warning","message":{"text":"AckMessageProcessor.appendAck (cognitive 30): AckMessageProcessor.appendAck has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23, boolean chains 3, error handling 2, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"95d41c7856f5edcdcd5c3322d75570363c1c5c4773e34043f86059a0142492ff"}},{"ruleId":"D2","level":"warning","message":{"text":"NetworkUtil.getLocalInetAddressList (cognitive 30): NetworkUtil.getLocalInetAddressList has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, loops 3, boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/utils/NetworkUtil.java"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dcbdc1b51ef4e589c6d72c595597a8e4de4876f1aeffd21e1943985902c3802"}},{"ruleId":"D2","level":"warning","message":{"text":"ControllerMetricsManager.init (cognitive 30): ControllerMetricsManager.init has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21, loops 5, boolean chains 2, ternaries 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/metrics/ControllerMetricsManager.java"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d1debfc7834cb9f408f6c1a731147b6cdc90690f587ab252b09be878e4f8b6d"}},{"ruleId":"D2","level":"warning","message":{"text":"ProxyMetricsManager.start (cognitive 30): ProxyMetricsManager.start has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21, loops 5, boolean chains 2, ternaries 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/metrics/ProxyMetricsManager.java"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"7109ae6a1f239a634c71acf030d81aa5946b8c1178d63c9482997e2f35777823"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractWriteSocketService.transferToSlave (cognitive 30): AbstractWriteSocketService.transferToSlave has cognitive complexity 30 (threshold 15). Drivers by points: if/else 29, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAConnection.java"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"3354fe63f22ad6f3f602e5ab3dbc1bd93384da6105333c7865fba7a010b86732"}},{"ruleId":"D2","level":"warning","message":{"text":"BatchConsumeQueue.binarySearchRight (cognitive 30): BatchConsumeQueue.binarySearchRight has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, match/switch 4, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":878}}}],"partialFingerprints":{"codehealthFindingId/v1":"3781f3babbe15476f22506704f5e126a1c6668a39766904e521684311e6faf12"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeQueue.recover (cognitive 30): ConsumeQueue.recover has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24, loops 5, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"83dcb70a38fa31bb7cb805d32375d07f2eb82d566e3d26bfec13873d575df370"}},{"ruleId":"D2","level":"warning","message":{"text":"ClientMetadata.topicRouteData2EndpointsForStaticTopic (cognitive 29): ClientMetadata.topicRouteData2EndpointsForStaticTopic has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17, loops 9, boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/rpc/ClientMetadata.java"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3e417ebf4558a309e766200cb93467454661e0113fa9852ec43214842b32da5"}},{"ruleId":"D2","level":"warning","message":{"text":"MixAll.properties2Object (cognitive 29): MixAll.properties2Object has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20, boolean chains 5, error handling 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/MixAll.java"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"97c10a3c942d90d0290ff8fb05c4d686183407a0feb4063bd3e6534e771ec38f"}},{"ruleId":"D2","level":"warning","message":{"text":"1.run (cognitive 29): 1.run has cognitive complexity 29 (threshold 15). Drivers by points: error handling 15, if/else 6, loops 3, match/switch 3, boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/simple/PullConsumer.java"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"799c5e32f7b5d45afce0ad228b9797b288c472ad3736bf94c02abeb95697843c"}},{"ruleId":"D2","level":"warning","message":{"text":"IndexFile.selectPhyOffset (cognitive 29): IndexFile.selectPhyOffset has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20, boolean chains 4, loops 3, error handling 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1e3c445e38cc097ec7626edf30e5ff1269f63f35290f381b8ebf27e50c2f550"}},{"ruleId":"D2","level":"warning","message":{"text":"CompactionStore.load (cognitive 29): CompactionStore.load has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18, loops 6, error handling 5 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/kv/CompactionStore.java"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"d57336c85af9b27bd6355ff494eaa4a7fce8c9655340f57f6a51f6ea7ea9fe51"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerMessageStore.enqueue (cognitive 29): TimerMessageStore.enqueue has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, loops 4, error handling 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":754}}}],"partialFingerprints":{"codehealthFindingId/v1":"07d1a429bc8af62da45db906c4c4eb5e69c8bd74a3898b24b811a511c4848eb2"}},{"ruleId":"D2","level":"warning","message":{"text":"ConcurrentReputMessageService.doReput (cognitive 29): ConcurrentReputMessageService.doReput has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19, loops 5, error handling 3, boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":3005}}}],"partialFingerprints":{"codehealthFindingId/v1":"05037acccfe3861aaae1b17e19a2794ceeb6f1f75677f0c0cc1771ab6fe7d4b6"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerConsumeStatsSubCommand.execute (cognitive 29): BrokerConsumeStatsSubCommand.execute has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13, loops 10, error handling 6 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommand.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"16a2ceeb56bd3b4fb93ed4aae8683cd27f4c955f1a1818d3510390520916642f"}},{"ruleId":"D2","level":"warning","message":{"text":"RebalanceImpl.updateProcessQueueTableInRebalance (cognitive 28): RebalanceImpl.updateProcessQueueTableInRebalance has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23, loops 3, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"c352e6bf44611aa51c955e3a26c04fc9ff97ba89ea634b4fc7195e2f9982de95"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientInstance.sendHeartbeatToAllBrokerConcurrently (cognitive 28): MQClientInstance.sendHeartbeatToAllBrokerConcurrently has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17, loops 5, error handling 4, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":814}}}],"partialFingerprints":{"codehealthFindingId/v1":"93bfd18b6086981789ff805bbd5edb6eae20d3e5ef77cbaf2a12b070bb13dc50"}},{"ruleId":"D2","level":"warning","message":{"text":"1.run (cognitive 28): 1.run has cognitive complexity 28 (threshold 15). Drivers by points: error handling 17, if/else 8, loops 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/benchmark/BatchProducer.java"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"a019c1ff2dc8d55d86e2198abc51df4a191b9e129bdbfe41009554b92a658d39"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerMessageStore.recoverAndRevise (cognitive 28): TimerMessageStore.recoverAndRevise has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16, loops 4, boolean chains 3, error handling 3, ternaries 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab19034def4605cd494d888f5362ad0496402a23ce5641839f9b7512c29beaf4"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMessageStore.getMessageIds (cognitive 28): DefaultMessageStore.getMessageIds has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16, loops 6, ternaries 5, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":1627}}}],"partialFingerprints":{"codehealthFindingId/v1":"da7380680a909ccf5a324430c0989d2bce58563f0315bbd023af5d4869bdd8fd"}},{"ruleId":"D2","level":"warning","message":{"text":"GetLiteGroupInfoSubCommand.execute (cognitive 28): GetLiteGroupInfoSubCommand.execute has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 11, if/else 9, error handling 3, loops 3, boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteGroupInfoSubCommand.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"269f2abf44a351f73d508c52c12a950b025f85dddac6415c2fea9540ca17ad54"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultPullMessageResultHandler.handle (cognitive 27): DefaultPullMessageResultHandler.handle has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17, error handling 4, boolean chains 3, ternaries 2, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"f87a3b1afecfaee4f31b330046ad71b05fee60e4ad2d2b68b6c1bc0d25e0638f"}},{"ruleId":"D2","level":"warning","message":{"text":"QueryAssignmentProcessor.doLoadBalance (cognitive 27): QueryAssignmentProcessor.doLoadBalance has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23, error handling 2, boolean chains 1, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/QueryAssignmentProcessor.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"2056ca2aae19134f9b45902a0bfed2d1fe99ac7e14ecb17e2b95baadb87b6aee"}},{"ruleId":"D2","level":"warning","message":{"text":"RebalanceImpl.lockAll (cognitive 27): RebalanceImpl.lockAll has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20, loops 4, error handling 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e90b852800ce652262772d61cc26b3c20612bad54ea913caf45f074ca3c5e86"}},{"ruleId":"D2","level":"warning","message":{"text":"MixAll.printObjectProperties (cognitive 27): MixAll.printObjectProperties has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, error handling 4, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/MixAll.java"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"62099b69f61c86d14495acf9bd61b0e82d8f24c25d95c3691ef4071cc67c7cf0"}},{"ruleId":"D2","level":"warning","message":{"text":"MappedFileQueue.deleteExpiredFileByOffsetForTimerLog (cognitive 27): MappedFileQueue.deleteExpiredFileByOffsetForTimerLog has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23, boolean chains 2, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd9e6b2b6ce6cf9ad70c96dabd01224a1180d49787aeed5f8520b39da386b77c"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultAuthorizationContextBuilder.buildContextByAnnotation (cognitive 26): DefaultAuthorizationContextBuilder.buildContextByAnnotation has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, loops 5, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"0761e965c4d84ae5a39884e06f641c9299d879cb5c988412a224c6bddb9242a7"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerOffsetManager.queryMinOffsetInAllGroup (cognitive 26): ConsumerOffsetManager.queryMinOffsetInAllGroup has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, loops 9 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"a61757229416579167194a77b4d8568eaec2fd9dad980c9dfa0e98aca4eddcc4"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerFastFailure.cleanExpiredRequestInQueue (cognitive 26): BrokerFastFailure.cleanExpiredRequestInQueue has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, error handling 2, boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/latency/BrokerFastFailure.java"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ddb02df6c953714a4e72346714f29ae879bce4e345f3081a1827a5ccc11ec4b"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicQueueMappingUtils.checkNameEpochNumConsistence (cognitive 26): TopicQueueMappingUtils.checkNameEpochNumConsistence has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, boolean chains 5, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"5743135a7cc7f5a2c6a1307c47deb5058a9262f6c4086d3845e399fa4a596bbf"}},{"ruleId":"D2","level":"warning","message":{"text":"RebalanceImpl.rebalanceByTopic (cognitive 26): RebalanceImpl.rebalanceByTopic has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, error handling 3, boolean chains 2, match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"66b8e1756f94fc95619737f5af39b9dded5e3fb404e28b2df53c1ef146e4ba5c"}},{"ruleId":"D2","level":"warning","message":{"text":"TraceDataEncoder.decoderFromTraceDataString (cognitive 26): TraceDataEncoder.decoderFromTraceDataString has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/trace/TraceDataEncoder.java"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"4434dad29ce1315a14cf2fa18638c71dc57217ef0c865dca9f220bebf575cb17"}},{"ruleId":"D2","level":"warning","message":{"text":"HAServerReader.processReadResult (cognitive 26): HAServerReader.processReadResult has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, match/switch 3, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAConnection.java"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"7af916c38da4b27aa32d27672c80551c9a8823b06ec64a23f87851ec3311248a"}},{"ruleId":"D2","level":"warning","message":{"text":"CombineConsumeQueueStore.processConsumeQueuesForTopic (cognitive 26): CombineConsumeQueueStore.processConsumeQueuesForTopic has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11, ternaries 8, loops 3, boolean chains 2, error handling 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/CombineConsumeQueueStore.java"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"7460b268f5155a95bdb3046efff0f7ed3ce5b82f68adf502a7ae69daaba01310"}},{"ruleId":"D2","level":"warning","message":{"text":"TransMessageRocksDBStore.buildTransIndex (cognitive 26): TransMessageRocksDBStore.buildTransIndex has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, error handling 4, boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/transaction/TransMessageRocksDBStore.java"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"110a38cdc9bc5821183f1cdef1bb42c020df70cc536b3cdcf0146c0596e1070c"}},{"ruleId":"D2","level":"warning","message":{"text":"AllocateMappedFileService.putRequestAndReturnMappedFile (cognitive 26): AllocateMappedFileService.putRequestAndReturnMappedFile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, error handling 3, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d3b8b333f26e058bec9a1b7f8ec46a0c6102f66f8a9e811174dc5741e3279cf"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultPromise.get (cognitive 26): DefaultPromise.get has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, error handling 6, loops 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"openmessaging/src/main/java/io/openmessaging/rocketmq/promise/DefaultPromise.java"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"805e8ce12fb1e5af4bcca2c2b4201ef62e75e9b18142505cc9efa478231f080e"}},{"ruleId":"D2","level":"warning","message":{"text":"AuthMigrator.createAcl (cognitive 25): AuthMigrator.createAcl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21, loops 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"0656178e2cd9b5bbe4fa1aa569dc6363d9e7f685ba8165a690f4a2e642cf161a"}},{"ruleId":"D2","level":"warning","message":{"text":"Broker2Client.getConsumeStatus (cognitive 25): Broker2Client.getConsumeStatus has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, error handling 4, match/switch 4, boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/net/Broker2Client.java"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ba2502499c286b39b25a729dca6953ce843e387e1623cf1e3f8b7aef00d3cee"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicConfigManager.createTopicInSendMessageMethod (cognitive 25): TopicConfigManager.createTopicInSendMessageMethod has cognitive complexity 25 (threshold 15). Drivers by points: if/else 24, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"abc0e5b8e3235c848034ca368253aaee9841b457bc051c89e967444e8ffa9c56"}},{"ruleId":"D2","level":"warning","message":{"text":"PopBufferMergeService.addAk (cognitive 25): PopBufferMergeService.addAk has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, loops 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f8d7fb27cd34a65d2f728c5d3bb0a0c8ac873b1d5985ff2ddddafe04b7e1ba2"}},{"ruleId":"D2","level":"warning","message":{"text":"SubscriptionData.equals (cognitive 25): SubscriptionData.equals has cognitive complexity 25 (threshold 15). Drivers by points: if/else 25 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/heartbeat/SubscriptionData.java"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e8a5b682b5057f30a436f4bf6d7859fda0ba6c5a1baf32e1684a78fd19905d5"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageDecoder.decode (cognitive 25): MessageDecoder.decode has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21, ternaries 2, boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/message/MessageDecoder.java"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"19416e5c2c1055ef15182480aad3b78b1d2b950c1b68b823e23daef7e316c168"}},{"ruleId":"D2","level":"warning","message":{"text":"3.run (cognitive 25): 3.run has cognitive complexity 25 (threshold 15). Drivers by points: error handling 15, loops 6, if/else 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/benchmark/timer/TimerProducer.java"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd015f1060793f8b4ccd5ff4c7fb2ae001bc38d6a73c08888eece2ac94d59ec9"}},{"ruleId":"D2","level":"warning","message":{"text":"ReceiveMessageActivity.receiveMessage (cognitive 25): ReceiveMessageActivity.receiveMessage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, ternaries 4, boolean chains 3, error handling 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/ReceiveMessageActivity.java"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"09e95f20cdad8d4e32da5177b95f006b311ba40972f6c9cc32bd33d054a41c77"}},{"ruleId":"D2","level":"warning","message":{"text":"HAProxyMessageForwarder.buildHAProxyMessage (cognitive 25): HAProxyMessageForwarder.buildHAProxyMessage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, loops 2, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/remoting/protocol/http2proxy/HAProxyMessageForwarder.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"df2697fa62c62418e2152ea5bba7f53ae1fbc8ada5b432f6664ea0219d9a14aa"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageQueueSelector.buildWrite (cognitive 25): MessageQueueSelector.buildWrite has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14, loops 11 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/service/route/MessageQueueSelector.java"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"276a74220bcbae399978dc7d738973ea05dda5e56ed988adeea5b45442feaf97"}},{"ruleId":"D2","level":"warning","message":{"text":"WriteSocketService.transferData (cognitive 25): WriteSocketService.transferData has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21, loops 3, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAConnection.java"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"d88a2c68aaf12ebda067598958df3f38fbe45328f56f11bb217036359d450f50"}},{"ruleId":"D2","level":"warning","message":{"text":"AllocateMappedFileService.mmapOperation (cognitive 25): AllocateMappedFileService.mmapOperation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, error handling 8, boolean chains 2, ternaries 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bdd048a33bc27079d85d4bd4dc7a6676d04979659dc46d1088afec3df3daf0a"}},{"ruleId":"D2","level":"warning","message":{"text":"MQAdminStartup.main0 (cognitive 25): MQAdminStartup.main0 has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, error handling 1, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/MQAdminStartup.java"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ef2a926e2baa965509c6de033bec324b4bc492d65688b4b34737501dc039267"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultAuthorizationContextBuilder.build (cognitive 24): DefaultAuthorizationContextBuilder.build has cognitive complexity 24 (threshold 15). Drivers by points: if/else 24 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"e38bb191f9b268015d852022dc28f34e67ced38ced55ca25302d5c3e7e36b0ce"}},{"ruleId":"D2","level":"warning","message":{"text":"AckMessageProcessor.appendAckNew (cognitive 24): AckMessageProcessor.appendAckNew has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, boolean chains 3, error handling 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7a8a461df3bedf9ca41ed615da4f2ca984c7f5f5046e583a83ff5be08218f80"}},{"ruleId":"D2","level":"warning","message":{"text":"AdminBrokerProcessor.resetOffsetInner (cognitive 24): AdminBrokerProcessor.resetOffsetInner has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 4, boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":2267}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bab9a0b08a80a7a5b0bbb90754de39532e5112439dbcaa3a3ea728b3b609b61"}},{"ruleId":"D2","level":"warning","message":{"text":"AdminBrokerProcessor.updateAndCreateTopicList (cognitive 24): AdminBrokerProcessor.updateAndCreateTopicList has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 4, boolean chains 2, error handling 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"619b8bce0c01e1fa28a43a15314584824fb50a6d2763d7c912b725f90ee4f9f8"}},{"ruleId":"D2","level":"warning","message":{"text":"ClientManageProcessor.heartBeatV2 (cognitive 24): ClientManageProcessor.heartBeatV2 has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 4, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"75e653c1406a6c5063c3e5b43110aca431a3ba2224b02614a826c912255ac342"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerManageProcessor.rewriteRequestForStaticTopic (cognitive 24): ConsumerManageProcessor.rewriteRequestForStaticTopic has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 1, error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/ConsumerManageProcessor.java"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4b4a3ae420e86dbbbf44e73cc6722fb152151a54d47ad86afc6a54c8ded98aa"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicQueueMappingUtils.checkAndBuildMappingItems (cognitive 24): TopicQueueMappingUtils.checkAndBuildMappingItems has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 5 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"228c0f688d10484d8f07a33035b26160b758277533f376250a7bbfd7ae0b8b6a"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicQueueMappingUtils.checkLogicQueueMappingItemOffset (cognitive 24): TopicQueueMappingUtils.checkLogicQueueMappingItemOffset has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, boolean chains 6, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"18c29491830e6058fe3ba45f127184b70107d5af2df8a5417928a57025aab47f"}},{"ruleId":"D2","level":"warning","message":{"text":"Consumer.main (cognitive 24): Consumer.main has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 13, if/else 8, boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"example/src/main/java/org/apache/rocketmq/example/benchmark/Consumer.java"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ed51533430c75664c91322f059a09fb480de18c54fa092775666d39614c607d"}},{"ruleId":"D2","level":"warning","message":{"text":"SendMessageActivity.buildMessageProperty (cognitive 24): SendMessageActivity.buildMessageProperty has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, loops 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/producer/SendMessageActivity.java"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a1bf9e0e5a04a23976cbefbc31e100bdca569a4beb04f3f9dec284be8f6d2d9"}},{"ruleId":"D2","level":"warning","message":{"text":"AcceptSocketService.run (cognitive 24): AcceptSocketService.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12, error handling 8, loops 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAService.java"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"656a63ceb06f6bcf3980320308a8ab3ac2353f5e1b6887397ffcb61e249b4074"}},{"ruleId":"D2","level":"warning","message":{"text":"AdaptiveBackOffSpinLockImpl.swap (cognitive 24): AdaptiveBackOffSpinLockImpl.swap has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, error handling 3, loops 3 (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":"store/src/main/java/org/apache/rocketmq/store/lock/AdaptiveBackOffSpinLockImpl.java"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"64e5d3cc337318c680277dc410d8b19949efdf89e3971d5bdc38f55d77aa6dce"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultAppendMessageCallback.doAppend (cognitive 24): DefaultAppendMessageCallback.doAppend has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15, error handling 5, ternaries 2, boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1990}}}],"partialFingerprints":{"codehealthFindingId/v1":"c46309984fc3f8f5d2a7c89eaca398c902bf3342801b39dfdf62bfd374788492"}},{"ruleId":"D2","level":"warning","message":{"text":"MappedFileQueue.findMappedFileByOffset (cognitive 24): MappedFileQueue.findMappedFileByOffset has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13, boolean chains 4, error handling 4, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0b23ebf8968ff5d0a0338c23efdf9af206fc49b01cb2e9319e21d9501fd9b56"}},{"ruleId":"D2","level":"warning","message":{"text":"FlatMessageFile.getQueueOffsetByTimeAsync (cognitive 24): FlatMessageFile.getQueueOffsetByTimeAsync has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, loops 4, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/FlatMessageFile.java"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"1987906f3944946355663a8ff515730b3090b8359f1882aceb5385389e0b89de"}},{"ruleId":"D2","level":"warning","message":{"text":"AdminBrokerProcessor.getConsumeStats (cognitive 23): AdminBrokerProcessor.getConsumeStats has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, loops 3, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":2024}}}],"partialFingerprints":{"codehealthFindingId/v1":"00a59e05907a618951b6708e090c9de96a1f238d1ea739a08a9a024d7bccd7e2"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicRouteData.equals (cognitive 23): TopicRouteData.equals has cognitive complexity 23 (threshold 15). Drivers by points: if/else 23 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/route/TopicRouteData.java"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"aab075a7e475e571440b403b6deee127ea83599652f4b2ad9dfbe6cd37d436b6"}},{"ruleId":"D2","level":"warning","message":{"text":"MixAll.object2Properties (cognitive 23): MixAll.object2Properties has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, error handling 5, loops 3, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/MixAll.java"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"42818aaf779ac5f996afeb2302184de5bb8798d5494f168f5ef39ab195386f96"}},{"ruleId":"D2","level":"warning","message":{"text":"ControllerEventHandler.run (cognitive 23): ControllerEventHandler.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/impl/DLedgerController.java"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"94c8c8fc869fde70cd9be06cd7a337d3b9176745c14e42d72e207a500e1d2f06"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMappedFile.appendMessagesInner (cognitive 23): DefaultMappedFile.appendMessagesInner has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, error handling 3, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"58dbdceaadec7b6dd8834414ef8902641a36f161b836b3b6839885de7e252e71"}},{"ruleId":"D2","level":"warning","message":{"text":"BatchConsumeQueue.recover (cognitive 23): BatchConsumeQueue.recover has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 5, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfe2f9e1678633bebd85266aad361fc4d401bd6c6a12296dc945c5bd9d36a08a"}},{"ruleId":"D2","level":"warning","message":{"text":"SparseConsumeQueue.recover (cognitive 23): SparseConsumeQueue.recover has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 5, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/SparseConsumeQueue.java"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e7d60ac4636b11aaa7c5893b621cc88c044a8abfdbc5c10384cd13d65736feb"}},{"ruleId":"D2","level":"warning","message":{"text":"GroupCommitService.doCommit (cognitive 23): GroupCommitService.doCommit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9, error handling 5, loops 5, ternaries 3, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1731}}}],"partialFingerprints":{"codehealthFindingId/v1":"55c27544eb5fc34a2bd263a6b9ea811674b8a1d948583f282efffd13c3f88821"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMessageStore.queryMessage (cognitive 23): DefaultMessageStore.queryMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, error handling 3, loops 3, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":1453}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc8c5504cfaa5c0f772d3020045b7eb68ee5506bb1bc039a7c0c39c4593d460f"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQAdminExtImpl.consumedConcurrent (cognitive 23): DefaultMQAdminExtImpl.consumedConcurrent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, loops 2, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":1560}}}],"partialFingerprints":{"codehealthFindingId/v1":"130ada1ba24563f1f0b496c73dfdd1f923cb265f2344f18a95a1ae7440cf9198"}},{"ruleId":"D2","level":"warning","message":{"text":"RemappingStaticTopicSubCommand.execute (cognitive 23): RemappingStaticTopicSubCommand.execute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, loops 6, boolean chains 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9578983cb30d10aacf286388686c166f1d1e15c94d1824e660919dab65eb1b8"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractOMSProducer.checkProducerException (cognitive 23): AbstractOMSProducer.checkProducerException has cognitive complexity 23 (threshold 15). Drivers by points: if/else 22, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"openmessaging/src/main/java/io/openmessaging/rocketmq/producer/AbstractOMSProducer.java"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5427eb88ddf931cfe3fbaa07fa77c4a954211999653d21bb5e8e58e1da34bac"}},{"ruleId":"D2","level":"warning","message":{"text":"ProducerManager.registerProducer (cognitive 22): ProducerManager.registerProducer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, boolean chains 2, ternaries 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/ProducerManager.java"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d0e6373289cdba636e9d56af202e161dd167365cd3ce8aca456dcf60e89c91b"}},{"ruleId":"D2","level":"warning","message":{"text":"PopBufferMergeService.scanCommitOffset (cognitive 22): PopBufferMergeService.scanCommitOffset has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, boolean chains 4, loops 3 (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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec59898ce4e7257156138ec2db1043a347830dde653d5c00db5993a5b5688257"}},{"ruleId":"D2","level":"warning","message":{"text":"DeliverDelayedMessageTimerTask.executeOnTimeUp (cognitive 22): DeliverDelayedMessageTimerTask.executeOnTimeUp has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, boolean chains 1, error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf2595e6a611a2a5a00f15f13dc3fcbfa91c7fe14fa71e641ab48a17c98d0ab4"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicQueueMappingUtils.remappingStaticTopic (cognitive 22): TopicQueueMappingUtils.remappingStaticTopic has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, loops 8 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbf532a35f81cec36e6f1a2c9278e84591d269ad3d0ced224747e0153ef6ea26"}},{"ruleId":"D2","level":"warning","message":{"text":"RemotingCommand.makeCustomHeaderToNet (cognitive 22): RemotingCommand.makeCustomHeaderToNet has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, error handling 5, loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"7965ee3e5b281d7c0f9b2e58d52be5776fc62f2b895afb3811080d4555e0500a"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeRequest.run (cognitive 22): ConsumeRequest.run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, boolean chains 2, loops 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"119542da6a00d763a32becf264f94ed8f2e7212d615fb54753a52023c36a9c94"}},{"ruleId":"D2","level":"warning","message":{"text":"ProcessQueue.cleanExpiredMsg (cognitive 22): ProcessQueue.cleanExpiredMsg has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10, error handling 9, boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"d01b36e6468ed9ce190a800c39de5a2bd2bc86b38708c3a44b625985debe96f8"}},{"ruleId":"D2","level":"warning","message":{"text":"RebalanceImpl.doRebalance (cognitive 22): RebalanceImpl.doRebalance has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, error handling 3, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb1b85bf81f0b85c3713ed29ccd014bd8bdc2fe42bab87c98a4bf6b67597ac16"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientInstance.checkClientInBroker (cognitive 22): MQClientInstance.checkClientInBroker has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, error handling 4, loops 3, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ad82bbd46d8265310e3735d4ccc1ad692c18ebbdffc0580925af448bb2cba05"}},{"ruleId":"D2","level":"warning","message":{"text":"RouteInfoManager.cleanTopicByUnRegisterRequests (cognitive 22): RouteInfoManager.cleanTopicByUnRegisterRequests has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, loops 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"121eeed15b3b700a376ed5fa28da31de29c4ce982464861456849b823c45e3f7"}},{"ruleId":"D2","level":"warning","message":{"text":"RouteActivity.queryAssignment (cognitive 22): RouteActivity.queryAssignment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, loops 6, boolean chains 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce80b6d5d806f2a49a06c5b358ed0a3bb8da8e8aec1b56cb9208f0ce18eacce7"}},{"ruleId":"D2","level":"warning","message":{"text":"HAConnectionStateNotificationService.doWaitConnectionState (cognitive 22): HAConnectionStateNotificationService.doWaitConnectionState has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/HAConnectionStateNotificationService.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cbf2f18dff11556db625794ca4faf3f0a56e3e10f696a1e9bbfdeef5a881729"}},{"ruleId":"D2","level":"warning","message":{"text":"IndexService.queryOffset (cognitive 22): IndexService.queryOffset has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 2, boolean chains 1, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/index/IndexService.java"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bd5f8f1746dc1cb6eb70d2b353dd6b223798c8bc949a9e146003bfda7d73cc5"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMessageStore.queryMessage (cognitive 22): DefaultMessageStore.queryMessage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, error handling 3, loops 3, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":1397}}}],"partialFingerprints":{"codehealthFindingId/v1":"30eca8e3a26eb4243f42895995c96add6a4f0795d35332cc80995b6062633f43"}},{"ruleId":"D2","level":"warning","message":{"text":"TieredStoreMetricsManager.init (cognitive 22): TieredStoreMetricsManager.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, error handling 5, boolean chains 3, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/metrics/TieredStoreMetricsManager.java"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d53a186244be732c796e5ed3b6e149bf828bdc880ff58a47763045a6d7fe050"}},{"ruleId":"D2","level":"warning","message":{"text":"MQAdminUtils.remappingStaticTopic (cognitive 22): MQAdminUtils.remappingStaticTopic has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, loops 7, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/MQAdminUtils.java"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5f047e42ef83942e9ae4d869dc32adc0ef12e32bcbe73614a11868bd5976105"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeMessageCommand.execute (cognitive 22): ConsumeMessageCommand.execute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, error handling 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/message/ConsumeMessageCommand.java"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"67ace8436baa9c906d77731bc29595b708170d75c835fe7a491d255562bd925b"}},{"ruleId":"D2","level":"warning","message":{"text":"DumpCompactionLogCommand.execute (cognitive 22): DumpCompactionLogCommand.execute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, error handling 5, loops 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/message/DumpCompactionLogCommand.java"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f57f355735c3f49248d7ff8afc1ba97ab641ed158e0e4317a9adb54fe3ef51d"}},{"ruleId":"D2","level":"warning","message":{"text":"UpdateTopicSubCommand.execute (cognitive 22): UpdateTopicSubCommand.execute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, loops 7, error handling 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicSubCommand.java"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d9f18f21db800849737594134f1b9c5b0e290e8b35c08929536ac9c2ac24cb5"}},{"ruleId":"D2","level":"warning","message":{"text":"MonitorService.computeUndoneMsgs (cognitive 22): MonitorService.computeUndoneMsgs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, match/switch 4, error handling 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/monitor/MonitorService.java"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3df32d9a769702494596a4d2551849729c0b4495886c0e22f0b6ceb6ff0ec32"}},{"ruleId":"D2","level":"warning","message":{"text":"ReplicasManager.startBasicService (cognitive 21): ReplicasManager.startBasicService has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, error handling 3, loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/controller/ReplicasManager.java"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"847a46fcea6a6cd1aabc0a193ade530f7f47a351d826f99a1f6a111d709af062"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerFilterManager.clean (cognitive 21): ConsumerFilterManager.clean has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, ternaries 4, loops 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fb4b18181079b62c8bc360ecd0781665a4ed4b8031976465bcff5c376533d41"}},{"ruleId":"D2","level":"warning","message":{"text":"AdminBrokerProcessor.queryConsumeQueue (cognitive 21): AdminBrokerProcessor.queryConsumeQueue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":2938}}}],"partialFingerprints":{"codehealthFindingId/v1":"863bcc0f5542e5305364ff7eee96575e09a307d8825585b4d4c5ac83e78ff63a"}},{"ruleId":"D2","level":"warning","message":{"text":"AdminBrokerProcessor.rewriteRequestForStaticTopic (cognitive 21): AdminBrokerProcessor.rewriteRequestForStaticTopic has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, boolean chains 2, error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1202}}}],"partialFingerprints":{"codehealthFindingId/v1":"08c0576db32d6600dd91fc98060393ad9bd648d8a2453f5bc84c4640233f1941"}},{"ruleId":"D2","level":"warning","message":{"text":"PopReviveService.run (cognitive 21): PopReviveService.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, boolean chains 2, error handling 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java"},"region":{"startLine":658}}}],"partialFingerprints":{"codehealthFindingId/v1":"98b5264a86e5733a45d9841979c753e658d47766cff0ad01728e080cce0a528a"}},{"ruleId":"D2","level":"warning","message":{"text":"TransactionalMessageServiceImpl.batchSendOpMessage (cognitive 21): TransactionalMessageServiceImpl.batchSendOpMessage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, boolean chains 3, loops 3, error handling 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java"},"region":{"startLine":698}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e03802388771c54ac5fac4dc0e82282a761def9982e1a61a48a0de82636bd69"}},{"ruleId":"D2","level":"warning","message":{"text":"TransactionalMessageServiceImpl.fillOpRemoveMap (cognitive 21): TransactionalMessageServiceImpl.fillOpRemoveMap has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, loops 4, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bdfa50a3881dcf80a7d6d24c600544722b09f3a84fedbd628551fff4ba4865a"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeMessageConcurrentlyService.submitConsumeRequest (cognitive 21): ConsumeMessageConcurrentlyService.submitConsumeRequest has cognitive complexity 21 (threshold 15). Drivers by points: loops 9, if/else 7, error handling 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e7f87c276be392b05782ac7ef420e32f425efeac0e977e56f5f90fbe078a873"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeMessagePopConcurrentlyService.submitPopConsumeRequest (cognitive 21): ConsumeMessagePopConcurrentlyService.submitPopConsumeRequest has cognitive complexity 21 (threshold 15). Drivers by points: loops 9, if/else 7, error handling 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4077a38d42c86759d58c48a3fc2b513635fea953bb386aefc182594357335c5"}},{"ruleId":"D2","level":"warning","message":{"text":"AttributeUtil.alterCurrentAttributes (cognitive 21): AttributeUtil.alterCurrentAttributes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/attribute/AttributeUtil.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"445585374f42eadadf6d32ec54a032c3d9843bbbb58fa175657afc66e1de25a0"}},{"ruleId":"D2","level":"warning","message":{"text":"NetworkUtil.getLocalInetAddress (cognitive 21): NetworkUtil.getLocalInetAddress has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 6, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/utils/NetworkUtil.java"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"af24dfc87b06f63c8038990c58be577a3fd512b962bd38c6308f694bdeaa97ad"}},{"ruleId":"D2","level":"warning","message":{"text":"RemotingProtocolServer.cleanExpiredRequestInQueue (cognitive 21): RemotingProtocolServer.cleanExpiredRequestInQueue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, error handling 2, boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/remoting/RemotingProtocolServer.java"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea240edb29086c1f1ebb2ec9ab80a7d87362ebf2b4481ad87fda3a85220a3847"}},{"ruleId":"D2","level":"warning","message":{"text":"CorrectLogicOffsetService.needCorrect (cognitive 21): CorrectLogicOffsetService.needCorrect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/ConsumeQueueStore.java"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ff16c4af9af6a74338b28ffda941dd42e18b6f3833fc1939700a00f17d91778"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageRocksDBStorage.writeRecordsForTimer (cognitive 21): MessageRocksDBStorage.writeRecordsForTimer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, error handling 3, boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c91f60ab81f3fdafa42f49b7ce89eb68dc467360e09a42fdb266c680f969a62"}},{"ruleId":"D2","level":"warning","message":{"text":"GroupCheckService.doCommit (cognitive 21): GroupCheckService.doCommit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8, error handling 5, loops 5, ternaries 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1842}}}],"partialFingerprints":{"codehealthFindingId/v1":"87c04e3a2cdba3983e9dfac7668fbfd279b374a33206430e43ce8c975d2d2120"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeQueue.putMessagePositionInfoWrapper (cognitive 21): ConsumeQueue.putMessagePositionInfoWrapper has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, error handling 3, boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffd339ee67dea78ec867b552771dff5b25382e95fda7e3d36bc9dbf0815ec723"}},{"ruleId":"D2","level":"warning","message":{"text":"MQAdminUtils.convertPhysicalConsumeStats (cognitive 21): MQAdminUtils.convertPhysicalConsumeStats has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, boolean chains 4, loops 3 (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":"tools/src/main/java/org/apache/rocketmq/tools/admin/MQAdminUtils.java"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"be9eb98432a864fa438a2795c642f0c5362acc08ce880c7a7127022572f72dcc"}},{"ruleId":"D2","level":"warning","message":{"text":"CopyAclsSubCommand.execute (cognitive 21): CopyAclsSubCommand.execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 5, boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/CopyAclsSubCommand.java"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8ffa37ea5c1371127cb4c22dff881159718e72be42c3fbffa70179532e1525d"}},{"ruleId":"D2","level":"warning","message":{"text":"CopyUsersSubCommand.execute (cognitive 21): CopyUsersSubCommand.execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 5, boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/CopyUsersSubCommand.java"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c57cc6e6ec52efa9b9cb3455a24f7e7dcf8318dc10aba1d96e094ab6363799a"}},{"ruleId":"D2","level":"warning","message":{"text":"UpdateSubGroupSubCommand.execute (cognitive 21): UpdateSubGroupSubCommand.execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, error handling 5, loops 3 (nesting depth added 5). 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":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupSubCommand.java"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"16e2c6c05d325ae20595393775a701ee54a950fe73114b0d37e9097a71f30518"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicListSubCommand.execute (cognitive 21): TopicListSubCommand.execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8, loops 7, error handling 4, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicListSubCommand.java"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"42d30a1cd95e64df11adebfa9f4153a725ca544ff2614c3559d3fc69a306f760"}},{"ruleId":"D2","level":"warning","message":{"text":"UpdateStaticTopicSubCommand.execute (cognitive 21): UpdateStaticTopicSubCommand.execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, loops 5, boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateStaticTopicSubCommand.java"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"43febf620b1d0a22bd43660e8428607e94d1441c51e38ae1943a2fbcf7407914"}},{"ruleId":"D2","level":"warning","message":{"text":"RebalanceLockManager.tryLockBatch (cognitive 20): RebalanceLockManager.tryLockBatch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, loops 3, error handling 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"208cb4fb3c300fee7be2de27fe7281d2364a183a525197b29a97373e9bf757eb"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerManager.registerConsumer (cognitive 20): ConsumerManager.registerConsumer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, ternaries 5, boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1aab5be52bbf142bcfac1ef4b8d504485bb54c97b2e3042bf000cec3e6f320b"}},{"ruleId":"D2","level":"warning","message":{"text":"ReplicasManager.schedulingSyncBrokerMetadata (cognitive 20): ReplicasManager.schedulingSyncBrokerMetadata has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, error handling 5, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/controller/ReplicasManager.java"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"bedb218ea2ffcb4fc36ffab820c728f631b5ff27fa77d575946e925a6c292732"}},{"ruleId":"D2","level":"warning","message":{"text":"LiteEventDispatcher.doFullDispatchForClient (cognitive 20): LiteEventDispatcher.doFullDispatchForClient has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, ternaries 5, boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/lite/LiteEventDispatcher.java"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"d59ada6ba1124e0fccd144b8a9709b9634aa4fe56a32d6baaaac36275ea808da"}},{"ruleId":"D2","level":"warning","message":{"text":"LiteSubscriptionRegistryImpl.getAllSubscriber (cognitive 20): LiteSubscriptionRegistryImpl.getAllSubscriber has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, loops 6 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/lite/LiteSubscriptionRegistryImpl.java"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3c7dd7eb63d4ea795b83c655673d56cca01f0f298a17bfeb15d2b10df9309d2"}},{"ruleId":"D2","level":"warning","message":{"text":"AdminBrokerProcessor.deleteTopicList (cognitive 20): AdminBrokerProcessor.deleteTopicList has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, loops 4, ternaries 3, error handling 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":812}}}],"partialFingerprints":{"codehealthFindingId/v1":"e65e86623d96efdb4002d7d41a9603a72538966677af0ee9f6782a81a147c792"}},{"ruleId":"D2","level":"warning","message":{"text":"PullMessageRequestHeader.decode (cognitive 20): PullMessageRequestHeader.decode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. 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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"3aad7d07bb949c008e14b9fdb577f8709b09679e289ecfff22f4a7f39cf7cbf1"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicQueueMappingUtils.checkPhysicalQueueConsistence (cognitive 20): TopicQueueMappingUtils.checkPhysicalQueueConsistence has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, loops 6 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec797b590019a525c9ddff33cadd7cf573b5e995eee91d9256a54fc5654d84cd"}},{"ruleId":"D2","level":"warning","message":{"text":"AllocateMachineRoomNearby.allocate (cognitive 20): AllocateMachineRoomNearby.allocate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, loops 3, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMachineRoomNearby.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"15a550ad91267456f4eb777a462fa397c184c82809e7a8a3c2a5adf87c7c15f3"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientInstance.unregisterClient (cognitive 20): MQClientInstance.unregisterClient has cognitive complexity 20 (threshold 15). Drivers by points: error handling 12, if/else 5, loops 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":1110}}}],"partialFingerprints":{"codehealthFindingId/v1":"48f4300fe5ef68d35b5e8a3af06aaca5da5cc0f17bfd80b8c0a0f8c21fe5c719"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractRocksDBStorage.iterate (cognitive 20): AbstractRocksDBStorage.iterate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 4, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c16cb4a8d26784e25ac5e5c9925a394041f42484ea73a0bc925899ae64136ec"}},{"ruleId":"D2","level":"warning","message":{"text":"GrpcConverter.buildSystemProperties (cognitive 20): GrpcConverter.buildSystemProperties has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/common/GrpcConverter.java"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ba05939fa8fba270b856f3bfff79fdd4441c7c7c9a1a68c3eb05f740a2f9d84"}},{"ruleId":"D2","level":"warning","message":{"text":"BatchConsumeQueue.getBatchMsgIndexBuffer (cognitive 20): BatchConsumeQueue.getBatchMsgIndexBuffer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":674}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fa3aa89320d07c68413c70c567c9c8c04a1ce66a306613753f35f13ed672d11"}},{"ruleId":"D2","level":"warning","message":{"text":"BatchConsumeQueue.getOffsetInQueueByTime (cognitive 20): BatchConsumeQueue.getOffsetInQueueByTime has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":765}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f3abce4ec4effdd0019a274d339cdd875610ee5fe55413897d67b661c1fa94b"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeQueueStore.loadConsumeQueues (cognitive 20): ConsumeQueueStore.loadConsumeQueues has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, loops 6, error handling 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/ConsumeQueueStore.java"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"4becc9e1b79593ac02b3107943a4f1ac0e5d1a1ab73e9448e963a40da981cc8b"}},{"ruleId":"D2","level":"warning","message":{"text":"RocksDBConsumeQueueTable.binarySearchInCQ (cognitive 20): RocksDBConsumeQueueTable.binarySearchInCQ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueTable.java"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"221f11023c16006c190eaffa9c7a943e69178198e4766d0a8e1427757c6b3302"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageRocksDBStorage.writeRecordsForTrans (cognitive 20): MessageRocksDBStorage.writeRecordsForTrans has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 4, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"1527c8512d73d1107e82672ea385c37b51177980ab142e2d2770bf8618585e2c"}},{"ruleId":"D2","level":"warning","message":{"text":"CommitLogInputStream.read (cognitive 20): CommitLogInputStream.read has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, loops 5, boolean chains 2 (nesting depth added 6). 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/stream/CommitLogInputStream.java"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"70e71b1fbf3cf57ba4e6bc0035b9f6a6a2f71443e74d63f7f877fefb62af29b8"}},{"ruleId":"D2","level":"warning","message":{"text":"PrintMessageSubCommand.execute (cognitive 20): PrintMessageSubCommand.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6, error handling 4, loops 3, match/switch 3, ternaries 3, boolean chains 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageSubCommand.java"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"4969f92a5a9e3ea2e105c48f6cfbddcab280ed1de052de8d85de04b48794f2d3"}},{"ruleId":"D2","level":"warning","message":{"text":"ResetOffsetByTimeCommand.execute (cognitive 20): ResetOffsetByTimeCommand.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, ternaries 4, error handling 3, boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c83d455c6bded1fe3ba0a524c0662ceb4715165c1d47f3a164627d80f6795ad"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalMessageCache.cleanExpireMsg (cognitive 20): LocalMessageCache.cleanExpireMsg has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, error handling 6, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"openmessaging/src/main/java/io/openmessaging/rocketmq/consumer/LocalMessageCache.java"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"00bcc42c25c551240a3c0b6b8dd94a7d203e0d2b90b2258d45b7f059794b33f4"}},{"ruleId":"D2","level":"warning","message":{"text":"ExpressionMessageFilter.isMatchedByConsumeQueue (cognitive 19): ExpressionMessageFilter.isMatchedByConsumeQueue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 3, error handling 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/filter/ExpressionMessageFilter.java"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"25c724d9a6e0a9f77408f365b0b96f86e7e406753458c02aa1cf6c1a38b9c509"}},{"ruleId":"D2","level":"warning","message":{"text":"LiteEventDispatcher.selectAndDispatch (cognitive 19): LiteEventDispatcher.selectAndDispatch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/lite/LiteEventDispatcher.java"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"38d4c0b02bc5a1cb9080cd3bbddbe67571e0b55f0bfcbdbe738ba704ed9a8061"}},{"ruleId":"D2","level":"warning","message":{"text":"OrderInfo.getLockFreeTimestamp (cognitive 19): OrderInfo.getLockFreeTimestamp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"a189630024737dc8605c89efd406e3aae6eb8ab6551be37906daf00bfb4e1102"}},{"ruleId":"D2","level":"warning","message":{"text":"OrderInfo.getMaxLockFreeTimestamp (cognitive 19): OrderInfo.getMaxLockFreeTimestamp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"79d8d48fc814ce4c6cfad05f2445b4dee9fe15a7fc39de3dde2580c4bba6eda7"}},{"ruleId":"D2","level":"warning","message":{"text":"OrderInfo.needBlock (cognitive 19): OrderInfo.needBlock has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b103625a77db8164ac02472473920dec7b09e9e2a75b6af97761788b955ee2b"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractSendMessageProcessor.msgCheck (cognitive 19): AbstractSendMessageProcessor.msgCheck has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e79a905c6d010e9097e4140559121dfc50510c7922c833a2a2eb4cad2ca7369"}},{"ruleId":"D2","level":"warning","message":{"text":"ClientManageProcessor.heartBeat (cognitive 19): ClientManageProcessor.heartBeat has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec91a5e81208feb26bda1f3aefea7dcf1e08ec43480556642102f9dc08a32a67"}},{"ruleId":"D2","level":"warning","message":{"text":"NotificationProcessor.hasMsgFromQueue (cognitive 19): NotificationProcessor.hasMsgFromQueue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, loops 3, boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"931a33488d4772c05e57cd040c860ee39340e3c646a04257fbbd2c8d7d215808"}},{"ruleId":"D2","level":"warning","message":{"text":"PopReviveService.mergeAndRevive (cognitive 19): PopReviveService.mergeAndRevive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 3, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"34da725b495413da0a7a3d033f50053f2cb9714edd4650b7adcf1761ad2d221e"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerController.recoverAndInitService (cognitive 19): BrokerController.recoverAndInitService has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 5, error handling 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":930}}}],"partialFingerprints":{"codehealthFindingId/v1":"22501e2c94bf88f1cb49651bf0ec37107e56f089468651c9f87ca1ec4363edbc"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerStartup.buildBrokerController (cognitive 19): BrokerStartup.buildBrokerController has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 2, error handling 2, loops 2, match/switch 2 (nesting depth added 5). 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":"broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ee0449b96e009df72c6cd57c0ef8ec2d7776478cc269d2a82d6dfd6ac018418"}},{"ruleId":"D2","level":"warning","message":{"text":"NettyRemotingClient.closeChannel (cognitive 19): NettyRemotingClient.closeChannel has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, error handling 3, loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8c83b5da66c126cde1a35514a5148498109171da76bb52fd79b88f7d2b7ac20"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerRunningInfo.analyzeProcessQueue (cognitive 19): ConsumerRunningInfo.analyzeProcessQueue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4de48ebb5a0611d351ac0e6b09e9f8a352340ace297b7a31d3d5e8e7abb1da"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeMessageConcurrentlyService.processConsumeResult (cognitive 19): ConsumeMessageConcurrentlyService.processConsumeResult has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 4, match/switch 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd8452db4199fce2a8bf6c15589b5f1f5dbe5059b90245fe07d15396914b4e72"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeRequest.run (cognitive 19): ConsumeRequest.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 2, boolean chains 1, error handling 1 (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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"34020f7f42d3a7ddf659007e5b03c89b5b1c2c54fe3f50dcd9dcf4fb0420fb92"}},{"ruleId":"D2","level":"warning","message":{"text":"ProcessQueue.removeMessage (cognitive 19): ProcessQueue.removeMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, ternaries 4, loops 2, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa9742d05608974cf9f91ec95c004ec969738494fa8365b4735c64bc3ad8aed1"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQProducerImpl.sendMessageInTransaction (cognitive 19): DefaultMQProducerImpl.sendMessageInTransaction has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, error handling 4, boolean chains 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":1433}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cdbfefaadf3e55681daab0fadbb65c1ff54871331cd366a06454624e60f16fb"}},{"ruleId":"D2","level":"warning","message":{"text":"RoleChangeHandler.handle (cognitive 19): RoleChangeHandler.handle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, error handling 3, loops 2, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/impl/DLedgerController.java"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1ba6782f96732eb96668ce0a2e6c066c927c115fe0e67e5c48e46b3b39556f7"}},{"ruleId":"D2","level":"warning","message":{"text":"TransactionProducer.main (cognitive 19): TransactionProducer.main has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 14, boolean chains 2, if/else 2, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/benchmark/TransactionProducer.java"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"14e9158530aa514176942d0673e1411c822431f812492e0e43a2ac66a627b6b1"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultAdminService.createTopicOnBroker (cognitive 19): DefaultAdminService.createTopicOnBroker has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, loops 5, error handling 2, ternaries 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/service/admin/DefaultAdminService.java"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f971098551d53b18e2af09305c546e63e5ceb08e9be009ab75964bf6e5b77c9"}},{"ruleId":"D2","level":"warning","message":{"text":"DLedgerCommitLog.asyncPutMessages (cognitive 19): DLedgerCommitLog.asyncPutMessages has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 1, error handling 1, loops 1, match/switch 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"480c4bf5b74dcc55f247ec784761e003bd4911b97672f05a03b9ca295c1e749c"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultHAClient.dispatchReadRequest (cognitive 19): DefaultHAClient.dispatchReadRequest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAClient.java"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"214ca1df23eeda92d7e94e71fd9c1c6ccb24762c88995cf34b825461f6797d4a"}},{"ruleId":"D2","level":"warning","message":{"text":"ReadSocketService.processReadEvent (cognitive 19): ReadSocketService.processReadEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, error handling 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAConnection.java"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"a832ff94a39148a12c04b0a8e0b94f48313d673b9c52074031b0a492bc17dcdf"}},{"ruleId":"D2","level":"warning","message":{"text":"CleanConsumeQueueService.deleteExpiredFiles (cognitive 19): CleanConsumeQueueService.deleteExpiredFiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7, error handling 5, loops 5, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/ConsumeQueueStore.java"},"region":{"startLine":878}}}],"partialFingerprints":{"codehealthFindingId/v1":"59b6870fa350692e3487360e822ca3e90675e2d9df47c169ae1ca1fb6a40ded9"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageRocksDBStorage.writeRecordsForIndex (cognitive 19): MessageRocksDBStorage.writeRecordsForIndex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 5, error handling 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d6448f56f37a8148111fde4b4a2ca20c886148c21cd37362d023c9632087610"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerMessageRocksDBStore.doPut (cognitive 19): TimerMessageRocksDBStore.doPut has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, match/switch 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e713b806ef9a37aa16db8899205bf08d8b330a38a04af72ad4c37ae4da0aa8b"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerSysTopicScanService.scanSysTimerTopic (cognitive 19): TimerSysTopicScanService.scanSysTimerTopic has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, error handling 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"10646385eb849240c3750db9a8710b7821429edaf47a679e7cfd5da77260a631"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerMessageStore.doPut (cognitive 19): TimerMessageStore.doPut has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 2, match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1191}}}],"partialFingerprints":{"codehealthFindingId/v1":"48c12f4d7f546b43b5212b1f59a71fbf89005ca73c99487d6ae8bd0481a9bfd4"}},{"ruleId":"D2","level":"warning","message":{"text":"Ticks.run (cognitive 19): Ticks.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, error handling 5, loops 5, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/util/PerfCounter.java"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"493e9f7b3f37379e4ae3786f9bcd5b3f2ac61838a4980b388248f4fc19d86c9f"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeQueue.putMessagePositionInfo (cognitive 19): ConsumeQueue.putMessagePositionInfo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ca8aaccdeeb12065ef028cb72939e1b81ae595a40678280cc706a9897ed785f"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageFormatUtil.splitMessageBuffer (cognitive 19): MessageFormatUtil.splitMessageBuffer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, ternaries 4, boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/util/MessageFormatUtil.java"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"5abb0b59ba2b43451ddc8dad11fba26d430417e404c040d90ba28f5e91c5cfa8"}},{"ruleId":"D2","level":"warning","message":{"text":"GetBrokerConfigCommand.execute (cognitive 19): GetBrokerConfigCommand.execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, loops 7, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerConfigCommand.java"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"503c77b2408031e24becb96b4d5924c06092b4268d29789a1c3d0309fc4fd2be"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicQueueMappingManager.updateTopicQueueMapping (cognitive 18): TopicQueueMappingManager.updateTopicQueueMapping has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingManager.java"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"769d68f600a97657c47b508eeb271a32bdd77bfe83cfe05b9c6ee95ff30326ed"}},{"ruleId":"D2","level":"warning","message":{"text":"1.run (cognitive 18): 1.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 2, boolean chains 1, error handling 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/dledger/DLedgerRoleChangeHandler.java"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdfa86ff61de33c2513d23a43c2cd61ffcc1e3a0874529f08e6988eca408e73a"}},{"ruleId":"D2","level":"warning","message":{"text":"PopLongPollingService.cleanUnusedResource (cognitive 18): PopLongPollingService.cleanUnusedResource has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 4, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"90087c8749080d9cf3f6c9c4e0b9f550d9d888be435bb165dcf3352d863a241a"}},{"ruleId":"D2","level":"warning","message":{"text":"BatchSplittingMetricExporter.splitIntoBatches (cognitive 18): BatchSplittingMetricExporter.splitIntoBatches has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 4, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BatchSplittingMetricExporter.java"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f28c2127f0b1457307cee92822272b0cae21fe0b7bc5325129154020cca17e6"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerOuterAPI.getAllSubscriptionGroupConfig (cognitive 18): BrokerOuterAPI.getAllSubscriptionGroupConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1ab0d752419916d1aec509d93d24cb97c4f542ba0c89243197f45acfeb7b33f"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerOuterAPI.getAllTopicConfig (cognitive 18): BrokerOuterAPI.getAllTopicConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"04295c8d25f3424716a52d82e904da8cef78a1f34bbd0b868f9d31bddc224a7f"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerOuterAPI.processSendResponse (cognitive 18): BrokerOuterAPI.processSendResponse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, ternaries 4, loops 3, boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":1206}}}],"partialFingerprints":{"codehealthFindingId/v1":"942f7dd260c44a0ce3543292a930c90e313d59a728d8b5565ebde589eb659962"}},{"ruleId":"D2","level":"warning","message":{"text":"QueueLevelConsumerManager.autoClean (cognitive 18): QueueLevelConsumerManager.autoClean has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"314523a065af290ee98110f097444f0135d7bab848269d6780562d93cb0e9ecd"}},{"ruleId":"D2","level":"warning","message":{"text":"SendMessageProcessor.handleRetryAndDLQ (cognitive 18): SendMessageProcessor.handleRetryAndDLQ has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 3, ternaries 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d1c77d3202e47d8c4c370a11bb4b4a57a3e62de1ceb8265a884776363b606bd"}},{"ruleId":"D2","level":"warning","message":{"text":"SendMessageProcessor.sendBatchMessage (cognitive 18): SendMessageProcessor.sendBatchMessage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"8534b96ee2207b8271ab342d3b95a1ca8ea086a83afe3bd30a0f44d79385098a"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicQueueMappingUtils.findNext (cognitive 18): TopicQueueMappingUtils.findNext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"8291653fcc93869ead347db30d9d6017becf4039f0a8a0b1dddab7b0f7ef342f"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicQueueMappingUtils.makeSureLogicQueueMappingItemImmutable (cognitive 18): TopicQueueMappingUtils.makeSureLogicQueueMappingItemImmutable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d56d1e12b2d64799916adf7674bfbcb57cc66b2cb28605e41fcc65bb2a07c7c"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalFileOffsetStore.readOffset (cognitive 18): LocalFileOffsetStore.readOffset has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, error handling 3, match/switch 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1263a41cb17d7fe13cb98368cf5e4915d4e1624ca16f096adc86a349b4aa8c5"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQPushConsumerImpl.start (cognitive 18): DefaultMQPushConsumerImpl.start has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, match/switch 4, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java"},"region":{"startLine":923}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cdfe66b06f05330bdeecd59fb6e34609059b72138c2134442b4dba7dd31c969"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientInstance.sendHeartbeatToBrokerV2 (cognitive 18): MQClientInstance.sendHeartbeatToBrokerV2 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a9d76badd294fc0ddddd551e5bdf8e876627bdc61bc6abe827c78dee69ee1d9"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientAPIImpl.getAllSubscriptionGroup (cognitive 18): MQClientAPIImpl.getAllSubscriptionGroup has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":2972}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b5b47070c8b2ae637f38f567f16b3a5f5570fed26ed5b431a30e52d9aa7908"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientAPIImpl.getAllTopicConfig (cognitive 18): MQClientAPIImpl.getAllTopicConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":3068}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d1d4de5fb524480ff7678240d89b3483f3437abdee81ebb36c34d4000f6d66d"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractRocksDBStorage.shutdown (cognitive 18): AbstractRocksDBStorage.shutdown has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, error handling 6, boolean chains 1, loops 1 (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":"common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"d29350d3c9af9f2a01c8da3c7421a88a036940e466e73865e1a050c31f2cc471"}},{"ruleId":"D2","level":"warning","message":{"text":"BatchProducer.main (cognitive 18): BatchProducer.main has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 11, if/else 4, loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/benchmark/BatchProducer.java"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ad2c3892ac2a1d0e332557ddfd28212ed3e02de63d1f2294da0ba693af9ad65"}},{"ruleId":"D2","level":"warning","message":{"text":"ProducerProcessor.sendMessage (cognitive 18): ProducerProcessor.sendMessage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 3, boolean chains 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/processor/ProducerProcessor.java"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"93719698d6d23f34c003f819d76edc90d3c8dfc2a7b1d9cc426a6b3934b70e8b"}},{"ruleId":"D2","level":"warning","message":{"text":"BatchConsumeQueue.putBatchMessagePositionInfo (cognitive 18): BatchConsumeQueue.putBatchMessagePositionInfo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d6dd806c78a064bdcfc46caebe8e15e33b6e22c5d086f853890ca4338cca4f5"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageRocksDBStorage.scanRecordsForTrans (cognitive 18): MessageRocksDBStorage.scanRecordsForTrans has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 4, error handling 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"da5cd060057d5f848d1effb5a559cf2d39eba5055481d018d79cf33b5670e4e6"}},{"ruleId":"D2","level":"warning","message":{"text":"FlushRealTimeService.run (cognitive 18): FlushRealTimeService.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, error handling 2, loops 2, ternaries 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1583}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee5805d7a5b45e23cdce205f4f6441eeef603874e0b1c69c7fed1364bd396547"}},{"ruleId":"D2","level":"warning","message":{"text":"TieredMessageStore.getMessageAsync (cognitive 18): TieredMessageStore.getMessageAsync has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 4, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"815de4b9ea7d9569a0987b540d2a4d5a1aa0db771a36745039d999edda2fdf42"}},{"ruleId":"D2","level":"warning","message":{"text":"ClusterListSubCommand.printClusterMoreStats (cognitive 18): ClusterListSubCommand.printClusterMoreStats has cognitive complexity 18 (threshold 15). Drivers by points: loops 7, error handling 5, if/else 5, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb911ce38cbfee2facbb1c5c344989d3bcc94fda4da5f7c03c6c5c9b1048853"}},{"ruleId":"D2","level":"warning","message":{"text":"CommandUtil.fetchMasterAndSlaveDistinguish (cognitive 18): CommandUtil.fetchMasterAndSlaveDistinguish has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/CommandUtil.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cd66b9727fa71a1f1829705179fdc765d3d31ba4f06b0a53964f5e68d065294"}},{"ruleId":"D2","level":"warning","message":{"text":"AclAuthorizationHandler.comparePolicyEntries (cognitive 17): AclAuthorizationHandler.comparePolicyEntries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/authorization/chain/AclAuthorizationHandler.java"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f73afa43ffe075bf7095a6df79e1e20cd6035c92322e5a3e137312b68abc3bf"}},{"ruleId":"D2","level":"warning","message":{"text":"LiteManagerProcessor.getLiteClientInfo (cognitive 17): LiteManagerProcessor.getLiteClientInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 3, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"90022fbcc50db8db6a3f8cf4a70130e47a9ec8d12e4859bb370ff1afd2c1df33"}},{"ruleId":"D2","level":"warning","message":{"text":"PullMessageProcessor.composeResponseHeader (cognitive 17): PullMessageProcessor.composeResponseHeader has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 2, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"a10a2439210a98b5f021f12cb1cdf4856e03f991211f87a851673715b0c9488a"}},{"ruleId":"D2","level":"warning","message":{"text":"HookUtils.handleScheduleMessage (cognitive 17): HookUtils.handleScheduleMessage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/util/HookUtils.java"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"19319ee400561c5586dbd2dff60c07261c3953a9a6ac2736f635a6688f85a3c7"}},{"ruleId":"D2","level":"warning","message":{"text":"NettyRemotingClient.getAndCreateNameserverChannelAsync (cognitive 17): NettyRemotingClient.getAndCreateNameserverChannelAsync has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 3, error handling 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java"},"region":{"startLine":655}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c9aaf0f85a5257f7df0e55a1021f73f31bbc0bce237b13599d13beae31446c"}},{"ruleId":"D2","level":"warning","message":{"text":"1.onSuccess (cognitive 17): 1.onSuccess has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 2, match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cde11959cc7ad5ce62686857f8fdfb7537fe60c5c5ef0208cada9987d3bae75"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientInstance.cleanOfflineBroker (cognitive 17): MQClientInstance.cleanOfflineBroker has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 5, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0c883a713351f7e176cfa70459c8d8848c146a89a9eaa10df39d1814055203b"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientInstance.resetOffset (cognitive 17): MQClientInstance.resetOffset has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, error handling 5, boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":1355}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e37b23cf58b2d3a29b9b652d4d4075e5bc3712f57253773108557825a663dd7"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageBatch.generateFromList (cognitive 17): MessageBatch.generateFromList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/message/MessageBatch.java"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"0944a4fcf92a265b293c4dbdc37df373043b21307376a3a0fa2f12b7e863034f"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultTopAddressing.fetchNSAddr (cognitive 17): DefaultTopAddressing.fetchNSAddr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 2, boolean chains 1, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/namesrv/DefaultTopAddressing.java"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"26413128110e06a658cd9d57eeef808c6e4a02496bdd7eedbf78952d146edaca"}},{"ruleId":"D2","level":"warning","message":{"text":"ReplicasInfoManager.cleanBrokerData (cognitive 17): ReplicasInfoManager.cleanBrokerData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, error handling 3, loops 3, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"826f6b744201210d267ef4861351d0300e0c28b453f876c9c401fc60adf21dbd"}},{"ruleId":"D2","level":"warning","message":{"text":"3.run (cognitive 17): 3.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, error handling 5, loops 3, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/benchmark/TransactionProducer.java"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b84e8f5cb734da93fb0fee05406ac59d3e73f7f0041a874cc4b6f2f67506723"}},{"ruleId":"D2","level":"warning","message":{"text":"CompactionLog.getOffsetMap (cognitive 17): CompactionLog.getOffsetMap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, error handling 3, loops 3 (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":"store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"87464226a945619f024444e370d0ca81ba8baa116e15c4ae468e30ff5033ac3d"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMappedFile.flush (cognitive 17): DefaultMappedFile.flush has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, error handling 3, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"c59b7cd63c7df62de5c0a3c9ce0d6499a3ed6b767efb814b0ec01e92e185d6cd"}},{"ruleId":"D2","level":"warning","message":{"text":"CombineConsumeQueueStore.isMappedFileMatchedRecover (cognitive 17): CombineConsumeQueueStore.isMappedFileMatchedRecover has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/CombineConsumeQueueStore.java"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1e0ad6336a0fb973bb37cfdbb77f802b913e24c183da339e40af2f2f0fa1876"}},{"ruleId":"D2","level":"warning","message":{"text":"Timeline.scanRecordsToQueue (cognitive 17): Timeline.scanRecordsToQueue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, loops 3, boolean chains 2, error handling 2, ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/Timeline.java"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"872b895eace9c8c66443e55ecba89e42fae6f2bd59377eab802ed89a1c99cdeb"}},{"ruleId":"D2","level":"warning","message":{"text":"MappedFileQueue.deleteExpiredFileByOffset (cognitive 17): MappedFileQueue.deleteExpiredFileByOffset has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java"},"region":{"startLine":557}}}],"partialFingerprints":{"codehealthFindingId/v1":"692c014817f9b07fc50361b0c762991f1d3144cac593307c414ca96021002158"}},{"ruleId":"D2","level":"warning","message":{"text":"StoreStatsService.setPutMessageEntireTimeMax (cognitive 17): StoreStatsService.setPutMessageEntireTimeMax has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/StoreStatsService.java"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"17aca51ecc095aa9905d6e3e420dce5fd0fb075cce609e2918ca26b265a123a1"}},{"ruleId":"D2","level":"warning","message":{"text":"IndexStoreService.recover (cognitive 17): IndexStoreService.recover has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, error handling 3, loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/index/IndexStoreService.java"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"17d60c5814f02e5ba3be521c2898b371e7badffbb482280716914a467cd187c2"}},{"ruleId":"D2","level":"warning","message":{"text":"AuthorizationMetadataManagerImpl.validate (cognitive 16): AuthorizationMetadataManagerImpl.validate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ba332f83c9803dec04cc495e635361cf0a81c350341c8f3e1001041cfb4a048"}},{"ruleId":"D2","level":"warning","message":{"text":"PlainPermissionManager.getAllAclConfig (cognitive 16): PlainPermissionManager.getAllAclConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 4, boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/migration/v1/PlainPermissionManager.java"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"6767208172e6d76faf25ddf6b2c17a1f53fb80ed1955e2f504217569fb13bd8b"}},{"ruleId":"D2","level":"warning","message":{"text":"AclConverter.convertAcl (cognitive 16): AclConverter.convertAcl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/auth/converter/AclConverter.java"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"f71533437250833154e605a3b90962afb3b8cb78a53d583d73678fd60be0c7d6"}},{"ruleId":"D2","level":"warning","message":{"text":"RocksDBSubscriptionGroupManager.migrateFromSeparateRocksDBs (cognitive 16): RocksDBSubscriptionGroupManager.migrateFromSeparateRocksDBs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, error handling 6 (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":"broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5c15f2d8e480267de393d5864d424117302b7cb048265e7a22620f1e249fb34"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicRouteInfoManager.updateTopicRouteInfoFromNameServer (cognitive 16): TopicRouteInfoManager.updateTopicRouteInfoFromNameServer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, error handling 5, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicRouteInfoManager.java"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"10e48e17a4ef0ab4bb01181c1474f84b6c2ed5041c3b0c634279880dc40191c0"}},{"ruleId":"D2","level":"warning","message":{"text":"PopLiteLongPollingService.polling (cognitive 16): PopLiteLongPollingService.polling has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd75269a1fff83f87627c55943654b73b1f8ab4d90afacfd87221ea9e196d413"}},{"ruleId":"D2","level":"warning","message":{"text":"PopConsumerService.handleGetMessageResult (cognitive 16): PopConsumerService.handleGetMessageResult has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"388f9d2631c695679e348bb7dd52d01f6cbfa2327dff1d5b49b75c33f902bc9a"}},{"ruleId":"D2","level":"warning","message":{"text":"AdminBrokerProcessor.switchTimerEngine (cognitive 16): AdminBrokerProcessor.switchTimerEngine has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":3597}}}],"partialFingerprints":{"codehealthFindingId/v1":"284d3d2545b5fd229c7c92789a886372a83c50edd8ab25f7beb8a6c7c56f1721"}},{"ruleId":"D2","level":"warning","message":{"text":"AdminBrokerProcessor.updateBrokerConfig (cognitive 16): AdminBrokerProcessor.updateBrokerConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, ternaries 4, error handling 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1129}}}],"partialFingerprints":{"codehealthFindingId/v1":"272d51104a847f1bab11fc3a764b1de16f0481570ff2f9abb4c107b9ec98d447"}},{"ruleId":"D2","level":"warning","message":{"text":"PopBufferMergeService.run (cognitive 16): PopBufferMergeService.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, error handling 3, loops 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"564bc7dbe32b4c06584bc8677e1a7a10d7e00dd3daa7ce6b756fdba078fd05a1"}},{"ruleId":"D2","level":"warning","message":{"text":"PopLiteMessageProcessor.popByClientId (cognitive 16): PopLiteMessageProcessor.popByClientId has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 3, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopLiteMessageProcessor.java"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf116d3acdfb18fd5dc561b23647af322e55d4a1723ff507a95a1db2aa935188"}},{"ruleId":"D2","level":"warning","message":{"text":"ScheduleMessageService.start (cognitive 16): ScheduleMessageService.start has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 2, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdc2af1811d9834fa484d4977d3c3b470b57cbd3900782875955fee227ac86c5"}},{"ruleId":"D2","level":"warning","message":{"text":"SlaveSynchronize.syncTopicConfig (cognitive 16): SlaveSynchronize.syncTopicConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, loops 3, boolean chains 2, error handling 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/slave/SlaveSynchronize.java"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"aff4eb8e80dcc7d6a176d903966a4c38723cf4b81906274019c13fe84a4560e6"}},{"ruleId":"D2","level":"warning","message":{"text":"TransactionalMessageRocksDBService.checkTransRecordsStatus (cognitive 16): TransactionalMessageRocksDBService.checkTransRecordsStatus has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, error handling 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/transaction/rocksdb/TransactionalMessageRocksDBService.java"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"d873cd9c4ad12a2775be05e31b817bf0a057953200ce5f8e6899cea261db2c64"}},{"ruleId":"D2","level":"warning","message":{"text":"NettyRemotingClient.closeChannel (cognitive 16): NettyRemotingClient.closeChannel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, error handling 3, boolean chains 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"6114d0e5614f6961cf1e4f5bf7d89c3898c0c794a932d518725058525076c09b"}},{"ruleId":"D2","level":"warning","message":{"text":"RemoteBrokerOffsetStore.persistAll (cognitive 16): RemoteBrokerOffsetStore.persistAll has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, error handling 4, loops 3, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e9a896e1c806de3358445314f86e0f198f5e33a34ba4d9a6b593fbb6a55e0ce"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientInstance.sendHeartbeatToAllBrokerV2 (cognitive 16): MQClientInstance.sendHeartbeatToAllBrokerV2 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":751}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a7d579d7b126276a85e7d5d935dacba25f505f94796a01644cb24a0bb28b31c"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientAPIImpl.sendMessage (cognitive 16): MQClientAPIImpl.sendMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, ternaries 3, boolean chains 2, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a1d2ba71a1a40b85d821818c21024c8de300669e31a4c1fa7bb10c9fea37c7d"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultJoranConfiguratorExt.findConfigFileURLFromSystemProperties (cognitive 16): DefaultJoranConfiguratorExt.findConfigFileURLFromSystemProperties has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, error handling 6, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/logging/DefaultJoranConfiguratorExt.java"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"17b74d16d21d7510351a184f751111435f12186f858618f5e1726e107ddb6a87"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerContainerStartup.parseCmdLineToConfig (cognitive 16): BrokerContainerStartup.parseCmdLineToConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, error handling 3, loops 2 (nesting depth added 3). 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":"container/src/main/java/org/apache/rocketmq/container/BrokerContainerStartup.java"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa5f5dd5e6969be43bb67e4e6a8a866d88db86bf0634c92e90e71a441cfff15f"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultElectPolicy.tryElect (cognitive 16): DefaultElectPolicy.tryElect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, ternaries 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/elect/impl/DefaultElectPolicy.java"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"38b30c42f5a17812204c64ecd3d6639b724fd73878c534b5bbcfc4327f39d6bb"}},{"ruleId":"D2","level":"warning","message":{"text":"ReceiveMessageResponseStreamWriter.writeAndComplete (cognitive 16): ReceiveMessageResponseStreamWriter.writeAndComplete has cognitive complexity 16 (threshold 15). Drivers by points: error handling 8, if/else 4, loops 3, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/ReceiveMessageResponseStreamWriter.java"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"5144e2a7e4d8d4c32fae07d26b7629e71e7f84f39defeeb37f0a408917bc9b86"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerProcessor.filterPopResult (cognitive 16): ConsumerProcessor.filterPopResult has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4, error handling 3, match/switch 3, ternaries 3, loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/processor/ConsumerProcessor.java"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f93bdb5498ecef6c4164565a449caefb629303e47214981d5a24fe895d89ad7"}},{"ruleId":"D2","level":"warning","message":{"text":"AutoSwitchHAClient.run (cognitive 16): AutoSwitchHAClient.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, error handling 2, match/switch 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAClient.java"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"0233be28d5e245ec0850f7279a5cffdb73e86cedb6c66aec97bc8c296797e948"}},{"ruleId":"D2","level":"warning","message":{"text":"AutoSwitchHAService.truncateInvalidMsg (cognitive 16): AutoSwitchHAService.truncateInvalidMsg has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 3, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eb33babddc11855c525803b3cb8be16223ea9a87bcc7135931653236daea31e"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractHAReader.read (cognitive 16): AbstractHAReader.read has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, error handling 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/io/AbstractHAReader.java"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf74d738eef52a3085865e9afa3b35df6d4b59bbe67c0e1797530b480f1af4b8"}},{"ruleId":"D2","level":"warning","message":{"text":"IndexService.load (cognitive 16): IndexService.load has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, error handling 6, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/index/IndexService.java"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cfa0f12691e12fa686c37c2ffb821ae62a1707dc764f5f51c414d8d56a54baa"}},{"ruleId":"D2","level":"warning","message":{"text":"BatchConsumeQueue.correctMinOffset (cognitive 16): BatchConsumeQueue.correctMinOffset has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, error handling 3, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fe3b1b15c394c9a57b03c05ad4c6442f74f9e26dc5821fd39302a49443e30cb"}},{"ruleId":"D2","level":"warning","message":{"text":"CombineConsumeQueueStore.\u003Cinit\u003E (cognitive 16): CombineConsumeQueueStore.\u003Cinit\u003E has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/CombineConsumeQueueStore.java"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"0140b80d5eb43f7e67a737f0387d8171bbe8841272bfcd6c5025628c654926d2"}},{"ruleId":"D2","level":"warning","message":{"text":"RocksDBConsumeQueueOffsetTable.iterateOffsetTable2FindDirty (cognitive 16): RocksDBConsumeQueueOffsetTable.iterateOffsetTable2FindDirty has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 1, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueOffsetTable.java"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8660f7c15c15d6521e20ad41de15dff168794f172b9ae61107bb95c2c32bb86"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerMessageStore.reviseQueueOffset (cognitive 16): TimerMessageStore.reviseQueueOffset has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 2, error handling 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"259b0cda495677555a501609131ca3c22986183c26bd8a73c6deb8196339a713"}},{"ruleId":"D2","level":"warning","message":{"text":"CommitLog.getConfirmOffset (cognitive 16): CommitLog.getConfirmOffset has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, ternaries 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"353849fe1db8af9e721054c0316c3a9b59ba810bda633055e4e1918d4364e960"}},{"ruleId":"D2","level":"warning","message":{"text":"StoreStatsService.findPutMessageEntireTimePX (cognitive 16): StoreStatsService.findPutMessageEntireTimePX has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8, if/else 7, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/StoreStatsService.java"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"952722d0efae969e781a7dad4cbda82180cee30f1d4bc3cdaf31beb165dd5fa6"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageStoreFetcherImpl.getMessageFromCache (cognitive 16): MessageStoreFetcherImpl.getMessageFromCache has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreFetcherImpl.java"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e663c5f80bf931b330d984e677632508f753093d9f77997851389cd3141b8e4"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQAdminExtImpl.consumed (cognitive 16): DefaultMQAdminExtImpl.consumed has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":1533}}}],"partialFingerprints":{"codehealthFindingId/v1":"d08d8d017a666b2a7223b73c43deb1a82d2511ab620112b104a9364f7d1627ff"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BrokerConfig: TooManyMethods \u2014 492 methods. 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":"common/src/main/java/org/apache/rocketmq/common/BrokerConfig.java"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f149cb49c37357a297bcf5a2c0f1ed2c439dae53c4885816dcbc6c1446387ce"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MessageStoreConfig: TooManyMethods \u2014 451 methods. 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":"store/src/main/java/org/apache/rocketmq/store/config/MessageStoreConfig.java"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"80cd9e156ee10d26eff2f017e317956065eb35c8b7dd012aec05f0fcd59dfc03"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ProxyConfig: TooManyMethods \u2014 322 methods. 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":"proxy/src/main/java/org/apache/rocketmq/proxy/config/ProxyConfig.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef2c95666688311cf31f56a569492e34fb6d8455daf92c6e591d56f49ea4acb5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BrokerController: TooManyMethods \u2014 188 methods. 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":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5446cdb844350d3fca7fffeab127d64cb41e6d43d4a8fbde04b8a736d05a5fd"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMessageStore: TooManyMethods \u2014 176 methods. Most of these members implement store.MessageStore (117 of 167 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c21fcd7adfb611f630ce37c9cda91e0965a71be17e504c399a32ab5d356122b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: impl/MQClientAPIImpl.java: FileTooLong \u2014 2872 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: MQClientAPIImpl (275-3898). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a76283446baef32e74d780c5be7e97047b15cf544f4e3690fc795b14738dd22"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: processor/AdminBrokerProcessor.java: FileTooLong \u2014 2728 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: AdminBrokerProcessor (248-3656). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcc733882c9da1084684ade825a774f13c64d30dec45dd93a562ad335748400b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MQClientAPIImpl: TooManyMethods \u2014 159 methods. 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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"639695f5f4a5b9039be9a69f23abe38f2c5d084226e82318618e3f2d3c05aaaa"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQAdminExt: TooManyMethods \u2014 153 methods. Most of these members implement admin.MQAdminExt (112 of 126 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExt.java"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eb33b9aeaa62ed19f0c097cafe410cbcee0977cea62367e847dcbaddd20cfe2"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQAdminExtImpl: TooManyMethods \u2014 151 methods. Most of these members implement admin.MQAdminExt (112 of 127 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"67b4107efe30156eb36f69a05e045ea3018d71a45d4a1b3fbb2d116caee52ff1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: store/DefaultMessageStore.java: FileTooLong \u2014 2055 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: DefaultMessageStore (125-3286). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"39eccb0a707697850b13146119c67dead129abc81f5396dede817b2dff5ef8bd"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AbstractPluginMessageStore: TooManyMethods \u2014 121 methods. Most of these members implement store.MessageStore (112 of 114 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/plugin/AbstractPluginMessageStore.java"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"af84f6d4142583ee729d066305a9fa5d1ca9df4c0b91e8fb6d38f275a56a5a62"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQProducer: TooManyMethods \u2014 120 methods. 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":"client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4f186d79edf7cfadd51a0ff361877860b8a785b55d3240262dbcff9a09f10f3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: broker/BrokerController.java: FileTooLong \u2014 1817 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: BrokerController (196-2825). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"819386426c98c2133c97d52f838197bc6b18c546ef61260ce6c5f93a2e3b5cfb"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQPushConsumer: TooManyMethods \u2014 102 methods. 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":"client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"717e277be9f834a0d933b07b6338f42d6ece8abf56bddabebcef92d91850ffec"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AdminBrokerProcessor: TooManyMethods \u2014 101 methods. 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dca0e633f63a053f1a310796f945760d0412bcc2ebadac8aad659b0c9702dd8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQProducerImpl: TooManyMethods \u2014 98 methods. 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":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"260793577030fc500c8de267af4ab09c4944d52656e9d36ea45b1f84abb8d8cf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: store/CommitLog.java: FileTooLong \u2014 1606 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: CommitLog (77-2580). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"61d9d4264c281b7d3bea4bfc398b600d5c341c26c943ad026ec5d094b34ecba0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: admin/DefaultMQAdminExtImpl.java: FileTooLong \u2014 1488 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: DefaultMQAdminExtImpl (130-2108). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a75a493cfd64967d9d39e43a6f2260c476af1cb62fe05c6937c058dbc96a8a4b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQPushConsumerImpl: TooManyMethods \u2014 88 methods. 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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"15545121242691b05b8c3b8ce6125e8717579b1f1b05bfc097b96795ef84cafc"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TimerMessageStore: TooManyMethods \u2014 87 methods. 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":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b0bbdc891c7a2bdba56e6ce40e618b4b59821add6763895c63fc1a682db3ebb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: timer/TimerMessageStore.java: FileTooLong \u2014 1440 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: TimerMessageStore (79-2121). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aebbdcfeb8a30a9e95e80187236e97d4a76589d760326cc54380bc3b5b1fbb3d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultLitePullConsumer: TooManyMethods \u2014 86 methods. 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":"client/src/main/java/org/apache/rocketmq/client/consumer/DefaultLitePullConsumer.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c99e45a5e3aed8e2ebc0604c1fba909609c1354c6453257e4552813cdf1a21a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MessageStoreConfig: TooManyMethods \u2014 82 methods. 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/MessageStoreConfig.java"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c4ca7694484d9efb42565de229884170a3123a56439fc40cbddbdc2eb6b3650"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultLitePullConsumerImpl: TooManyMethods \u2014 81 methods. 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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"02501c56f952a267c83d8eff619fcf18dc9b3a69003d5f08942b6be115cee821"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: producer/DefaultMQProducerImpl.java: FileTooLong \u2014 1304 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: DefaultMQProducerImpl (101-1895). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d39fb845d6f970badaaef2f6e81f73a46bd288362490bea14318336fa85b8eeb"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ClientConfig: TooManyMethods \u2014 78 methods. 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":"client/src/main/java/org/apache/rocketmq/client/ClientConfig.java"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9b3f41a869e93222924be6077f33edf434a76ff26f7949495da50e1ce4120d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: common/BrokerConfig.java: FileTooLong \u2014 1254 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: BrokerConfig (28-2557). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/BrokerConfig.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"90428952e1e74098a0bad0351d6c49b8b28207f353d42d7c07c90e5b60a7f90c"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMappedFile: TooManyMethods \u2014 73 methods. Most of these members implement logfile.MappedFile (41 of 60 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"582adbb1f66922a8464a72275a881689f3bdac9329c4d2786caed4d518e5097b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CommitLog: TooManyMethods \u2014 72 methods. 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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"e17a1ab060b77a7243f480f230608aea919a26bcb9c1440efe1a23332ad71ae5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: config/MessageStoreConfig.java: FileTooLong \u2014 1195 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: MessageStoreConfig (27-2392). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/config/MessageStoreConfig.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4476f99fd9aa6f2f879be175d028e50226bc3d2cdcd259d5107180bcf4aa471a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQPullConsumerImpl: TooManyMethods \u2014 70 methods. 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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"54d0d77cd795055a5a633e8a78dad99716ac2d38834649a5864e242cbfad9f99"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: out/BrokerOuterAPI.java: FileTooLong \u2014 1166 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: BrokerOuterAPI (162-1633). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"322e1f1cbb58696e56183f7cc39cc0cb1d070c26388da37d38f935958393cb5e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MQClientInstance: TooManyMethods \u2014 69 methods. 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":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9f252b67eb805ee1c75b69d0a369b445ab3ae6a7e84c8315c24f08ef20e3934"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BrokerStatsManager: TooManyMethods \u2014 67 methods. 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":"store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"a44c475bccf832eb7300d8d3171fed06803f555222b2178e1038359c6502edd5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BrokerOuterAPI: TooManyMethods \u2014 66 methods. 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":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1de3830b18673bd32e0c15a6caac2b979054ad43f93667a053601df3a9d1853"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SendMessageContext: TooManyMethods \u2014 65 methods. 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":"broker/src/main/java/org/apache/rocketmq/broker/mqtrace/SendMessageContext.java"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4fc89344479aa21ba447ad0b8f453050f5963583a931e6d8bea88be3d352f74"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQPullConsumer: TooManyMethods \u2014 65 methods. 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":"client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPullConsumer.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bcfc0ee762db387a83eda9b5180466045f25f29e2d509b10d1941f34d3055e6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: consumer/DefaultMQPushConsumerImpl.java: FileTooLong \u2014 1069 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: DefaultMQPushConsumerImpl (97-1601). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d014da8f470d66156658bd4c0b98adcb290dba774fda6607554ca6f63aef23a6"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RemotingCommand: TooManyMethods \u2014 64 methods. 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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa57b5405e6ab8bdff59802cd0caf3d7fe2b7ca0b686dd7cd17f0c7b4223e476"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BatchConsumeQueue: TooManyMethods \u2014 63 methods. 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":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f04646f92672f72e13f2ce7d29b3b447533390f3e4c23e1d10e0422da944752"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: factory/MQClientInstance.java: FileTooLong \u2014 1004 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: MQClientInstance (96-1540). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7de29f6f04353555f50b549f02458d14153af0e4d70c013fe884dc1b33fcbf20"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ControllerConfig: TooManyMethods \u2014 60 methods. 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":"common/src/main/java/org/apache/rocketmq/common/ControllerConfig.java"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"5734b1bce56ca215079b7e333f04d65c9692da41c21cb985132b545bb10683f2"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MappedFileQueue: TooManyMethods \u2014 58 methods. 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":"store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddff1f52288f3747e7945073d31b6e1ce76965736c017f4264c3faa36703f6f4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: UtilAll: TooManyMethods \u2014 55 methods. 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":"common/src/main/java/org/apache/rocketmq/common/UtilAll.java"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6d0aeba19d44980178a7510b506aab6196d49b01afa91596b0f0e5cbf944a63"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ConsumeQueue: TooManyMethods \u2014 55 methods. 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":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"3565ce1dbd883b13bc4c6d3aa9a88b29d037d4f1b9aa797510fa52f8a78e5d60"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AuthConfig: TooManyMethods \u2014 54 methods. 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":"auth/src/main/java/org/apache/rocketmq/auth/config/AuthConfig.java"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4d3ebfd6b13457860a635aaa0e2e774305a618f9aa45034d2c7de99903a45c0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: config/ProxyConfig.java: FileTooLong \u2014 864 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ProxyConfig (41-1621). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/config/ProxyConfig.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"94c16c83625d728dc0c65cccaf7866c9c5376e6a4e5fd46199811a75844b20c6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: netty/NettyRemotingClient.java: FileTooLong \u2014 841 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: NettyRemotingClient (98-1222). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1af857f7173d2a0260af924fa48a155d1ce6b1d8ceb35d66f0ff99370c459ec9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: consumer/DefaultLitePullConsumerImpl.java: FileTooLong \u2014 836 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: DefaultLitePullConsumerImpl (79-1321). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f88b10b6f9e9ad64bc632a20ec0a6ef78e73beec8a76b5cc56566c8cfb24848e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: routeinfo/RouteInfoManager.java: FileTooLong \u2014 836 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: RouteInfoManager (68-1114). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"586a5c5048567989bb85fa551a4d828d02665288fab9a0454984a866d924ad65"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: store/ConsumeQueue.java: FileTooLong \u2014 830 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ConsumeQueue (48-1284). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"636f542956be0cd7391c0f83ea88a0e1f36dd3b958625d86248b19d421cd5938"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ConsumeMessageContext: TooManyMethods \u2014 49 methods. 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":"broker/src/main/java/org/apache/rocketmq/broker/mqtrace/ConsumeMessageContext.java"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a5c37233b07129c1837fb664fad22b86fd46477c395c192b1a69bfb3246c659"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: processor/PopMessageProcessor.java: FileTooLong \u2014 816 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: PopMessageProcessor (102-1127). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"abacf24b1f75a46b416f15432ce092c7439605fd8226b421197c333f872bb5f8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: queue/BatchConsumeQueue.java: FileTooLong \u2014 792 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: BatchConsumeQueue (46-1209). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"132c3b122a89fb90e97a0048efb56668d38da82ccc95aca11b83fd0c3d4bab2e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: kv/CompactionLog.java: FileTooLong \u2014 769 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: CompactionLog (71-1149). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d11b641d593b18e6b13e4fb6aef8752429771e76100465135a49ad4cbea6371a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MessageExt: TooManyMethods \u2014 46 methods. 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":"common/src/main/java/org/apache/rocketmq/common/message/MessageExt.java"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"0850404b1643869404cc21a05db4113a794283f54777ed2f4bf62ba0f2b6fd5b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMessagingProcessor: TooManyMethods \u2014 46 methods. Most of these members implement processor.MessagingProcessor (37 of 42 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/processor/DefaultMessagingProcessor.java"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"9952c79816890b09e997e60a8928e40d1b191e46930e801702ebdf4b8aa6d6b3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ReplicasManager: TooManyMethods \u2014 45 methods. 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":"broker/src/main/java/org/apache/rocketmq/broker/controller/ReplicasManager.java"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"153c36d15bad09b9d294ec38a2d85241e95acd25113a1932dc35a1d6c593f1e6"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TopicConfigManager: TooManyMethods \u2014 45 methods. 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":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"245b9d750efa9b1d0e895f8782dbb2b544d5634411e401b56754ece10c29acbf"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MixAll: TooManyMethods \u2014 45 methods. 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":"common/src/main/java/org/apache/rocketmq/common/MixAll.java"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6726a58b88140970fb8cbe43b7a65e08c763b24c0acb0ff21db28d70aa87d98"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AbstractRocksDBStorage: TooManyMethods \u2014 45 methods. 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":"common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b061b2f73c57a7345dbe72739f5d288c36b99bdd5ed43775ce6d944d9b209a5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NamesrvConfig: TooManyMethods \u2014 45 methods. 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":"common/src/main/java/org/apache/rocketmq/common/namesrv/NamesrvConfig.java"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"0068a34db7816469bd444c632b9dbbca4e0ad09586347e151954c1d607de605c"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SubscriptionGroupConfig: TooManyMethods \u2014 45 methods. 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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/subscription/SubscriptionGroupConfig.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"f77a85f84364684b3454fe1779b4c6911a959174b6599b2de7938f714b09e5af"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: dledger/DLedgerCommitLog.java: FileTooLong \u2014 747 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: DLedgerCommitLog (62-1135). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a78416cae0bf18ce379fcb618abde18c560adbfb2b13ffce15cfaf49d4a15294"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NettyBridgeLogger: TooManyMethods \u2014 44 methods. 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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyLogger.java"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b7bc170c9454bc223ffbfb133b8f5f5a69641c0d85d1a8f0fb2fed749c8bf67"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ConsumeQueueStore: TooManyMethods \u2014 44 methods. 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":"store/src/main/java/org/apache/rocketmq/store/queue/ConsumeQueueStore.java"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"331ab34ee70172c22939ad74f4c14140e55ef8f4c6c07f1d97881c86851df10e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: logfile/DefaultMappedFile.java: FileTooLong \u2014 721 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: DefaultMappedFile (64-1122). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"47e0c1b0ce1fce18c27d1924603cea0cd95aae1398b790742aa2931ff5a3e465"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RocksDBConsumeQueue: TooManyMethods \u2014 43 methods. 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":"store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueue.java"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2bea440309ea5a86e78cbcc3724ea3767ddb204dd80f0b6b61f0af08e2391f3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RocksDBConsumeQueueStore: TooManyMethods \u2014 43 methods. 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":"store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueStore.java"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9b57a85ca1f0a9402f7c3817035cf8a744d990c10c6df10438196397b4a6303"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: admin/DefaultMQAdminExt.java: FileTooLong \u2014 712 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: DefaultMQAdminExt (83-1044). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExt.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b9d451ec1ed85d87e6765f02573a355850cca626d0e8f7cfbe9ec08100f4542"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Message: TooManyMethods \u2014 42 methods. 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":"common/src/main/java/org/apache/rocketmq/common/message/Message.java"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"21649821bb17a1601865d471318d0ba45bd5558039963f90115c432be8460b08"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SimpleChannelHandlerContext: TooManyMethods \u2014 42 methods. 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":"proxy/src/main/java/org/apache/rocketmq/proxy/service/channel/SimpleChannelHandlerContext.java"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b5832ce7f1a5f412d72fa8aca9034592f344bca0674df052f91beb96cafabf4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NettyClientConfig: TooManyMethods \u2014 41 methods. 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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyClientConfig.java"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"78f6548cec4a783fbb4b897966ad780678ff3897615acf98983c8283871f9099"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: StoreStatsService: TooManyMethods \u2014 41 methods. 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":"store/src/main/java/org/apache/rocketmq/store/StoreStatsService.java"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b497814966ee8befdc94eca539524942de92bf85b9d27dcfed4e6ab3efcf38e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DLedgerCommitLog: TooManyMethods \u2014 41 methods. 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":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"24f27f5dadd480985b8f93c08bf52de4212c0c5158b4d6f514ea1e19fb059962"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CombineConsumeQueueStore: TooManyMethods \u2014 41 methods. 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":"store/src/main/java/org/apache/rocketmq/store/queue/CombineConsumeQueueStore.java"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"f283f1e6688ff9b1abd9184ca3f49ca30ba36c30a4c55bce9b316b4993cb3680"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RocksDBConsumeQueueOffsetTable: TooManyMethods \u2014 41 methods. 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":"store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueOffsetTable.java"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5bd19cc145d0d99f76692b473966cd3b6ade78edc793e72802f42d9387fc38e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SubscriptionGroupManager: TooManyMethods \u2014 40 methods. 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":"broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c9a6f717cc55d15d497cfb49f6866bf8e7985a3577df82cc34347cf7d45dd10"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RebalanceImpl: TooManyMethods \u2014 40 methods. 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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cdf7887a0a42f363834f86de9ee5b1f83071612d30d9ef43056ca4134506f40"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RouteInfoManager: TooManyMethods \u2014 40 methods. 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":"namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"7243c2dec9aec9ea78424f2d70b15bacb182778373f9e4f432e65a58a31ae996"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: processor/PullMessageProcessor.java: FileTooLong \u2014 659 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: PullMessageProcessor (83-917). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b35a897e511eb5b49a8c87e7992ed242a64c65e00319c101e371d2e1c74fd86"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ClientConfig: TooManyMethods \u2014 39 methods. 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":"openmessaging/src/main/java/io/openmessaging/rocketmq/config/ClientConfig.java"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"330636f7b37aabcdea3e259a9905f41d7fc6bf33eb73b6f195380b3c8239a1b5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NettyRemotingClient: TooManyMethods \u2014 38 methods. 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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d27c95b420613aaa25d73eda858285612971cc1755c87899f647e52a1d030d2"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NettyServerConfig: TooManyMethods \u2014 38 methods. 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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyServerConfig.java"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1ce64e930920cf5ba58daf19db2f559d01757c391dd2e11502e29b61d502453"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TieredMessageStore: TooManyMethods \u2014 38 methods. 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"962129306672c46eafe97e74e5336b7d08fc1f5160152f8c84a64ef656f11957"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: FlatMessageFile: TooManyMethods \u2014 38 methods. 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/FlatMessageFile.java"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"db758029dcb4f46290ddbd4608083f69b3f91d43751eaf655098ca162438b686"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: metrics/BrokerMetricsManager.java: FileTooLong \u2014 629 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: BrokerMetricsManager (120-881). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"09367008e4ef284d6ff1762cf8545da8b60b46be29d7d30b443b8c3521c737a9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: processor/PopBufferMergeService.java: FileTooLong \u2014 623 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: PopBufferMergeService (47-949). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"14788792788e1c852e42acbc5b522005a7db7a745c14fa5ff8e47179a0654020"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SendMessageRequestHeaderV2: TooManyMethods \u2014 37 methods. 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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/SendMessageRequestHeaderV2.java"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9bf96a783b95b833939c7abafcf4a792c58a24aa9ad0ac0e9b52c62f10d6f48"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: stats/BrokerStatsManager.java: FileTooLong \u2014 591 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: BrokerStatsManager (45-827). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"52405d2fc955f454020d62fdbcfc3b77b54cbd4e2fc239fe1c56a5796a4a8158"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: store/MappedFileQueue.java: FileTooLong \u2014 590 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: MappedFileQueue (40-963). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e97e4cdd4b6d4b26c6422d507bf068316eb5411f02d0bc419bc9b698ca09d17"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: consumer/DefaultMQPullConsumerImpl.java: FileTooLong \u2014 584 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: DefaultMQPullConsumerImpl (74-882). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"29cd79b870191179dc80676c8cf6852068f00a8141a461cfdb2ae6054b35f69f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BrokerMetricsManager: TooManyMethods \u2014 35 methods. 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":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"25500d88c43d8d3016ecb3d1ad77a1989b4fd9859e2fd14d62400bda5dc70ecc"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ConsumerOffsetManager: TooManyMethods \u2014 35 methods. 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":"broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"b42d185b181885fee0ff98fe415d5d672db507dba6803c0a8121c437665d115a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PullMessageRequestHeader: TooManyMethods \u2014 35 methods. 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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"22c595370f8427e36eef3f5081c020505a8c4d222acecbc5b65e99e9930d1f1b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CompactionLog: TooManyMethods \u2014 35 methods. 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":"store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"11d867c9a877810768ef18eeb5a0dee6ac4891bacc1c433acaa27c3c1a60db03"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: producer/DefaultMQProducer.java: FileTooLong \u2014 580 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: DefaultMQProducer (70-1491). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"daba02ab3754b2c7dbedb73eb19a45e6c1cefaf8574742ce010e13180d217d76"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: schedule/ScheduleMessageService.java: FileTooLong \u2014 573 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: ScheduleMessageService (66-858). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ee294c49d0afa43c688475097d42bcc32fdb908cbd0dfda5f75b73759af26b0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: queue/ConsumeQueueStore.java: FileTooLong \u2014 573 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ConsumeQueueStore (61-909). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/ConsumeQueueStore.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc03605c4228411040d83709d3ea8a84147faaa2b56f9b859ebc4fe36c91b545"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AutoSwitchHAService: TooManyMethods \u2014 34 methods. 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":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd75db9ed06fc7c937a276875f772116659e961d350e70c2b5a857d1118c412a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PopCheckPoint: TooManyMethods \u2014 34 methods. 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":"store/src/main/java/org/apache/rocketmq/store/pop/PopCheckPoint.java"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d29559f27e55f6b23b04ca9e2f845dc079ee26422561683e486ff9061c0be9e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: pop/PopConsumerService.java: FileTooLong \u2014 563 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: PopConsumerService (72-852). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"82b628381870c60b18d6f0ac404100907af76b454d3ddd593329631f45a80beb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: mqclient/MQClientAPIExt.java: FileTooLong \u2014 551 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: MQClientAPIExt (97-771). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"800f960e0deefc735936212d14a825281c2431e23c5068be0d862c524451275a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ProcessQueue: TooManyMethods \u2014 33 methods. 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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"6db0cc6858fec0cc44f6f8818d458b88830cd0e2a71d9365e458a8f76ce2acbc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: controller/ReplicasManager.java: FileTooLong \u2014 543 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ReplicasManager (67-886). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/controller/ReplicasManager.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccded2a3971b6675177f1f83d9547381ffe63e1cb4ba3e4d416585b3662f4e1c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: netty/NettyRemotingServer.java: FileTooLong \u2014 540 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: NettyRemotingServer (94-832). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingServer.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3da1ce04df5172d728d23b1ac5a726bae82d37aa0f1f72a2a66c058d0e566aa"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: processor/SendMessageProcessor.java: FileTooLong \u2014 536 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: SendMessageProcessor (82-735). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2034a91d7783d9b9a60d34afbd1bd5f070c1d1954bda51d37f5e5fbcfbf1a0d9"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NettyRemotingServer: TooManyMethods \u2014 32 methods. 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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingServer.java"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"67db8d8875c05114d2fba9ea8f50736cbaf2ec20c71873cce3eb85258d370235"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DispatchRequest: TooManyMethods \u2014 32 methods. 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":"store/src/main/java/org/apache/rocketmq/store/DispatchRequest.java"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"912520326328482f33b1c6a7c13aa89851cc3088c253b45495eb4325155bf17b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: processor/PopReviveService.java: FileTooLong \u2014 532 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: PopReviveService (67-732). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"210cccfc61a884c7e088add5882e0e28836fc68fcf969bf0c73f8b30c9957800"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: topic/TopicConfigManager.java: FileTooLong \u2014 531 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: TopicConfigManager (63-803). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"52c75d6905dc4ae403aa006da999c634cb7b225615508826282b171bfa657d33"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MQClientAPIExt: TooManyMethods \u2014 31 methods. 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":"client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"033d9158c868116c1cbe5d6095c9a1e390b759170e82da5af6a1503c638810a3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TopicConfig: TooManyMethods \u2014 31 methods. 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":"common/src/main/java/org/apache/rocketmq/common/TopicConfig.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"83ca348d015259ea41146ecb41ec5852290f87c7287fb32f13611dddf4f415b9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: consumer/RebalanceImpl.java: FileTooLong \u2014 515 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: RebalanceImpl (48-800). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"033304ad21f065494af638f932a29e09eaceb65ca944f63da8f4e2b2ff669994"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: config/AbstractRocksDBStorage.java: FileTooLong \u2014 514 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: AbstractRocksDBStorage (60-764). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f7ad78f5e11ef5ad609ac2e74740020e27a8ea5318a30968af9dc0dfbfff21d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: queue/TransactionalMessageServiceImpl.java: FileTooLong \u2014 508 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: TransactionalMessageServiceImpl (54-758). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e37a049233a1eb108bc5c27808953f6ea1dbcd0d94d850dadb740bdfb98671d1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: netty/NettyRemotingAbstract.java: FileTooLong \u2014 502 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: NettyRemotingAbstract (77-822). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"20882c5f920d883b69f5b7be0740d46d71786136673541d058bb3a5d175842da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:1169-1189 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:1231-1251 \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 \u0060store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:1169\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":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":1169}}}],"partialFingerprints":{"codehealthFindingId/v1":"850aea5a506215e1948233fc0ad8db3e83bea79498ac7658781214bb91d4239c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java:356-376 | store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:1213-1233 \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 \u0060store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java:356\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"f97939d427896ea0a084ccb3c6d9ce578634f22f2c6d2ebd67dabe274586d5f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/message/MessageDecoder.java:235-252 | common/src/main/java/org/apache/rocketmq/common/message/MessageDecoder.java:349-368 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060common/src/main/java/org/apache/rocketmq/common/message/MessageDecoder.java:235\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":"common/src/main/java/org/apache/rocketmq/common/message/MessageDecoder.java"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1e80c15871539c00b26ed82ea2f8091a0776845337cd328056de363601a36e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:614-631 | store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:758-775 \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 \u0060store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:614\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":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"84190c981a1347b58f5ac8984403c9f6d53fee217be3d13196fd73e32224464c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/MessageExtEncoder.java:64-81 | store/src/main/java/org/apache/rocketmq/store/MessageExtEncoder.java:89-106 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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":"store/src/main/java/org/apache/rocketmq/store/MessageExtEncoder.java"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"d01e4933d8add7d9c0bd0b46fdff5b0edaca446c39e6024687fb06f2bd637698"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:281-297 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBTopicConfigManager.java:247-263 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:281\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":"broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d5c9369a3e6f95953d45913b768ab8f92e4d351cb9291170e240db8ca88fa70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:418-434 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:458-474 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:418\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0941de0472d3126834212a3f271758fb0be766e9be1bde1e31fd6faf63cbb25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/RemotingClient.java:56-72 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/RemotingProtocolServer.java:274-290 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/RemotingClient.java:56\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":"remoting/src/main/java/org/apache/rocketmq/remoting/RemotingClient.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7220b3119361aa99cab1b65b7baeec5147a6fdd01cf2e29fbf3aec93ce2f37d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:754-770 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:134-150 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:754\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":754}}}],"partialFingerprints":{"codehealthFindingId/v1":"48986c9481eee7bbbcbb3309eb0937081ec255cecf55f03c482fcfa49b1b16bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/message/MessageDecoder.java:286-302 | common/src/main/java/org/apache/rocketmq/common/message/MessageDecoder.java:393-409 \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":"common/src/main/java/org/apache/rocketmq/common/message/MessageDecoder.java"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5d612c097d6f2bd70345145cc000a8b87cb1d7185c6e9f31a5f545793681f96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:520-536 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:956-972 \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 \u0060store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:520\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":"store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a53b15b73b2a02a6fbd83808c163ad9277c63515fb38c5b7dc141dd31ef8a28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:1433-1449 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:1483-1499 \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 \u0060store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:1433\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":1433}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f3203d3c8c3e33cc7342e91581ef52a4d403d475d66b3cb86555fe19075e25c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2819-2834 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2849-2863 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2878-2892 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2819\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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":2819}}}],"partialFingerprints":{"codehealthFindingId/v1":"47d37f2e3016bdf6d27ce8568c1a5614e852fca79917db73f34013ac5923dfd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1565-1579 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1089-1103 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1565\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":1565}}}],"partialFingerprints":{"codehealthFindingId/v1":"801514e893d97a709042f73df63a9dbe81576fc643f4ca9b8a92be16c2e83279"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:154-168 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java:138-152 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:154\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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e806a163b135d25c43917ea5f04f170b036df3d2538350c5e61b6a09ea536b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:165-179 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopOrderlyService.java:157-171 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:165\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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"058903013372df12ab0f6889d1ec3e996c072a2f1abe7093ccfc8904238ff3d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:487-503 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:649-663 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:487\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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae00efbd3dbc2ccdb6c4df93ff1084c151659405a8a8b014d286b491caddc050"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:246-260 | client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:271-285 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:246\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"80e545b54a8707726607bc91c7fb5375b61065f208568e8ee6ff530b7ac34f36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1122-1136 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1241-1255 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1122\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1122}}}],"partialFingerprints":{"codehealthFindingId/v1":"eefc1d02f7938b2e33c3fa4bf1c48ddff05356511555f071de4b4397216d3002"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java:96-110 | common/src/main/java/org/apache/rocketmq/common/stats/StatsItemSet.java:51-65 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java:96\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":"common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"2438e4bb1ae3d633b373de9bfa6ccd14a708aaefd7564a06080b9e3920c07133"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): tieredstore/src/main/java/org/apache/rocketmq/tieredstore/stream/CommitLogInputStream.java:115-129 | tieredstore/src/main/java/org/apache/rocketmq/tieredstore/stream/FileSegmentInputStream.java:155-169 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tieredstore/src/main/java/org/apache/rocketmq/tieredstore/stream/CommitLogInputStream.java:115\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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/stream/CommitLogInputStream.java"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf35d6a822943f0844c0a28ab1a3bb0ac627ddc397d9465617d87e6301af623b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 6): filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:88-101 | filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:126-139 | filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:172-185 | filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:210-223 | filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:256-269 | filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:294-307 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:88\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"5540011f8600b229d6a06ef118602daa2c9e3ad34010920354bed01983d0271f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:147-160 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:275-288 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:326-339 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:147\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"87492d62e6e23ab130387c2fc17b18517729b1f764671d060b9f6aa000d5b33e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1078-1091 | broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1115-1128 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1078\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":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea413059f160a6dd829ecc61b5cba97ff98343c79b92e7e68b65131b30847bbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:230-243 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:252-265 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:230\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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"31fc9c27f5b08c2f4e767f08029e73b8296f2d83aa1143e60f9ecdb3262fe8c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:271-284 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:293-306 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:271\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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e9c91c4b85a491b955eafde6a7eada3d845c39e07454e5fde45e4c62e69f7c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:255-268 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopOrderlyService.java:234-247 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:255\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"3489accc26554be9adb577989339fdca6c1324de16e8e9462e4d9880b8494cc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1633-1646 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1693-1706 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1633\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":1633}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3142f67b05b60da52e1adcf310eb4183fb38f9b240a84a25fede3172aa1de8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2342-2356 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2371-2384 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2342\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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":2342}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e82872e0fd0046351d88f3dd35ae22eb19bae1f2277f0a44cd1665dd9ed4dd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/compression/Lz4Compressor.java:71-84 | common/src/main/java/org/apache/rocketmq/common/compression/ZstdCompressor.java:71-84 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060common/src/main/java/org/apache/rocketmq/common/compression/Lz4Compressor.java:71\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/compression/Lz4Compressor.java"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5b26388b9022bace4a5f798c09c7a23d5b2da2780d6714ad83996f21535e5bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/compression/ZlibCompressor.java:76-89 | common/src/main/java/org/apache/rocketmq/common/UtilAll.java:381-394 \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 \u0060common/src/main/java/org/apache/rocketmq/common/compression/ZlibCompressor.java:76\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":"common/src/main/java/org/apache/rocketmq/common/compression/ZlibCompressor.java"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"37cbc81643c5ec4473572d7b81b25683943fead3db30b6754f6c6afc45e515f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAConnection.java:280-293 | store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAConnection.java:734-747 \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":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAConnection.java"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f6dba45b4ff8beeee9d019e2450c3665f8ae1a9ce82b673f07d65252d58877f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:285-298 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:1886-1899 \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 \u0060store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:285\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cdcd662b147b5d4716930194930a3ca173f5831fb763ce8f4edd1bcb8a326aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:542-555 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:757-771 \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 \u0060store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:542\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":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"81c6cee3fe309819982a7bc2e159e075339b15d88e28f11cdfd60128456cdfcc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:424-437 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:897-911 \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 \u0060store/src/main/java/org/apache/rocketmq/store/CommitLog.java:424\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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1168ef5a5bf7841b968cb30d7c1700e057f88bfe6df545bb5ea9b976c8eab01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1772-1785 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1878-1891 \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 \u0060store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1772\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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1772}}}],"partialFingerprints":{"codehealthFindingId/v1":"385c3c6913064d79c8235ffdfb87f8ab769fd76f8ad2922cd62645558e4d60ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:343-356 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1119-1132 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:343\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":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"07258dc206a52bd7f9b9b6d2c111732da0a1b2d5c5136b798ac94853d84f170e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/AddWritePermSubCommand.java:63-76 | tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/WipeWritePermSubCommand.java:65-79 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/AddWritePermSubCommand.java:63\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":"tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/AddWritePermSubCommand.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e5dba592fca5cf57eb30ab1875e0024847d4b5a499ae7900b23da972038b584"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java:49-62 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/SkipAccumulationSubCommand.java:88-101 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java:49\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"af2172ec5694c81bb781838c2897b7ea82ddd3a46f7c25fb25696296f26616ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerEpochSubCommand.java:71-83 | tools/src/main/java/org/apache/rocketmq/tools/command/ha/GetSyncStateSetSubCommand.java:77-89 | tools/src/main/java/org/apache/rocketmq/tools/command/ha/HAStatusSubCommand.java:74-86 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerEpochSubCommand.java:71\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":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerEpochSubCommand.java"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"3db03436b358b3560912d60fe8c5ece3ab9319b3bdb9d2a3c241cb134a5b79b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:54-67 | auth/src/main/java/org/apache/rocketmq/auth/authorization/provider/LocalAuthorizationMetadataProvider.java:59-71 \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":"auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac84b3b14b1601b013ad16d8f70bed031936d7ded51751d3463f002384c643c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:310-323 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBTopicConfigManager.java:274-286 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:310\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":"broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd1af4af1eed2b2226dd43dc3bbebdd4402d8617007d56c09ec85975a59e8066"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java:87-99 | broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java:107-119 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java:87\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f8b6cd8bf619159e6b7064d30b9862d31bf63fb6b51d928369086d5b3ea3880"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:954-966 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3003-3015 \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":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":954}}}],"partialFingerprints":{"codehealthFindingId/v1":"7458d88d1be690cebe1f425981d45a2244149fa41a867844ed776ab5d56542b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:986-998 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3035-3047 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:986\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":986}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bfa5cfbe2a64c8be1f3db416344f275750ae5639b63403d929bff52f0a49d10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1955-1967 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/activity/ConsumerManagerActivity.java:116-128 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1955\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1955}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e7f8ed818a591bda05140f9996a1aeeb592bfa6f170e0599d37184692de04b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:288-300 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:1003-1015 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:1003\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a98729ecf254fa0fe84ccb1442b9bd6feab24653ddc8e72976fbcd05876eb40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:232-244 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:503-515 \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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfec0c17da25f85c98729014cb830e0ea546b816bfc01d9a41e3110565fd75ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:544-556 | client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:580-592 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:544\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":"client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"c269897d6356129734e9b04d5fa47c1556070246a5faee8965cd88e8ce67c4a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1663-1678 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1724-1736 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1663\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":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":1663}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3debc7ba7a0098bf935d2532b727ae091a2db9360c9e31fa44d10da6a8b0d64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1362-1374 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1395-1407 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1362\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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1362}}}],"partialFingerprints":{"codehealthFindingId/v1":"95f7a4cae0acedba4266dda7692fee8b913fe974f13fc18a766e21b34c452135"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2208-2220 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2291-2303 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2208\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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":2208}}}],"partialFingerprints":{"codehealthFindingId/v1":"821948d93b2be654d22d9a536e84fbc48e4e69aedbaf7ef54e392fcc12b115ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2600-2612 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2648-2660 \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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":2600}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eb8a6c2f2f80389fdea23b1827970102a5e50baa3055a1cef46b6ff574ee85a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/compression/Lz4Compressor.java:39-51 | common/src/main/java/org/apache/rocketmq/common/compression/ZstdCompressor.java:39-51 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060common/src/main/java/org/apache/rocketmq/common/compression/Lz4Compressor.java:39\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/compression/Lz4Compressor.java"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"dad8e3589d3efc8e86e1449e8fe6efd0985d96cbdecba6db1785c5a5b21c25fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): example/src/main/java/org/apache/rocketmq/example/schedule/ScheduledMessageConsumer.java:32-44 | example/src/main/java/org/apache/rocketmq/example/schedule/TimerMessageConsumer.java:34-46 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060example/src/main/java/org/apache/rocketmq/example/schedule/ScheduledMessageConsumer.java:32\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/schedule/ScheduledMessageConsumer.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"e387c737c7163f8972bbed21e49bdae2d3610afe314210e9564706e0b2f7ebde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:334-346 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:787-799 \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 \u0060store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:334\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"605fecb1361c2eff9b0d17bb2ffa424b185c21321b9126df2626dc294d43eb51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:334-346 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:355-367 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:334\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e9a1d05775d8181ccc3c62cf70fdd6dc221db4b5aca34da1d3c26a328ba0a38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1418-1430 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1509-1521 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1418\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":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":1418}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6182980dc0169b570f2497a13229b2fc8554127becf54fe7db323177f115953"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetUserSubCommand.java:101-113 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/ListUserSubCommand.java:103-115 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetUserSubCommand.java:101\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetUserSubCommand.java"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"76b06f7fba809d0b8873ad7633ce52bcef16f8396127713bfc2d82b652aada21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerStatusSubCommand.java:108-120 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerSubCommand.java:92-104 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerStatusSubCommand.java:108\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":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerStatusSubCommand.java"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"6978f5567ddfad68094e8056c017a26026f84e42fcee94b4a2b2ed1dec291278"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 8): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:440-451 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:489-500 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1545-1556 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1695-1706 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2188-2199 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2269-2280 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2904-2915 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3361-3372 \u2014 all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. 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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"33726c654e952f746fa6de03f34d44e22f81e2a6892fb784932b546653a69917"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:512-523 | client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:548-559 | client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:584-595 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:512\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java"},"region":{"startLine":512}}}],"partialFingerprints":{"codehealthFindingId/v1":"88d4e3da8b4cc7d139b23a6ad658d767a34f999b4aa21627bb0425a6342fb070"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): controller/src/main/java/org/apache/rocketmq/controller/ControllerStartup.java:136-147 | namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvStartup.java:168-179 | namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvStartup.java:207-218 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060controller/src/main/java/org/apache/rocketmq/controller/ControllerStartup.java: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/ControllerStartup.java"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0588c7ec71c2ad4ffd2225aac5e2bd0dc7830b97e785d75c717ed7d5cfc7760"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): store/src/main/java/org/apache/rocketmq/store/MessageExtEncoder.java:138-149 | store/src/main/java/org/apache/rocketmq/store/MessageExtEncoder.java:234-245 | store/src/main/java/org/apache/rocketmq/store/MessageExtEncoder.java:338-349 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/MessageExtEncoder.java"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ccc845c368a06189db7a4d29116d58d99c8cc11e67e2b0621e86ea89e48bed3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): auth/src/main/java/org/apache/rocketmq/auth/authentication/context/AuthenticationContext.java:49-60 | auth/src/main/java/org/apache/rocketmq/auth/authorization/context/AuthorizationContext.java:33-44 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060auth/src/main/java/org/apache/rocketmq/auth/authentication/context/AuthenticationContext.java:49\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/authentication/context/AuthenticationContext.java"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"1500d082d53b0a41483a210f8b0407b15ab4701850d3274221ecb1375fd14687"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): auth/src/main/java/org/apache/rocketmq/auth/authentication/factory/AuthenticationFactory.java:140-151 | auth/src/main/java/org/apache/rocketmq/auth/authorization/factory/AuthorizationFactory.java:143-154 \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 \u0060auth/src/main/java/org/apache/rocketmq/auth/authentication/factory/AuthenticationFactory.java:140\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":"auth/src/main/java/org/apache/rocketmq/auth/authentication/factory/AuthenticationFactory.java"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"86e8d0b67167c96209fb0ed65ed732a832ede53ff3067987deadb758d8e275ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1061-1072 | broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1100-1112 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1061\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":1061}}}],"partialFingerprints":{"codehealthFindingId/v1":"47c2c2196d084d30a94f212b37339fde8a8cc28ef797639d22c4069edf5e1a98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1026-1037 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1056-1067 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1026\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1026}}}],"partialFingerprints":{"codehealthFindingId/v1":"31faf219646f1c7fe29558a785b893ad260260f154b995e2f7406c82875f67dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2150-2161 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2206-2217 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2150\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":2150}}}],"partialFingerprints":{"codehealthFindingId/v1":"847eb2c76a41d73086906832d17a616e65fcc2f2cb2376231665e3d3f2378d06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java:98-113 | broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java:175-186 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java:98\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"be4afb2e3f0259958a2068074edd0f7d7d4f8bd8e488194aaf352bf05116bfff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:2008-2019 | container/src/main/java/org/apache/rocketmq/container/InnerBrokerController.java:111-122 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:2008\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":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":2008}}}],"partialFingerprints":{"codehealthFindingId/v1":"dee9b1e5f135bf9ffb4a0749cc2be330ebcb2a4f2f8e240de4bc2394a4c156c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java:144-155 | remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java:162-173 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe348cd05c54cfcafb7691dfe13f305399c184d4f67c3ef6d14f7699d2876a78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/netty/TlsHelper.java:232-243 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/MultiProtocolTlsHelper.java:103-114 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/netty/TlsHelper.java:232\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/TlsHelper.java"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"00b129d1fe283c46c95d0774374ae6ef3ce18325df347af319e76817929b4651"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:82-93 | client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:63-74 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:82\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":"client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b9427a6be45036157e47b2bab969d5cb49a786df354f93daeb80583868868fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:212-223 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java:201-212 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:212\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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"e61ad4f3363c8bf74eacff75b9910e5fdc5cf40d45de1f87bac1894f0141736c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:366-377 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopOrderlyService.java:281-292 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:366\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"235836cf0a069f67f952fba8e8615f20de71cbf1ac6462eaac2d70e8684d6bdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:444-456 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:564-575 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:444\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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a1418b670255d23fe81bd966315c3daa232771cdf2eda127ff359f3f4aaba11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2227-2238 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2247-2258 \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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":2227}}}],"partialFingerprints":{"codehealthFindingId/v1":"b407c1d048bda2960dcb8c3bf18a53d05d9812741fa9b7bb655ba50be411746b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): example/src/main/java/org/apache/rocketmq/example/schedule/ScheduledMessageProducer.java:32-43 | example/src/main/java/org/apache/rocketmq/example/schedule/TimerMessageProducer.java:34-49 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060example/src/main/java/org/apache/rocketmq/example/schedule/ScheduledMessageProducer.java:32\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":"example/src/main/java/org/apache/rocketmq/example/schedule/ScheduledMessageProducer.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"61bf38c5be157405362c086dccda70ffa50847d10b37e77040c61c7e5c23e8ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:828-839 | namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:861-872 \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 \u0060namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:828\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":"namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"c83be11920bf67419dc77cfa3801970b41eacf86030a964f548dd5ebbf0dd8bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:1124-1135 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:1185-1196 \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 \u0060store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:1124\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b1f0f95ff218babb6f8b405563174d11a3e842d1d4d30576999b081e106e00f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:921-932 | store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:1048-1059 \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 \u0060store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:921\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":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":921}}}],"partialFingerprints":{"codehealthFindingId/v1":"afdbc27d36c54c67f072b43335d3c7ec342210f33fd3b400a874b11d53122eec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1036-1047 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1197-1208 \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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"31c3bd92bef7e3edd2a0dffeb0906ae2f376de530230a4152e59b35f433cea9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1135-1146 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1291-1303 \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 \u0060store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1135\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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1135}}}],"partialFingerprints":{"codehealthFindingId/v1":"fef3c13603d1cb167ba17edd343d45820c095561eb9392669c49a8a336bd2bde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java:121-132 | tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java:188-200 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java:121\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8a224f53858f989adb0df0feecfbb77b123f3e3501805332671716a1e275a5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3598-3608 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3614-3624 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3675-3685 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3691-3701 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":3598}}}],"partialFingerprints":{"codehealthFindingId/v1":"58fe016dbd232d4dbb23e07778688cb8fc398f04a23891dbc003fa1e9466c135"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/transaction/TransactionMetrics.java:190-200 | common/src/main/java/org/apache/rocketmq/common/ConfigManager.java:98-108 | store/src/main/java/org/apache/rocketmq/store/timer/TimerMetrics.java:233-243 \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":"broker/src/main/java/org/apache/rocketmq/broker/transaction/TransactionMetrics.java"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbdf25997a4c43518585369c31c2700526a87d967de1d8dfbc3f792652ec46e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:143-153 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:157-167 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:185-195 \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. 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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"852e37b12bfeeda32a25b56a4a41caa4c36c1aba71029720e70e088bd970841d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2667-2677 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2683-2693 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2700-2710 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":2667}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a926d7fce2d1a4ef90f9453f16910d38e51560ec435c4d785908ff16615447f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java:559-569 | namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java:579-589 | namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java:598-608 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java:559\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"01da5a20c87016c9809bfe287205c40d919556acc72f2b1b2e41f30a7d100f76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:1060-1070 | namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:1081-1091 | namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:1103-1113 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:1060\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java"},"region":{"startLine":1060}}}],"partialFingerprints":{"codehealthFindingId/v1":"336334597deffc6f2fdce79591595cdcb3d8586992845b1229d82b6e1e732c8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:64-74 | broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:147-157 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:64\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"95dbb405f8c5c19beac28005ddb04f9101ea56d5a51fd3b44798e5f6d321caa0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java:432-442 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:770-780 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java:432\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":"broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"64051dea21efcf9532e99c8f363b552baead344d0f106a7c3aa96b263395a4d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:194-204 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:316-326 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:194\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":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"82d57f588300a90bb4f8e20cf77c29d1b1469799922539fd0d454d3172b52ec5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/filter/ExpressionForRetryMessageFilter.java:85-95 | broker/src/main/java/org/apache/rocketmq/broker/filter/ExpressionMessageFilter.java:148-158 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/filter/ExpressionForRetryMessageFilter.java:85\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/filter/ExpressionForRetryMessageFilter.java"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"2184799b112d6a0c8ccc65c7859575d6e397815a27adc2d751a2de3dd3064c0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/latency/BrokerFastFailure.java:125-135 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/RemotingProtocolServer.java:367-377 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/latency/BrokerFastFailure.java:125\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/latency/BrokerFastFailure.java"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"65ecfebe2d6603ec032e50def09ae7109861de38ceae7ba278ef15691de35510"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:815-825 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3107-3117 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:815\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":815}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb6628ebf755c3408e1925b93bd14beb0ff38658daaa13d16dcabd714467e706"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:102-112 | broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:158-168 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:102\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe807341ff19b4333e135c7b5a52577aede055bb9358f681361fd87d0dec1177"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1080-1090 | container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java:270-281 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1080\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1080}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb463032d89cd4a38dfcf03de7cac6510f78717ebe137cdfa2c585542141b921"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:419-430 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:584-594 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:419\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7877f41ec6a43ff5a7efcc2e60827f82983e820ad1f76a235ff8940d0c08a58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:476-486 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:629-640 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:476\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd1facec36ee2457072cebb8057be3fb1fafaf781b64a5fea846cb613208cbe0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:121-131 | broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:167-177 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:121\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ccadb89ffc2d87243e8fbd53ad7d20d07b9adc8bc477c5fbafbe0dc83e229f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:1982-1992 | container/src/main/java/org/apache/rocketmq/container/InnerBrokerController.java:85-95 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:1982\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":1982}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a283c5669a3f81e183aaf3562f1470ab40b99f4d720bd69696a7a86fd08f888"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java:235-245 | remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java:251-261 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java:235\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"184fcae3bb4b806d44c951f14b37cbe554f22aca546a10d222fce38a52b65cfd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:123-133 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/SendMessageResponseHeader.java:62-72 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, 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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"a705a3e9c89e130217326cad8b1df7a178af8ef54ac5f52732709963d08d2222"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:106-116 | client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:87-97 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:106\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6e62fe14fb4cb8b0187710722ca0fd033c58f29e1f823c2c5db192bbb1f05f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java:71-81 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopOrderlyService.java:71-81 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"60489a7118392357cf81ee2aa7d0d37beddd6ce1ca0d5a67eff7fd2d918431a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:1062-1072 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:252-262 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:1062\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java"},"region":{"startLine":1062}}}],"partialFingerprints":{"codehealthFindingId/v1":"911ff589aa02957d36ef95c80a36407e8c3566d42d4e449c0137feff98548feb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:530-540 | client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:566-576 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:530\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"41ac1508dc486530c2951389d029eecfe776e37acda379c8b8e4a865d812a845"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1746-1756 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1956-1966 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1746\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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1746}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea469bf4e991f32df42a14d0673bb2b780cd8d6639a06175c5d1dfd4e5c3fbda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1909-1919 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1931-1941 \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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1909}}}],"partialFingerprints":{"codehealthFindingId/v1":"c57e3216ecbeda149b68280bd160213694408d465bb4e9763ed54cc29de0e002"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java:80-90 | client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java:127-137 \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":"client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"654caa2955e95feb676a0637f14769d5dd63441ab2b6ca75a8e86d9e7b0ccc78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): controller/src/main/java/org/apache/rocketmq/controller/impl/DLedgerController.java:202-212 | controller/src/main/java/org/apache/rocketmq/controller/impl/JRaftControllerStateMachine.java:204-214 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060controller/src/main/java/org/apache/rocketmq/controller/impl/DLedgerController.java:202\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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":"controller/src/main/java/org/apache/rocketmq/controller/impl/DLedgerController.java"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e6204eb20de22cc7428adcc2f73c78609b9ff9333c6d557a7708d415e12bb49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): example/src/main/java/org/apache/rocketmq/example/operation/Consumer.java:99-109 | example/src/main/java/org/apache/rocketmq/example/operation/Producer.java:97-107 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060example/src/main/java/org/apache/rocketmq/example/operation/Consumer.java:99\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/operation/Consumer.java"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea454532984492a9ac7d6a14c24bd200ed76495b7931f424847a2943a8da1325"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssign.java:42-52 | example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssignWithSubExpression.java:49-59 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssign.java:42\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssign.java"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"7144a9e7ebfa5b6f8d76e37d62b0a2294c9b8a5233ea21221462437a3e336bc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/remoting/channel/RemotingChannel.java:170-180 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/channel/RemotingChannel.java:205-215 \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 \u0060proxy/src/main/java/org/apache/rocketmq/proxy/remoting/channel/RemotingChannel.java:170\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":"proxy/src/main/java/org/apache/rocketmq/proxy/remoting/channel/RemotingChannel.java"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc55966a2bf7b6c6241b70b2eb5d329ff8420b5c528889469a22a930176118cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/service/sysmessage/HeartbeatSyncer.java:111-121 | proxy/src/main/java/org/apache/rocketmq/proxy/service/sysmessage/HeartbeatSyncer.java:149-159 \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 \u0060proxy/src/main/java/org/apache/rocketmq/proxy/service/sysmessage/HeartbeatSyncer.java:111\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":"proxy/src/main/java/org/apache/rocketmq/proxy/service/sysmessage/HeartbeatSyncer.java"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bcc5ffa904d061199858efed7b4e5d2f413ef5c41198ba5b811300ce967c34a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:964-974 | store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:1062-1072 \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":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"d606952f01d7e2ab3ec960caee8daf6a3ce01113bfaba7d1a73ded9f47692e94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:1019-1029 | store/src/main/java/org/apache/rocketmq/store/MessageExtEncoder.java:298-308 \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":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":1019}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceaed5f141cf831cd70e987341523c058534529c31a0c6d52a1d669603af75d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:293-303 | store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:353-363 \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 \u0060store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:293\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a9f2f8e5a9ce63d01c23f86b66e268deab7d048dda1e76d6abf917eecc0b072"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tieredstore/src/main/java/org/apache/rocketmq/tieredstore/metrics/TieredStoreMetricsManager.java:187-197 | tieredstore/src/main/java/org/apache/rocketmq/tieredstore/metrics/TieredStoreMetricsManager.java:220-230 \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 \u0060tieredstore/src/main/java/org/apache/rocketmq/tieredstore/metrics/TieredStoreMetricsManager.java:187\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/metrics/TieredStoreMetricsManager.java"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf76ddb6da74fb3a84abe24b6c19756be23961a3a185b06ac8bbe56fcfa71880"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetAclSubCommand.java:84-94 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/ListAclSubCommand.java:90-100 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetAclSubCommand.java:84\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetAclSubCommand.java"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab381891375922cbe33f3d52b3802e90bc0cea9583cf43b5cb45b216f98145d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetAclSubCommand.java:100-110 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/ListAclSubCommand.java:106-116 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetAclSubCommand.java:100\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetAclSubCommand.java"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d57a0dba1494b468a11fb0fbece89074e450ab6dd8c4da59e8327213c4f8399"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetUserSubCommand.java:56-66 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/ListUserSubCommand.java:57-67 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetUserSubCommand.java:56\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetUserSubCommand.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9aac2be83b24b26fe1b5e3cc481dd87bfccb6d53f5daf8e7f21bfd75990e2b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java:93-103 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicListSubCommand.java:92-102 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicListSubCommand.java\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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java:93\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ef38960d26f880c8170e5bef9c223edbbf715bac1543bd96a3d45bf4c76fbdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java:108-118 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicListSubCommand.java:107-117 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicListSubCommand.java\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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java:108\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":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba8515f69c0a5413035ed68b12f1aeaf47349590754211a1340c4b7d0cb48146"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/controller/GetControllerConfigSubCommand.java:62-72 | tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/GetNamesrvConfigCommand.java:59-69 \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":"tools/src/main/java/org/apache/rocketmq/tools/command/controller/GetControllerConfigSubCommand.java"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"d677f2d08a4ef405c17be803f7867e2bcda96a7543cc86fa426bb610d5cf98d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/controller/UpdateControllerConfigSubCommand.java:65-75 | tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateNamesrvConfigCommand.java:60-70 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/controller/UpdateControllerConfigSubCommand.java:65\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/controller/UpdateControllerConfigSubCommand.java"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceda2e40e64818214f179b738334dc58a81f67b63862b572c0103f966293bbc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByIdSubCommand.java:154-164 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByUniqueKeySubCommand.java:107-117 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByIdSubCommand.java:154\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":"tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByIdSubCommand.java"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e9dc89738fdd38c93a718b614cf2b4f9955d245ce5f251240a5a4fe18a11d59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java:55-65 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateStaticTopicSubCommand.java:56-66 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"3123d861c0225cad49f6d432c8ccb296f97f736a00df7056b8e424e67135e25c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java:120-130 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateStaticTopicSubCommand.java:125-135 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"905464037d43f08c3af6de3c0385aa30754229b6562d06f7b4f8b3d23b3303b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 7): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1628-1638 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3599-3608 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3615-3624 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3630-3639 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3676-3685 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3692-3701 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3707-3716 \u2014 all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. 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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1628}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5c7958a24d682c8c8d2aaa13f55af5da6841c0f9a08bd6ed73a02c144c7500f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 7): tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java:55-64 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateUserSubCommand.java:52-61 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/DeleteAclSubCommand.java:52-61 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateAclSubCommand.java:55-64 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateUserSubCommand.java:52-61 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java:63-72 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateStaticTopicSubCommand.java:64-73 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateUserSubCommand.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"6113d7d0af859425f926e57540606a7c402ed46878490324de9685884a404f73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java:133-142 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateUserSubCommand.java:101-110 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/DeleteAclSubCommand.java:101-110 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/DeleteUserSubCommand.java:90-99 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateAclSubCommand.java:134-143 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateUserSubCommand.java:106-115 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateUserSubCommand.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java:133\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a4e3a429c46ef7996eb08aa0cd9291e99bc9f2ef99faea94d5713507f25a50a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java:116-125 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:99-108 | broker/src/main/java/org/apache/rocketmq/broker/processor/PollingInfoProcessor.java:74-83 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:281-291 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java:116\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"54487ed5aaba39d675c753026536a2765d5a97c42a15c2df302ad421e18b694a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:88-97 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:173-182 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:301-310 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:352-361 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:88\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":"store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1b46b416227f0ca98c51b0b19676d736366bc54238f155c6d90afc5b066da88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java:72-81 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/CommitLogSetReadAheadSubCommand.java:56-65 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.java:48-57 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateOrderConfCommand.java:48-57 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java:72\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"0623ebfc04071c56052a401aea7ae56e2d8718ea55ea8fe9bcc821e9b64972d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): tools/src/main/java/org/apache/rocketmq/tools/command/auth/DeleteUserSubCommand.java:52-62 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/SwitchTimerEngineSubCommand.java:52-61 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java:56-66 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicListSubCommand.java:55-64 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicListSubCommand.java\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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/DeleteUserSubCommand.java:52\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/DeleteUserSubCommand.java"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"51173d01620ea865001edc5d5cfcfb46c129bc64c5d029f1b16f8bf7cb204a2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:97-107 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:113-122 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBTopicConfigManager.java:95-106 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:97\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":"broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1d8a35a6a44425bda945f9811f6154867feb3e33aa63619b2ecc623ca5eb79c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:434-445 | broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:633-643 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3410-3419 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. 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":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"0911f6147259d213be8f1e4774917cab858e2aac583fb8fdf0cd655a46528bc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:214-223 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:245-254 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:272-281 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:214\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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ac81c600bc988b6af422d52c4597f73ddb151f09730dcff93b656f87eb0d3d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1954-1964 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1992-2001 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2010-2019 \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. 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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1954}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d3d854fc60ca388112b5513181b0ca231c8b286a8c51e33812794edae4b18eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): common/src/main/java/org/apache/rocketmq/common/consumer/ReceiptHandle.java:87-96 | controller/src/main/java/org/apache/rocketmq/controller/impl/heartbeat/BrokerLiveInfo.java:52-61 | proxy/src/main/java/org/apache/rocketmq/proxy/service/sysmessage/HeartbeatSyncerData.java:50-59 \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. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction \u2014 check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/consumer/ReceiptHandle.java"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"79ee33538f325df1361a042f2a49350ed7d95818d33f076d7e9b1f66854c04cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:162-171 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:290-299 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:341-350 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:162\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":"store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b159db9f2421ef676be33be7c8070caf550a139dcbff72dc21e962c2c1c6e9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.java:80-89 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateBrokerConfigSubCommand.java:106-116 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateColdDataFlowCtrGroupConfigSubCommand.java:90-99 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.java:80\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":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.java"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"c74d10f6e1cfe9f06764d0a8ad14063511701f9b9c9bec27d78a1c16a928fb90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupSubCommand.java:219-228 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateOrderConfCommand.java:98-107 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicSubCommand.java:193-202 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupSubCommand.java:219\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":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupSubCommand.java"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d678e60514f9709de11f796fedfb25197f03be921586e96e5b4428c5fdbe689"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java:85-94 | auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java:118-127 \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 \u0060auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java:85\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":"auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"40dc884a4dadab63eec5b65858a2a20ff76db828b27d26bd0dee28bb41972be7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:146-155 | broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:164-173 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:146\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"84f0156c2b0db7488e6e426c3f4d461c0df813ef2e9f3100880ee1aa35afd8c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:112-121 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:222-231 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:112\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eb7c02de5d88109134da207ee7e23a27266a9fc0e4e2f5e68ed7af70d36a440"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java:438-447 | broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java:458-467 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java:438\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"85e407fa34feb24095c77da40537131ff97622883359804897bcb2f22bf49fc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java:122-131 | broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java:142-151 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java:122\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":"broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf7222f2760dda375cff239f84b3d03f7f7e62e5bef616a664ef097e145e27e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java:398-407 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:197-206 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java:398\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"57662c8c23c13fc67b508e7ac040662537b154a6e995fe3380e8c5ba726102d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:355-364 | broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:416-425 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:355\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"da69e4e1cf1e629bdd0366c80942b2cbfcdd3b748bd44c6b14a2a6b39527f49a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:366-375 | broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:427-436 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:366\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":"broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b6338b28bdc3f690f91681d3242ea8b835b1bc3af98a01371c39e0aa653e1aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1308-1317 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2068-2077 \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":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":1308}}}],"partialFingerprints":{"codehealthFindingId/v1":"10017b7d25f7be4fa3279c4eaba9d5f22da586cbacbe72f82db37355b5a012fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:572-581 | broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:599-608 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:572\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":"broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"37177d174c4d40fbfcae7e38c465b25b7eced37ab445d419b9f5449e20cebeff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3246-3255 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3278-3287 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3246\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":3246}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7c6c4bec5152808cf41a8d92a354bb118478049cdafd1873da5c746e99e52ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:313-323 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:419-428 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"c001210b8e7f46147ed5ebfbcb14d883b5e6e2bbc55df6f336155002bedf7124"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java:167-176 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:341-350 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java:167\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"d930968daecb0b3e737c819c07c2d0be237a34b9e8caf94cc8ea4c76263668c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:389-398 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:559-568 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:389\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"d612f3a5690f2c6e057c7931169e9a470ea16c6c81c0efded2ea99885b423e62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java:260-269 | container/src/main/java/org/apache/rocketmq/container/BrokerContainerStartup.java:377-386 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java:260\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb3efe91e8dabd4a3fcb79e1aa151dfcf84a3c04756a1c1cf0dcf5b6b51d9a48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:440-449 | remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:489-498 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:440\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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"9280df10831f1fa9005bc7ee816b630ad4dd23dd8d3b32ff22a39e2ccdab8462"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:49-58 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:72-81 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:49\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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"d45e542d970a9ab191adf5d977fceb29175163718f75eb5910d40356a7972b38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:467-476 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:622-631 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:467\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"500b2eea561f25323220375f80ac120a4b35d2e47cd4b701f2bdb368ecf18c0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceLitePullImpl.java:100-109 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalancePushImpl.java:182-191 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceLitePullImpl.java:100\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceLitePullImpl.java"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"56c5ced345f87748bd56ca20424d1f27567235e4151e49f70a8f801a09ea036a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:660-670 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:740-749 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:660\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"f174624d32b0e5de25fdf97e6aa530309d398b146b805932264c8534dd08a074"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:687-696 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:773-782 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:687\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"674caffdcd1e3012436e1b1f4aea60dfcbe36bd5eb9ab05324f1250247dac85b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:701-710 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1351-1360 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:701\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"539dfebba42a72a4b36b22ee9e2cc7b757896a878786a46e7cf028660241d4c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1691-1700 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1722-1731 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1691\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":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":1691}}}],"partialFingerprints":{"codehealthFindingId/v1":"75aa7709f6a16b6fa453653119edac203c928e63c260560cc1b9d1880c7cac77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1748-1757 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1792-1801 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1748\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":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":1748}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f72955f72352537189f6ffe4f2baaf38aad59cede9513c20461c52f188e5cca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3157-3166 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3526-3535 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3157\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":3157}}}],"partialFingerprints":{"codehealthFindingId/v1":"05e61aa9451877449146d440bbfbfbe996d1b4dea2f0d0baef846892b52c0290"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java:228-237 | client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java:242-251 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java:228\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"f89c87bbae04a92e7d11a6d346ed5a66adac1e2b39c7d2e996f9e793474da074"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/config/ConfigHelper.java:54-63 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:111-120 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/config/ConfigHelper.java"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"42153e78b620d2ea68abecfd60765373c53aba4bd5d7ac447e75618ca175ee23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/utils/IPAddressUtils.java:51-60 | common/src/main/java/org/apache/rocketmq/common/utils/IPAddressUtils.java:68-77 \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 \u0060common/src/main/java/org/apache/rocketmq/common/utils/IPAddressUtils.java:51\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/utils/IPAddressUtils.java"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"979b240d8f5367a40c4550e6d5940129db52ec1e0299011f7f7e8772728636fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): example/src/main/java/org/apache/rocketmq/example/lmq/LMQPushConsumer.java:69-78 | example/src/main/java/org/apache/rocketmq/example/lmq/LMQPushPopConsumer.java:71-80 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/lmq/LMQPushConsumer.java"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcef9834a150535e46f5bbf326d2349266ae933b0c5ff6983acef10011b4cf52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/ClientRequestProcessor.java:85-95 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/activity/GetTopicRouteActivity.java:61-70 \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 \u0060namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/ClientRequestProcessor.java:85\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/ClientRequestProcessor.java"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"71aae128cbe3f54b411bf2357a6645b673a44c62c897c68ae60df67b625613b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/grpc/pipeline/AuthorizationPipeline.java:46-55 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/pipeline/AuthorizationPipeline.java:47-56 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060proxy/src/main/java/org/apache/rocketmq/proxy/grpc/pipeline/AuthorizationPipeline.java:46\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/pipeline/AuthorizationPipeline.java"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"c005d60e9d50b7ca5093e000603050bb9842136c0647d71494e18e65c76b72cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:360-369 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:415-424 \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 \u0060proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:360\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c370de1755b8f05825769b89eb5ce19c611c66b909e99e64bd357dde704e443"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:486-495 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:920-929 \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 \u0060store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:486\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"877190e617ebe10b095931790b0fe03b13cc0af028b4b2af48de7ac9227c19c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:266-275 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:177-186 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:266\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d4dbf70993387a501214585b9d765de9073a5c7b5e28364a3ed3f105edaa935"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1150-1159 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1307-1316 \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 \u0060store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1150\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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1150}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a0a5275bb503c3c24698fdebb5004255c8c76528092d3b2e5ec4d429982b71b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:2271-2280 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:2300-2309 \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 \u0060store/src/main/java/org/apache/rocketmq/store/CommitLog.java:2271\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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":2271}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cf7678960506d7cd1af6412575392a822eef96ffab61a7aaf42c6bed96cb1f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/DispatchRequest.java:99-108 | store/src/main/java/org/apache/rocketmq/store/DispatchRequest.java:115-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DispatchRequest.java"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"29419216bc30b3e6fd31b26f1297e1726689e6872b5f48e5b88746334d512f37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java:109-118 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateAclSubCommand.java:109-118 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateAclSubCommand.java\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java:109\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":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bb0fa9b3322e115c3c5eec0899cca2e3b90a5af7a64b7cfa0301ed1068ec907"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/auth/ListAclSubCommand.java:57-66 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicSubCommand.java:56-65 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/ListAclSubCommand.java"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"95a236454ef8556f4f74c88cfaa13219b6aa4a731a67b2fa162c5aea260878eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateUserSubCommand.java:65-75 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerStatusSubCommand.java:54-63 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateUserSubCommand.java:65\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateUserSubCommand.java"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"820c42e0ee99f426da58ff267acae560378a7758ad5573e8b9c1714825189f09"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/metadata/RocksDBConfigToJsonCommand.java:198-207 | tools/src/main/java/org/apache/rocketmq/tools/command/metadata/RocksDBConfigToJsonCommand.java:301-310 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/metadata/RocksDBConfigToJsonCommand.java:198\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/metadata/RocksDBConfigToJsonCommand.java"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9ea5fb568824ea995eedb33375ce313d52d302e9dc078df5665f8de0ecd9db2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 21): tools/src/main/java/org/apache/rocketmq/tools/command/auth/CopyAclsSubCommand.java:48-56 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/CopyUsersSubCommand.java:48-56 | tools/src/main/java/org/apache/rocketmq/tools/command/controller/ReElectMasterSubCommand.java:45-53 | tools/src/main/java/org/apache/rocketmq/tools/command/controller/UpdateControllerConfigSubCommand.java:45-53 | tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteClientInfoSubCommand.java:45-53 | tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteGroupInfoSubCommand.java:52-60 | tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteTopicInfoSubCommand.java:50-58 | tools/src/main/java/org/apache/rocketmq/tools/command/lite/TriggerLiteDispatchSubCommand.java:43-51 | tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageByQueueCommand.java:116-124 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByIdSubCommand.java:196-204 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByKeySubCommand.java:49-57 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByOffsetSubCommand.java:48-56 | tools/src/main/java/org/apache/rocketmq/tools/command/message/SendMessageCommand.java:49-57 | tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateKvConfigCommand.java:40-48 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/CloneGroupOffsetCommand.java:46-54 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/GetConsumerStatusCommand.java:44-52 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java:48-56 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java:82-90 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/SkipAccumulationSubCommand.java:49-57 | tools/src/main/java/org/apache/rocketmq/tools/command/queue/CheckRocksdbCqWriteProgressCommand.java:48-56 | tools/src/main/java/org/apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java:60-68 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateKvConfigCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 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":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/CopyAclsSubCommand.java"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e69c1de44f32545eac71552497e6d86452c9554d04d91024ea03544cf08cce8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 14): example/src/main/java/org/apache/rocketmq/example/operation/Producer.java:74-82 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java:62-70 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateAclSubCommand.java:62-70 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/SetConsumeModeSubCommand.java:57-65 | tools/src/main/java/org/apache/rocketmq/tools/command/controller/ReElectMasterSubCommand.java:47-55 | tools/src/main/java/org/apache/rocketmq/tools/command/controller/UpdateControllerConfigSubCommand.java:47-55 | tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteClientInfoSubCommand.java:47-55 | tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageByQueueCommand.java:118-126 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByOffsetSubCommand.java:50-58 | tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateKvConfigCommand.java:42-50 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/CloneGroupOffsetCommand.java:48-56 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java:50-58 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java:84-92 | tools/src/main/java/org/apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java:62-70 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateAclSubCommand.java\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/operation/Producer.java"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"d42d73a22a5319fa687b6e84a1dbf85fb8e3adba50ac72496e7752f2e856fa2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 14): proxy/src/main/java/org/apache/rocketmq/proxy/ProxyStartup.java:146-154 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/CommitLogSetReadAheadSubCommand.java:52-60 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/DeleteExpiredCommitLogSubCommand.java:45-53 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.java:44-52 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateBrokerConfigSubCommand.java:45-53 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateColdDataFlowCtrGroupConfigSubCommand.java:47-55 | tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterSendMsgRTCommand.java:56-64 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/DeleteSubscriptionGroupCommand.java:44-52 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/SetConsumeModeSubCommand.java:47-55 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupSubCommand.java:50-58 | tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetadataCommand.java:56-64 | tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportPopRecordCommand.java:45-54 | tools/src/main/java/org/apache/rocketmq/tools/command/ha/HAStatusSubCommand.java:49-57 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java:52-60 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 14 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 14 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/ProxyStartup.java"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"71050b42e42099916682ff4044575e610f27ccddc4e9d97b5d27fbe4e9c5ec59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 11): tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommand.java:69-77 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/SendMsgStatusCommand.java:57-65 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerStatusSubCommand.java:55-63 | tools/src/main/java/org/apache/rocketmq/tools/command/controller/CleanControllerBrokerMetaSubCommand.java:46-54 | tools/src/main/java/org/apache/rocketmq/tools/command/ha/GetSyncStateSetSubCommand.java:48-56 | tools/src/main/java/org/apache/rocketmq/tools/command/message/CheckMsgSendRTCommand.java:48-56 | tools/src/main/java/org/apache/rocketmq/tools/command/message/ConsumeMessageCommand.java:78-86 | tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageSubCommand.java:71-79 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByUniqueKeySubCommand.java:153-161 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgTraceByIdSubCommand.java:43-51 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateOrderConfCommand.java:44-52 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 11 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 11 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommand.java"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"de503609b3f231fab43e78d8b77881c7515fa8fbe70e87a7fd2822789222324c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 9): tools/src/main/java/org/apache/rocketmq/tools/command/auth/CopyAclsSubCommand.java:103-112 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/CopyUsersSubCommand.java:103-112 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java:135-144 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateUserSubCommand.java:103-112 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/DeleteAclSubCommand.java:103-112 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/DeleteUserSubCommand.java:92-101 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateAclSubCommand.java:136-145 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateUserSubCommand.java:108-117 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java:158-166 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateUserSubCommand.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CopyAclsSubCommand.java:103\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":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/CopyAclsSubCommand.java"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a8e102087a3664e464a757f6c44e264eb15ab8abf8f0ecf7a10af321ef8d024"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 9): tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateBrokerConfigSubCommand.java:53-61 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateColdDataFlowCtrGroupConfigSubCommand.java:51-59 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/DeleteSubscriptionGroupCommand.java:48-56 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/SetConsumeModeSubCommand.java:51-59 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupSubCommand.java:54-62 | tools/src/main/java/org/apache/rocketmq/tools/command/controller/CleanControllerBrokerMetaSubCommand.java:50-58 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByUniqueKeySubCommand.java:161-169 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java:56-64 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicSubCommand.java:61-69 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateBrokerConfigSubCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateColdDataFlowCtrGroupConfigSubCommand.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateBrokerConfigSubCommand.java"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"baf090752a05bb2131efa778c47f001c7d336f7f424b773b7d55a367a11aaaad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RpcClientImpl.java:212-220 | remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RpcClientImpl.java:258-266 | remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RpcClientImpl.java:296-304 | remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RpcClientImpl.java:317-325 | remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RpcClientImpl.java:338-346 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RpcClientImpl.java:212\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RpcClientImpl.java"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"77d02ec0d594bccb234d4cc808657601d54772c71dfc2eb4c4095731e2535208"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:47-55 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:135-143 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:221-229 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:263-271 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:314-322 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:135\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d2f68973a7a5bead4782d75c1267fa3385a5380bd0926a800e80e4d619f027d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java:124-132 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateUserSubCommand.java:91-100 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/DeleteAclSubCommand.java:92-100 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/DeleteUserSubCommand.java:81-89 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateAclSubCommand.java:124-133 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateUserSubCommand.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java:124\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"23352f0a03585d94b48132214d7dfb548110ae10ed4817c258a605a2f7d5dc2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): example/src/main/java/org/apache/rocketmq/example/filter/SqlFilterConsumer.java:39-49 | example/src/main/java/org/apache/rocketmq/example/filter/TagFilterConsumer.java:35-45 | example/src/main/java/org/apache/rocketmq/example/lmq/LMQPushConsumer.java:61-69 | example/src/main/java/org/apache/rocketmq/example/simple/PushConsumer.java:43-51 \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":"example/src/main/java/org/apache/rocketmq/example/filter/SqlFilterConsumer.java"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae9a4269a9f58bffdc0b4c4112ebb0761cf6f89eef940bcbe69e3eca215dac1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:527-535 | store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:657-665 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1023-1031 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1187-1195 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"a677cb2add6c6473be10395d060ef327a020c2e3bea2b3e4fc75ce937ccdabff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): tools/src/main/java/org/apache/rocketmq/tools/command/broker/CleanExpiredCQSubCommand.java:42-50 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/CleanUnusedTopicCommand.java:42-50 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetColdDataFlowCtrInfoSubCommand.java:57-65 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/ResetMasterFlushOffsetSubCommand.java:41-49 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/CleanExpiredCQSubCommand.java"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"286e6cb9a54b26fa11982d9e65c3bd14d9e811bde1176f0ec64265efe5af9294"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java:257-265 | auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java:305-313 | auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java:319-327 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java:257\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"12a905bba4acbe8105dc8bf7d04ab301addffcc0721f6f64af63a4b729092b13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:571-579 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:661-669 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:731-739 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:571\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"be75b0ca7ebe5d7f94644f22548413a485aef2881ec4c49c497107cefbe6ea4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyLogger.java:93-101 | remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyLogger.java:131-139 | remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyLogger.java:150-158 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyLogger.java:93\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyLogger.java"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"21e533bf5dd47a553ef3b52bef259136a7249649e470c650b04eeb0c5c3cad99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): example/src/main/java/org/apache/rocketmq/example/tracemessage/OpenTracingProducer.java:66-74 | example/src/main/java/org/apache/rocketmq/example/tracemessage/OpenTracingPushConsumer.java:59-67 | example/src/main/java/org/apache/rocketmq/example/tracemessage/OpenTracingTransactionProducer.java:85-93 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/tracemessage/OpenTracingProducer.java"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"d45cf37cb0dd0be444ea4732b835f769f964f21df7b5ab9048b492d76c39b11c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): tools/src/main/java/org/apache/rocketmq/tools/command/connection/ProducerConnectionSubCommand.java:57-66 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerProgressSubCommand.java:103-111 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerStatusSubCommand.java:76-85 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/connection/ProducerConnectionSubCommand.java:57\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/connection/ProducerConnectionSubCommand.java"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"af47d5f1d62f51aee55540ca642c9951c4d3817b5b547b65c49bec55cd96196d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): auth/src/main/java/org/apache/rocketmq/auth/authentication/manager/AuthenticationMetadataManagerImpl.java:67-75 | auth/src/main/java/org/apache/rocketmq/auth/authentication/manager/AuthenticationMetadataManagerImpl.java:81-89 \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 \u0060auth/src/main/java/org/apache/rocketmq/auth/authentication/manager/AuthenticationMetadataManagerImpl.java:67\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/authentication/manager/AuthenticationMetadataManagerImpl.java"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ce21587cf25d75ffb8840acdbabca2b19b9dbb08bae0c71a02c3e280b0ef791"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/client/ProducerManager.java:170-178 | broker/src/main/java/org/apache/rocketmq/broker/client/ProducerManager.java:192-201 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/client/ProducerManager.java:170\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":"broker/src/main/java/org/apache/rocketmq/broker/client/ProducerManager.java"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceb48956a18b89ad3c60ae7d969176bf3550aa058f4f0d147e93a53a12353f3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:52-60 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBTopicConfigManager.java:46-54 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"1730ff3737c7f7a669bd65277fd497f06e4280884e14d63cdd61742882e6e4af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/config/v2/SubscriptionGroupManagerV2.java:88-96 | broker/src/main/java/org/apache/rocketmq/broker/config/v2/TopicConfigManagerV2.java:100-109 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/config/v2/SubscriptionGroupManagerV2.java:88\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/config/v2/SubscriptionGroupManagerV2.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"a87036b2a4a5efeb16abc01cc2d1c18de4e4f5a6605da6624a37f9f867cbb59d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java:170-178 | broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java:276-284 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java:170\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":"broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"03ce0517b62103a638aa1eab5c5fa452826fad2c29cba5704493f84b7af1910a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:500-508 | broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:510-518 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:500\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":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"416c362437ec652274e40fd67c2dd740a9631cb5cd8df526b29370b9bb38682d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:387-395 | broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1499-1507 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:387\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":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8a00230333c9cf4a2ee32a1567a47a4dac2cd1830f03bfe086060eac3aff849"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:933-941 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2981-2989 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:933\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":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":933}}}],"partialFingerprints":{"codehealthFindingId/v1":"0160d2ab35fb3c78e1c9a0c2cbc74776d88ea5186dc72946903158afff9990f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:642-650 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:170-178 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:642\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":"broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"cca5a1ca8b016a782bf3dfd9ef7b93be47f44211bf5888d6e0e5c33c0caf4946"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1185-1193 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2170-2178 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1185\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1185}}}],"partialFingerprints":{"codehealthFindingId/v1":"376bbab673867adc66ef6f25e844031307ea99735030c4e9951e8aa6ebd703aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1920-1929 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2094-2102 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1920\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1920}}}],"partialFingerprints":{"codehealthFindingId/v1":"7db486c2ef89e413e66461e30a6645ec0ecf2669b2da6d200f7e83d0638f0c09"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2077-2087 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2777-2785 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2077\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":2077}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb1d565205a316929e9b8c5539da1529b8f2809be75940aff709c1a05b3a3e63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3396-3404 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3423-3431 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3396\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":3396}}}],"partialFingerprints":{"codehealthFindingId/v1":"653407ce9252885f250e024126792abf68b075a8a349a88773878b7b2f8544a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:332-340 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:429-437 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:332\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a626f36b28279c1dfc88670070bb8e8eb3414f7c0d9c51972f11fe6915d061f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:459-467 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:612-621 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:459\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"0189fdb32b75930a598e92e0ef762a0736cec99c32295e31972346f9d16cfb58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java:311-319 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:301-309 \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":"broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"faf24e2dbcecf6e75ae5739f553624d7c73304f02505e74c4de0980ea89865b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java:302-310 | tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetadataCommand.java:65-73 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f40cc7f3ad5f6d9ee6837cd21c47fd777ecdaeb187b669ab306fed41f756eb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:252-260 | remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:304-312 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:252\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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"7760d76fe31e3d82d5b5b68eff9489e44063c70b5b4e4b444a1b3744214b8e31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:39-47 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:62-70 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:39\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"fca9435e3261720d78a2f95bc825ebbfcf78b6c8baf2ba019ac16a818751976b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:133-141 | client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:161-169 \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 \u0060client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:133\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"80f0faa91ca01de5e38b61d72e259155a7caa80f96fa42a778687298993173f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:73-81 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:77-85 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"a33ae0b01539417408f1ad71691e68bc7051d44230a96a0d12a224b98571b8c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:403-411 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java:416-424 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:403\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eb4d79fe37d0a17bc96b72b672f488e6cdfc387a5eec25ca1beae3fe549353b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:420-428 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:521-529 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:420\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"786adc9ae322a98f0dd6112d935dd727f39154a6f95148fc41192fdf2294d97d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:536-544 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:560-568 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:536\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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"2069fb408a6248de6e79b0ce1d0b5eba1e2fa2acd8f9c3ea18dd23ac052726bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:756-764 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:797-805 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:756\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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java"},"region":{"startLine":756}}}],"partialFingerprints":{"codehealthFindingId/v1":"3590c0e6c50744b3523a02618cef49e054b80c34fbec67ad3ac46560164c3840"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/PopRequest.java:107-116 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/PullRequest.java:79-87 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/PopRequest.java:107\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/PopRequest.java"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fe081e78f1e9d894211127c76faf3aa0ae0d64df3624482448f878d899f4f61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:97-105 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:188-196 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:97\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"367e11236a97e0de736570a5419b844ff2f128674c21267892a0ba35298f2e32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceLitePullImpl.java:130-138 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalancePushImpl.java:215-223 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceLitePullImpl.java:130\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceLitePullImpl.java"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e36de1b17e973f8b6fed7c97a7298a1559ff29cb298f3356120972088455710"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:1219-1227 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:1264-1272 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:1219\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":1219}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd834983954e0f8212af004851d90dafec815610f15bcd8ca36960a1e2656293"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1011-1019 | proxy/src/main/java/org/apache/rocketmq/proxy/processor/ProducerProcessor.java:215-223 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1011\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":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":1011}}}],"partialFingerprints":{"codehealthFindingId/v1":"940712a33912ab722936c49fc4c24a994b341cf27d605f4b3fa5d8e6f2d4dc81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java:283-291 | common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java:298-306 \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 \u0060common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java:283\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":"common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fd66e72c8feea1ce220599dd31a2e644a13327ba0f4d8c94c11abb95f77f0a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/filter/impl/PolishExpr.java:113-121 | common/src/main/java/org/apache/rocketmq/common/filter/impl/PolishExpr.java:140-148 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060common/src/main/java/org/apache/rocketmq/common/filter/impl/PolishExpr.java:113\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":"common/src/main/java/org/apache/rocketmq/common/filter/impl/PolishExpr.java"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"6108b0dcb3ff3f6a82725f718f44eb13468536fa62dc8d777fa6088c0f66ade8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/message/MessageQueue.java:86-94 | common/src/main/java/org/apache/rocketmq/common/message/MessageQueueForC.java:79-87 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060common/src/main/java/org/apache/rocketmq/common/message/MessageQueue.java:86\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/message/MessageQueue.java"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"492e532692447ded1f670d1136c1e493309adb6710ec4a1865f1e1d0234f6309"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/utils/HttpTinyClient.java:46-54 | common/src/main/java/org/apache/rocketmq/common/utils/HttpTinyClient.java:111-119 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/utils/HttpTinyClient.java"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bdc75eb35cf592da12e66a337b6135baa9df7b6fd4b496bd81bc81e93a7edee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): example/src/main/java/org/apache/rocketmq/example/lmq/LMQPushPopConsumer.java:62-70 | example/src/main/java/org/apache/rocketmq/example/simple/PopConsumer.java:41-50 \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":"example/src/main/java/org/apache/rocketmq/example/lmq/LMQPushPopConsumer.java"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0e9b01e990ffe8e22a8dad91c8a7c535836f68e704f8112ad5951537243cb01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:120-128 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:218-226 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:120\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fe6ab50ce41cd6824fb206bc70491902fad20ddcb1cb7d3b1c73195445282ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): srvutil/src/main/java/org/apache/rocketmq/srvutil/ServerUtil.java:30-40 | tools/src/main/java/org/apache/rocketmq/tools/command/stats/StatsAllSubCommand.java:159-167 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"srvutil/src/main/java/org/apache/rocketmq/srvutil/ServerUtil.java"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"15d33adfc74a0eafd26f6f7de3b600a8d7323ac2ee5cf81eb38d0f780536b272"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:362-370 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:172-182 \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 \u0060store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:362\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"d28c6b0c9871e405dbd88c1e4bcfd25859dba2d20c8da86f620738b0f8670464"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAConnection.java:415-423 | store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAConnection.java:437-445 \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 \u0060store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAConnection.java:415\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":"store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAConnection.java"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"960cc43f373995e97022d1c3580ea0575f658d10b642c58713f1def4de82aa18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:559-567 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:1028-1037 \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 \u0060store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:559\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":"store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebe50e6893040938b68dd0172e3e6f02970113ff1e5038953c15b022d34ae798"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:405-413 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:428-436 \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 \u0060store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:405\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9f362635f9c8ba636bbe765f73e0d7360bfad64c2c38cfffc48d50a06f3bad1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:715-724 | store/src/main/java/org/apache/rocketmq/store/queue/SparseConsumeQueue.java:142-150 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:715\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":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6e5125ded905fb3145976f6631e2e83c5744910bfd7e8c15d6df7c2d908f38e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:247-255 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:350-358 \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 \u0060store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:247\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":"store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b5320b19ceffd731fc31091fcefb5c061d43f619c43da289600538e083b33f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:677-685 | store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:694-702 \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":"store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java"},"region":{"startLine":677}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a8d82cb0fb3d0582c58f93e429033b67fc9bc05c59570ad0a7cab490498c878"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:391-399 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:857-866 \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 \u0060store/src/main/java/org/apache/rocketmq/store/CommitLog.java:391\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dbed545adacf416bbce896063e0f3b258f0a73b128c1fb1f63f13f09247ede4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1101-1109 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1262-1270 \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 \u0060store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1101\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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"080aedf31929aaac34cf23de804ad89756f95902e32340054ba63a8ad6cc66aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1116-1124 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1275-1283 \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 \u0060store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1116\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1116}}}],"partialFingerprints":{"codehealthFindingId/v1":"e54c2652e569d6471c3d71dd7a4273eb2fbdf38822e8cb7dd7f8756059b5f542"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1751-1759 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1861-1869 \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 \u0060store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1751\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1751}}}],"partialFingerprints":{"codehealthFindingId/v1":"875789cf382adce440caa747f8ebd34fb630c260efbb689dee79045c08b8a2ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:2454-2462 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:2476-2484 \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 \u0060store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:2454\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":2454}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7692389f76cf2371f7cf671f1c7f8da72d05e4c48fd880e522be52c545a25bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java:558-566 | store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java:601-609 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java:558\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b62ae600ac00c90182518f22992f24c2ac37c912cd49006d7c898f5ad5a45ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/MessageExtEncoder.java:261-269 | store/src/main/java/org/apache/rocketmq/store/MessageExtEncoder.java:365-373 \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":"store/src/main/java/org/apache/rocketmq/store/MessageExtEncoder.java"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3b491db86ea9b65214e6d43e439c8e596b5418dbfcce1ce00d5b15f9168f6af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java:452-460 | tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java:484-492 \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 \u0060tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java:452\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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"692a5929369d9f2ceeea990c54af107c6f213b2a44119b0d52a55df3e0a2171e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:329-337 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1157-1165 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:329\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":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e63c6f2d5f40df2fab0b38bec4cf227f74a40b45413666c87867b0d8dc76817"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1461-1469 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1492-1500 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1461\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":1461}}}],"partialFingerprints":{"codehealthFindingId/v1":"715c535182a23bd25f1eb6ae1d3f3cb997995b969a480fb3f269156ee958597d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java:87-95 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateAclSubCommand.java:87-95 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateAclSubCommand.java\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java:87\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateAclSubCommand.java"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"2162fd7512dabe8457c015d9c7e9bdcb455a2c21cac6e85178b115d686080022"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/auth/ListAclSubCommand.java:96-104 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/ListUserSubCommand.java:91-99 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/ListAclSubCommand.java:96\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":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/ListAclSubCommand.java"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"24dbaac2e7df53e94369b61fccc5720b2b9d3fa043be68e52a35a00d831f0ccb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommand.java:42-51 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByUniqueKeySubCommand.java:46-54 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommand.java:42\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommand.java"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"198f24cbeb99095362ba47766f91b2ca95bc0a0fdef8725ce99d7c38a9884cc9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerStatusSubCommand.java:60-68 | tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetadataCommand.java:61-69 \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":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerStatusSubCommand.java"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"e65b61e72b92a396e827cd2426f877b89d26b04cfd74e0eb0e6dbaef8dd4ff6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java:74-82 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicListSubCommand.java:72-81 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicListSubCommand.java\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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java:74\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupListSubCommand.java"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"d23c1b450976f7fd2e645469a2f68be264cd03e4a2b6cc4cf95853ce24c26d9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupSubCommand.java:199-207 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicSubCommand.java:161-170 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupSubCommand.java:199\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupSubCommand.java"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"331fec4979924c996e100e2e439c9d5e1e6e1713019d08ae99523dc5efd80c3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/controller/CleanControllerBrokerMetaSubCommand.java:55-63 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java:57-65 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/controller/CleanControllerBrokerMetaSubCommand.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"47ef7d008b83eb5b80fc3d41e8d62dcdefa454441725f999ce2ccad69ef96d7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/controller/GetControllerConfigSubCommand.java:78-86 | tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/GetNamesrvConfigCommand.java:75-83 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/controller/GetControllerConfigSubCommand.java:78\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/controller/GetControllerConfigSubCommand.java"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2ef2c4ccde2d8cbf9164dc0a947704460ceba2d318c200f2336d3be96bc232c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetadataCommand.java:64-72 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java:60-68 \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":"tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetadataCommand.java"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"b027aad9454acd2aa12f9c987aac948eb1e3060c267d77f515b0109183dc2d31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/message/ConsumeMessageCommand.java:257-265 | tools/src/main/java/org/apache/rocketmq/tools/command/message/ConsumeMessageCommand.java:283-291 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/message/ConsumeMessageCommand.java:257\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":"tools/src/main/java/org/apache/rocketmq/tools/command/message/ConsumeMessageCommand.java"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"dac5450065a47357ac857e367586e8464b9b5a76ca5763d92ed3283dffca9d66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageByQueueCommand.java:182-190 | tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageSubCommand.java:139-147 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageByQueueCommand.java:182\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageByQueueCommand.java"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"72dbc9ed41f74e3a8d10b5ede82a28dd98d54fb057c955b197730068169e08c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByUniqueKeySubCommand.java:167-175 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java:62-70 \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":"tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByUniqueKeySubCommand.java"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"10728a097f9785d40ad72a9f1be793093fa01a8857e84ae633a35a731cfbea59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java:170-178 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/SkipAccumulationSubCommand.java:122-130 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java:170\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":"tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5a47c677045128dd9c6ed06cf413c8fe9140d8c5caab343262d671f93424322"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java:141-149 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateStaticTopicSubCommand.java:146-154 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java:141\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9fe4c1c64d65166ba2ac46f420a0c76a1c4cd02517c6e1ebd7caa25c9742cdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 7): client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:279-286 | client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:296-303 | client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:313-320 | client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:348-355 | client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:365-372 | client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:382-389 | client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:399-406 \u2014 all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:279\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"f15d35ffa8d926d17804f7c6839892898b68fb5efa7be65ab26bc2039b9d6f59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 7): tools/src/main/java/org/apache/rocketmq/tools/command/connection/ProducerConnectionSubCommand.java:44-52 | tools/src/main/java/org/apache/rocketmq/tools/command/container/AddBrokerSubCommand.java:41-49 | tools/src/main/java/org/apache/rocketmq/tools/command/container/RemoveBrokerSubCommand.java:41-49 | tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/DeleteKvConfigCommand.java:40-47 | tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateNamesrvConfigCommand.java:44-52 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/AllocateMQSubCommand.java:49-57 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/DeleteTopicSubCommand.java:67-75 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/connection/ProducerConnectionSubCommand.java"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"cedb388a8f5da70e33e0e1db495d367a17739ff4f0a3ecf9ab1068c5e3000c39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:144-151 | client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:162-169 | client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:178-185 | client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:194-201 | client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:210-217 | client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:226-233 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:144\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e3ff87eb74e6c4d75136044b29bf78a876522bdc870932eafa172e0e5931d7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.java:71-78 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/SwitchTimerEngineSubCommand.java:80-87 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateColdDataFlowCtrGroupConfigSubCommand.java:81-88 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/SetConsumeModeSubCommand.java:106-116 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/UpdateSubGroupSubCommand.java:201-211 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.java:71\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.java"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac655a3f5094d746af9c3514a68eaeb4bafbe4fb6010ffd8feb922e99a8c6a07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java:196-203 | client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java:215-222 | client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java:233-240 | client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java:251-258 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java:196\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"238bfeefe751af88fdc24bbebb48c812b3988927505dde120278f893697606c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): tools/src/main/java/org/apache/rocketmq/tools/command/auth/DeleteUserSubCommand.java:68-75 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetAclSubCommand.java:72-79 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetUserSubCommand.java:72-79 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/ListUserSubCommand.java:73-80 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/DeleteUserSubCommand.java:68\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/DeleteUserSubCommand.java"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2ff2a0dc0617b52c13f7efa7e73d62e764878521118ce3c05c95b8f8483a701"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): tools/src/main/java/org/apache/rocketmq/tools/command/connection/ConsumerConnectionSubCommand.java:47-55 | tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportConfigsCommand.java:51-59 | tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetricsCommand.java:66-74 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicStatusSubCommand.java:50-57 \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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/connection/ConsumerConnectionSubCommand.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9b7bb58b03fb838429ba53e4c8be590c19e39599d42732ffbe2de03e2ae2e00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:57-64 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:56-63 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBTopicConfigManager.java:50-57 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:57\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"991ffffc4947d100df256b564253b840be897d6b49977390ab7db2a21269fcef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:145-152 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:223-230 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBTopicConfigManager.java:178-185 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"949e71f86f1a1c2dfc02a23d2abd0e2f374109aa04c9877f3ebeb74deb4503b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:93-101 | client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:111-118 | client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:263-270 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java:93\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"62131ab595c1c7632464ead4696e12e319f6d2549b485b9ee1c406a1e392bce8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:675-683 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:754-761 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:817-826 \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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0c0eb5a2c95ee53b491085ce7243c993e68467933ae405d5246117e5d8dee92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java:267-274 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java:276-283 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java:285-292 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java:267\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":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6e410ec0a762ea1113a455873452e3e807a6cd8285474ee027dd81335e2d5b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:245-252 | store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:414-422 | store/src/main/java/org/apache/rocketmq/store/queue/SparseConsumeQueue.java:68-75 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:245\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":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"d16e44a1ce2f3aab8ebb23e7bdb53088e5aab48c76e873c193451caf2b8c049e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerEpochSubCommand.java:63-70 | tools/src/main/java/org/apache/rocketmq/tools/command/ha/GetSyncStateSetSubCommand.java:69-76 | tools/src/main/java/org/apache/rocketmq/tools/command/ha/HAStatusSubCommand.java:66-73 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerEpochSubCommand.java:63\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerEpochSubCommand.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"d19d86cd0dca589ea28d5de3093dbe9644f717a15cf97004d687f2324c789aea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java:50-57 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByUniqueKeySubCommand.java:169-177 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java:64-72 \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":"tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef88b0fbdab71019d0a4e29b406296230c3ba667628b7291a830f9155973f274"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java:442-449 | auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java:484-491 \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 \u0060auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java:442\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":"auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf2578a88403f6f25a49fec3e9bad1ae286b0b30be9239ec5bef44acacaa3ccf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java:131-138 | auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java:149-156 \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 \u0060auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java:131\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0b6b7f4a90bb6431aada42c0cef0497dceeb73ce2e1345a42517e831d2ed426"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:55-62 | broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:137-144 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:55\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"0003db843f58b477a7e5af7c7240889799631008eb01ecaa279b87cf15724a43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:241-248 | broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:292-299 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:241\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"23c42aed9d40cf10e65670c14c9a158b75dff2edf510eb05f04c4e562056a13a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:196-203 | broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:210-217 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:196\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":"broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"c682eb66e9c97d7157a9c108564b59b8679fc1245f3c64180007a46fc07199b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:240-247 | broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:261-268 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"205cc4680a580f49563be44f4857f104fb55a6d1920c1df479c27bed03064cca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:463-470 | broker/src/main/java/org/apache/rocketmq/broker/offset/LmqConsumerOffsetManager.java:152-159 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"23eef99f496408621f2f275bc9d0f18f4fb39794a55a345b96322c82c831ab02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:405-412 | broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:461-468 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aafd72be89b80244b437def516c5233ce13f8531fbbea530ca06cee74328d06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1240-1247 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:789-796 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1240\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":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":1240}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d223deff8ebe7c572720ddd1dac4352b8e47c09c1dd4dabb39211865bf1a856"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1278-1286 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2094-2101 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1278\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":1278}}}],"partialFingerprints":{"codehealthFindingId/v1":"134edd3f12d56f842f4af2aa8594f3be0ad3127aecb95f054d1ceccd90c48e68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:248-255 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:762-769 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:248\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":"broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcb90bf2b3fa897524417b4688fcfffac005d0f942738c66b59d5cd4412292ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:395-402 | broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:414-421 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:395\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"4764e0cfdfa4b5e5bcd595b375f905b220b208f8cd601a6bce9859dea68e04e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:146-153 | broker/src/main/java/org/apache/rocketmq/broker/processor/ChangeInvisibleTimeProcessor.java:125-132 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:146\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"dce1db1bf216234a2624e5afd9893f1801e0596ce734d694ec73d4a6884fb01b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:249-256 | broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:363-370 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:249\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"49d37a65058996b3a1aa58566480e3539916df3dbc1e7c84e656c91922050794"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:594-602 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:673-680 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:594\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe0db4d3f751f833d820c5ce6d9b8691a862588d35fcb1c00ad5ef4a3aeba7d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:615-622 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:696-703 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:615\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":615}}}],"partialFingerprints":{"codehealthFindingId/v1":"96c3610849b4a000a9c914a27c6656ab64a7cb25d6e986853457a9dd994f69d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3302-3309 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3326-3333 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3302\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":3302}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1fd8c5b0f87beab78b35010bace5af8c4ba3399486d4aad366dd77d28fdc80a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:117-124 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:180-187 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:117\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f6852fb6cbcb386718a6c2b59e88a1defa817048fad142198392ec50a876c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:148-155 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:195-202 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:148\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"18d141cb079a14d009c037a8b5546de74c71cd4163330d7ace1d8473cb27eb93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:300-308 | broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:371-378 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:300\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"39fee80c6707b3c88234ec699bb6c1af7ad377d4d5b5b27be2c9e0241c8928fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:701-708 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:755-763 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:701\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f428768ede4446c5d65b3441f0cc271a2f65995025220a16810ffdd8276e40a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:413-420 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:440-447 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:413\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f1856f3f3b739e0c38ad00d02e5deb5ff6884cc01a74d9939c5c8ea9756d73b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessor.java:119-126 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:723-730 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessor.java"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"db7d921ae957986364f4e0d1a734ee39f5dbb4c3d53a24f3029a550dd764800c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:242-249 | remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:294-301 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:242\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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8d748b96b04d6d1887395134a04315311f4c2d397946a2b5849c3216732a113"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:210-217 | remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:337-345 \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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c385a99a10e303f30c88387cadd22091a3f5104ac49602a215ebc7834bc6800"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java:495-502 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java:605-613 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java:495\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d0be71c894d8426a69e670bf660d98614f84d5f7731d87b3511a5146aaf484d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java:437-444 | common/src/main/java/org/apache/rocketmq/common/MixAll.java:376-383 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java:437\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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"b29e5b8a341de98b557e5af88651ef239eb3afcc6e7d4313bccc532dedc6a4e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMachineRoomNearby.java:69-76 | client/src/main/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMachineRoomNearby.java:83-90 \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 \u0060client/src/main/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMachineRoomNearby.java:69\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":"client/src/main/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMachineRoomNearby.java"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f0c515d9fb385072304b8f0ec19d632de3165f2f137bf9483ebd202d421e489"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:220-228 | client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:186-193 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:220\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"35dca6dfe411c9ee92dda3a8b438c81a5dcbb9ae1defdaeffe51822548726782"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:294-301 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:326-333 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:294\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"555fa84e4acbf20f50560619dd51c147948aebf532c0b81176487a736a841d4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:393-400 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopOrderlyService.java:307-314 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:393\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"457458e8d01384e334a4695260a05da4fb13f26a8a77345738908a7858d5d351"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/PullAPIWrapper.java:223-230 | proxy/src/main/java/org/apache/rocketmq/proxy/processor/ConsumerProcessor.java:409-416 \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 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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/PullAPIWrapper.java"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"3514ac4841f305c12ce8cf30a5b05c6ee4d9d89989b5261b9cd109c61452cb7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:461-468 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:511-518 \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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d21f030b2a60ec8a76dace207ac5f9fddf23380bdafc8d9c49884505a3a636e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): container/src/main/java/org/apache/rocketmq/container/BrokerContainer.java:293-300 | container/src/main/java/org/apache/rocketmq/container/BrokerContainer.java:324-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":"container/src/main/java/org/apache/rocketmq/container/BrokerContainer.java"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca647d420dfcffc61766385fb3ed91457ef06e30de0296a91c068e0f283fc8c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): controller/src/main/java/org/apache/rocketmq/controller/ControllerStartup.java:155-163 | namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvStartup.java:230-237 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/ControllerStartup.java"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fd5b8dece2586f7cdc70febd567d9ea2c805b6b5d4a041212454d8867169b96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): example/src/main/java/org/apache/rocketmq/example/filter/SqlFilterProducer.java:29-37 | example/src/main/java/org/apache/rocketmq/example/filter/TagFilterProducer.java:28-35 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060example/src/main/java/org/apache/rocketmq/example/filter/SqlFilterProducer.java:29\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/filter/SqlFilterProducer.java"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"630cc2f9b3e54707aff4ac22f560869e7795d721d0b7313fdfa3fcd829b3181c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): example/src/main/java/org/apache/rocketmq/example/simple/AclClient.java:87-94 | example/src/main/java/org/apache/rocketmq/example/simple/PushConsumer.java:40-47 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060example/src/main/java/org/apache/rocketmq/example/simple/AclClient.java:87\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/simple/AclClient.java"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"85975f6e8fece2652ad426d33238d887c614ab77ed048ae832c9feeec18d9cf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/processor/ConsumerProcessor.java:427-434 | proxy/src/main/java/org/apache/rocketmq/proxy/processor/ConsumerProcessor.java:445-452 \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 \u0060proxy/src/main/java/org/apache/rocketmq/proxy/processor/ConsumerProcessor.java:427\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/processor/ConsumerProcessor.java"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3450d44a9194c876748b01be35d7c38878f2cbfda3c32909fbf78c1a27c39f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/remoting/activity/ConsumerManagerActivity.java:136-143 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/activity/ConsumerManagerActivity.java:157-164 \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":"proxy/src/main/java/org/apache/rocketmq/proxy/remoting/activity/ConsumerManagerActivity.java"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d3963e22e2c424ab05ee1af93aca408ff1099f74b1d703df7dc9e4f0aa9abd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/service/relay/LocalProxyRelayService.java:56-63 | proxy/src/main/java/org/apache/rocketmq/proxy/service/relay/LocalProxyRelayService.java:80-87 \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 \u0060proxy/src/main/java/org/apache/rocketmq/proxy/service/relay/LocalProxyRelayService.java:56\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/service/relay/LocalProxyRelayService.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"549c712185d9d99796be51791164c0c79439850f36a828df5fa646e4e4cd1a8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/index/rocksdb/IndexRocksDBStore.java:180-187 | store/src/main/java/org/apache/rocketmq/store/index/rocksdb/IndexRocksDBStore.java:196-203 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/index/rocksdb/IndexRocksDBStore.java:180\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":"store/src/main/java/org/apache/rocketmq/store/index/rocksdb/IndexRocksDBStore.java"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa52ba2d8b54e87db1b08c2e19192a241042a48926e6053ae55b1d81d4c9f479"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/queue/SparseConsumeQueue.java:328-335 | store/src/main/java/org/apache/rocketmq/store/queue/SparseConsumeQueue.java:352-359 \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 \u0060store/src/main/java/org/apache/rocketmq/store/queue/SparseConsumeQueue.java:328\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":"store/src/main/java/org/apache/rocketmq/store/queue/SparseConsumeQueue.java"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"522e489d72f7dbf719b81ba1ca30380d6e52cc1f75941db43864daf92e127202"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/timer/TimerCheckpoint.java:54-61 | store/src/main/java/org/apache/rocketmq/store/StoreCheckpoint.java:48-55 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/timer/TimerCheckpoint.java:54\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerCheckpoint.java"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"dadbb555d971b58f2e59b7b60444e0d476887a70f53d695c0cb039da5e4d6a44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java:123-130 | store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java:140-147 \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 \u0060store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java:123\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"b924ecff45a89db40a8c75d25b4ef7c67941614f59a9899978a308570c956036"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java:833-840 | store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java:860-867 \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 \u0060store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java:833\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c02ed4ab13684d10b36a083d19f52c1a1b322782e6ec8e0c923c8a674325001"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1388-1395 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1398-1405 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1388\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":1388}}}],"partialFingerprints":{"codehealthFindingId/v1":"99b2a0bbc582a5213d7908adedc48582f070f1c1c65147b78150e470806aa04d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/MQAdminUtils.java:221-228 | tools/src/main/java/org/apache/rocketmq/tools/admin/MQAdminUtils.java:248-255 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/admin/MQAdminUtils.java:221\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/MQAdminUtils.java"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"f716e5e409b67e524e582549ec51ce6fc13350149cd68f26db8a2aebb62dbf72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/broker/CleanExpiredCQSubCommand.java:55-62 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/CleanUnusedTopicCommand.java:55-62 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/CleanExpiredCQSubCommand.java:55\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/CleanExpiredCQSubCommand.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"7447b799bede1699e1edb7e5549bf2258847a407a4769b0aa3b9666c3c8adc47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerConfigCommand.java:66-76 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetColdDataFlowCtrInfoSubCommand.java:71-78 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerConfigCommand.java:66\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerConfigCommand.java"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ab35bfe6b22765b5312cd86ac2dd6b1160099dc3fbfc4f924ec8c6e06373622"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateBrokerConfigSubCommand.java:74-81 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateColdDataFlowCtrGroupConfigSubCommand.java:70-77 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateBrokerConfigSubCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateColdDataFlowCtrGroupConfigSubCommand.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateBrokerConfigSubCommand.java:74\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateBrokerConfigSubCommand.java"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aec128ece13f747fd4bba88dc3f24008315b94df896f3b757a9a32989fbe5b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerSubCommand.java:55-63 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicRouteSubCommand.java:50-57 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerSubCommand.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"940cbec618652c5e565a8ce2ef72f08c6713454602d84eaa6217680998a8897a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/consumer/DeleteSubscriptionGroupCommand.java:86-93 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicSubCommand.java:163-173 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/consumer/DeleteSubscriptionGroupCommand.java:86\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/DeleteSubscriptionGroupCommand.java"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd600189d2c66373433669b07e70d7b63c0836a78e2f6d8068096cd8d52fe7fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/controller/UpdateControllerConfigSubCommand.java:88-95 | tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateNamesrvConfigCommand.java:83-90 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/controller/UpdateControllerConfigSubCommand.java:88\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":"tools/src/main/java/org/apache/rocketmq/tools/command/controller/UpdateControllerConfigSubCommand.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f96c84c194d1a75bdc2812cf0e6e9f5898c22bb03a87a0692e315b396f15a43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportConfigsCommand.java:66-73 | tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetricsCommand.java:82-89 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportConfigsCommand.java:66\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportConfigsCommand.java"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddc4543ae6eae31eadd7a17bc85d6af55b6c53ed691d78bf70f1e0e0eebee0b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteClientInfoSubCommand.java:67-74 | tools/src/main/java/org/apache/rocketmq/tools/command/lite/TriggerLiteDispatchSubCommand.java:65-72 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteClientInfoSubCommand.java:67\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteClientInfoSubCommand.java"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"61a87fd3bca67192f547d71e36102ec234203942d921b6f680b5ac771a52c376"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/AddWritePermSubCommand.java:52-59 | tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/WipeWritePermSubCommand.java:54-61 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/AddWritePermSubCommand.java:52\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/AddWritePermSubCommand.java"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"de350669353e2d97079250bcf382e680b6b0544b28d82127bde19a4bb97d60f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java:159-166 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateStaticTopicSubCommand.java:163-170 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java:159\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d2fc0f7b50edfd31234e04015f04008faea058a3672d67035742c2c7b1d0c9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 11): proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:213-219 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:230-236 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:247-253 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:265-271 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:298-304 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:316-322 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:333-339 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:351-357 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:376-382 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:394-401 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:414-421 \u2014 all 11 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:213\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":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c80d8268cdcc71e540335d1f52933a0c867dde83df6b2ab6cd1fabd1abeacb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 8): tools/src/main/java/org/apache/rocketmq/tools/command/container/AddBrokerSubCommand.java:55-61 | tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteClientInfoSubCommand.java:66-73 | tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteGroupInfoSubCommand.java:73-80 | tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteTopicInfoSubCommand.java:67-73 | tools/src/main/java/org/apache/rocketmq/tools/command/lite/TriggerLiteDispatchSubCommand.java:64-71 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/AllocateMQSubCommand.java:62-68 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/RemappingStaticTopicSubCommand.java:87-94 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateStaticTopicSubCommand.java:92-98 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 8 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/container/AddBrokerSubCommand.java:55\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/container/AddBrokerSubCommand.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"c03f8a74e54701c953be47bebf222b74ae08bfd948a137314d16de2172d2e7b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:620-626 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:674-681 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:753-759 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:816-824 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:620\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":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":620}}}],"partialFingerprints":{"codehealthFindingId/v1":"aebd579fabbf1853505dc8ea74883cba44e3671466a9b1447a7ca9b932741805"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2618-2624 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2810-2816 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2840-2846 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2869-2875 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2618\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":2618}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d6af309e771d669c4399e9626fd6eb68d2c2e511f60629f623a5fe9634aaaf2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingManager.java:263-269 | broker/src/main/java/org/apache/rocketmq/broker/processor/ConsumerManageProcessor.java:110-116 | broker/src/main/java/org/apache/rocketmq/broker/processor/ConsumerManageProcessor.java:207-213 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingManager.java:263\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingManager.java"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"235d212dfd95e43b510b47a09cbe6ef887772748fc52f12b1f435517486a2f5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:493-499 | broker/src/main/java/org/apache/rocketmq/broker/metrics/PopMetricsManager.java:80-86 | remoting/src/main/java/org/apache/rocketmq/remoting/metrics/RemotingMetricsManager.java:77-83 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:493\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":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"fae633a05f6ce207714528b6441b6e4e148a001da1f63770c70774b61def2178"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1003-1009 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1044-1050 | container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java:243-250 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1003\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1003}}}],"partialFingerprints":{"codehealthFindingId/v1":"b25d592dcfc30686f892896853ed85717852d5f0cb8a0a6fe8217d9886f09425"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:144-150 | broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:180-186 | broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:228-234 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:144\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"53e2507a177eb991ed94b89354c80e4d3e1a6de8753ef7c61d7ba9b414bccddf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:190-196 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:457-463 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:610-616 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:190\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e4075da059951f5c7b7e460f21744ad27e45d5fb1a6d35039b694499b3e2332"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1655-1661 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1716-1722 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1786-1792 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":1655}}}],"partialFingerprints":{"codehealthFindingId/v1":"b878cb1ffc1c7ce5cd52844cb5fe883b06095d8b3e0b0257cea5218372046ce5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): example/src/main/java/org/apache/rocketmq/example/broadcast/PushConsumer.java:47-54 | example/src/main/java/org/apache/rocketmq/example/tracemessage/OpenTracingPushConsumer.java:50-56 | example/src/main/java/org/apache/rocketmq/example/tracemessage/TracePushConsumer.java:42-48 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060example/src/main/java/org/apache/rocketmq/example/broadcast/PushConsumer.java:47\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/broadcast/PushConsumer.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d938a64633250b83f23330f7601e3d863d10731a1dd464bc829e88e2706348d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): filter/src/main/java/org/apache/rocketmq/filter/util/BitsArray.java:94-100 | filter/src/main/java/org/apache/rocketmq/filter/util/BitsArray.java:116-122 | filter/src/main/java/org/apache/rocketmq/filter/util/BitsArray.java:135-141 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060filter/src/main/java/org/apache/rocketmq/filter/util/BitsArray.java:94\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":"filter/src/main/java/org/apache/rocketmq/filter/util/BitsArray.java"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"24ee36c57cf1931f2a1786a924b731d8231f35264243334b3969998914279c6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): proxy/src/main/java/org/apache/rocketmq/proxy/service/route/ProxyTopicRouteData.java:36-42 | proxy/src/main/java/org/apache/rocketmq/proxy/service/route/ProxyTopicRouteData.java:53-59 | proxy/src/main/java/org/apache/rocketmq/proxy/service/route/ProxyTopicRouteData.java:71-77 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060proxy/src/main/java/org/apache/rocketmq/proxy/service/route/ProxyTopicRouteData.java:36\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/service/route/ProxyTopicRouteData.java"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dcf669aeab5ae1b26872781684a8ccf49acd5ac70a1c93efc7f49580b20fa7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:467-473 | store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:489-495 | store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:500-506 \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. 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":"store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"9159e2ed5aed03124a685a3352f699100edf299501606cc51e6c897282ad4063"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:80-86 | auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:106-112 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:80\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"0988336eddbd83dca8f714a3da24baa83ca5f175b6e8d00c9dbcb8088fced45d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java:144-150 | auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java:183-189 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"c06a414ed68a3fa2f3b95d699acd6e9fbfd42e222175577fc27d5499255a4125"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): auth/src/main/java/org/apache/rocketmq/auth/authorization/provider/LocalAuthorizationMetadataProvider.java:85-91 | auth/src/main/java/org/apache/rocketmq/auth/authorization/provider/LocalAuthorizationMetadataProvider.java:113-119 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060auth/src/main/java/org/apache/rocketmq/auth/authorization/provider/LocalAuthorizationMetadataProvider.java:85\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/authorization/provider/LocalAuthorizationMetadataProvider.java"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"67ee081410883ee2690a4cf36e91280557ef9e05183a4509c05e31987d32ce65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java:122-128 | auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java:140-146 \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":"auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa549c3db9f984117dd88a3ed2d075a898e1a604e5810f3dc941ccc07f42c3a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:232-238 | broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:283-289 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:232\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffbee6ab5f2656424320ed57aa57533d3e0147f05b7d0230ff568814d1ceb7be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/coldctr/ColdDataCgCtrService.java:89-95 | broker/src/main/java/org/apache/rocketmq/broker/coldctr/ColdDataPullRequestHoldService.java:73-79 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/coldctr/ColdDataCgCtrService.java:89\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":"broker/src/main/java/org/apache/rocketmq/broker/coldctr/ColdDataCgCtrService.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"486905ccf02950be6da4068ad8635fb6b0683c848d8fb9a0fbd4e7e96f4a007d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:72-78 | broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:119-125 \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":"broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5ba786fbc076cf434ed3615e456ced5f7247775b5a938cc193dcc352c2e4726"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:125-131 | broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:142-148 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d6a82d1fcc1f038cf72f2c66200add4615a7f4b92705d8502aacc9a09a605f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:231-237 | broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:252-258 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd217e0f57ab8beca91f018c8a2cad066c435778884ce66dcf2a65370b0d233c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:184-190 | broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:254-260 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:184\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"f702049ae9da8c5b95ccb733313c194c44e32dc609651c3ed262582976b82ce8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:208-214 | broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:280-286 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:208\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":"broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b9eb9eecfec52001ec1592f21fb9c465248d8eea421b1de02fb2e59e172c0b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1601-1607 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/PullAPIWrapper.java:131-137 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1601\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":1601}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aef307ed3e7fcf0f8583e48e857ff0eac444d7383c14f1e2506ab8bcc6b4cf0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerRocksdbStore.java:73-80 | common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java:158-164 \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":"broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerRocksdbStore.java"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c7a9d5201666dc356fbd1d536b491d329f81a1776aa135b76ae0b8788566d41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:156-162 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:854-861 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java: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":"broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"5af6506ba5bdf7c8771cb2bc8e688b1a94af1308fd73f43d29984e9869fc597f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:689-696 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:115-121 \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":"broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java"},"region":{"startLine":689}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7523d42019d7bf12d5f44ec7960d1ea144228d3955de064e61f587d975b4399"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:856-862 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1842-1851 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:856\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":856}}}],"partialFingerprints":{"codehealthFindingId/v1":"96dcd15de765b0bac8f0ac30090b2deb6edb1911598b76c680c3aa005093e408"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1877-1883 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2432-2438 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1877}}}],"partialFingerprints":{"codehealthFindingId/v1":"1da4e5f80ce3f914f63a9b40684da55ec95fc1ba9ebef3dad73fb6da988f58ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3076-3082 | broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/DefaultTransactionalMessageCheckListener.java:73-79 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3076\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":3076}}}],"partialFingerprints":{"codehealthFindingId/v1":"3546fd43d47cab3d97bbc8d8c5dd8b486fac42fb43f47553197cc5702eb518b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:133-139 | broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:168-174 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:133\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"d06773ade21bc3cc6ec23669f1c568bf8efc39c31d21387f3020fe1767cd192c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:139-145 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:160-166 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:139\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"a10a81033a2e824b5986440fc1bc1ba084175e12add444cf4c4fb4abf3672731"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:860-866 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:874-880 \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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb00cc49ead5cd59b6b63d3a4c0fd57d1dcaa7a512b929fd10b364fc3173bdf4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:325-332 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:362-368 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"536d2e7976dfd933c303c6a6f4dba25878e8dc87cf6fac117837ac84137cda86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:242-248 | broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageBridge.java:130-136 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:242\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"29629dcc0225a54053786f8be599af11c7038f01b1912435366b203c4828efaa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:259-265 | broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageBridge.java:153-159 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:259\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"2081dbe46a85b2364e7ec99236670cfd2fe91d3924ee7869f81592945331c725"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:110-116 | broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:155-162 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:110\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"c637974731617051a9f2ce450e9a2df97f1ce753b2e3ab567d64946c1d1c1c77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessor.java:315-321 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:514-520 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessor.java:315\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessor.java"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6c0bc8702579147ef934e1a089355b8a59c036b9d7d232eafb3e431b6faa3cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:351-357 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:645-651 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:351\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"001c69821cab5b53bade46825c2fab961e001bfdd8bdfd4baa23b2556e73968c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java:340-346 | store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:1250-1256 \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":"broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"29e4fd844f6ad5c12d50da05c9a1c03dc166f9179bfb3c7178bae9f6ee201a8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:1994-2000 | container/src/main/java/org/apache/rocketmq/container/InnerBrokerController.java:97-103 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:1994\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":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":1994}}}],"partialFingerprints":{"codehealthFindingId/v1":"95fe4f7d1ccd7e319e188c2cfb49a52bc322094c4b289483d46988899cdd1ebf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:2459-2465 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:2227-2233 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:2459\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":2459}}}],"partialFingerprints":{"codehealthFindingId/v1":"51ec0896327f9b196f16368bc4102b50c8a541a83eb89f0e757da1c0e29bb6ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java:742-748 | client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java:396-402 \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 \u0060client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java:742\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java"},"region":{"startLine":742}}}],"partialFingerprints":{"codehealthFindingId/v1":"360a8fbea24faeb4fb4f4d8de4f36927a48d9d032b3b59deff1e464fa603438a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/consumer/MQPullConsumerScheduleService.java:65-71 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:226-232 \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 \u0060client/src/main/java/org/apache/rocketmq/client/consumer/MQPullConsumerScheduleService.java:65\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":"client/src/main/java/org/apache/rocketmq/client/consumer/MQPullConsumerScheduleService.java"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"96abba6253441f2ebd6fa92179b7ad94d1ff8f45239f1fdac1f566a405109349"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:252-258 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java:226-232 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:252\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"a18653676cca45189204e56f57b52ab5edd28aae0864816f30f731fdf067bed6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:392-398 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java:405-411 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"53d6fbde4338d9473b9205c188fb6044772c6697685fb8596873ebfef12e4470"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java:814-821 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java:863-869 \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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java"},"region":{"startLine":814}}}],"partialFingerprints":{"codehealthFindingId/v1":"49d8b2c63abc01c915cfecb2d6c6dc62218d31add6d0cc49cbf9a8bfbfc8042a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:433-439 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:553-559 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:433\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"65c98c7fabbd30df88d6d5ca1809daad1143281a6763637e1b87f93083b7bbe6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:476-482 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3348-3354 \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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"4688e8d3bd9cdb68907f64d6f936d58173514d9ef5453695612892207261b965"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:928-934 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:390-396 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:928\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":928}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7c87c67ebc8964715dd094a2689d3caac9df33fabef02bd745614d61fe8d3e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3187-3193 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3500-3506 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3187\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":3187}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b1c33524ae565d145cd4ee57ad56f955567b2abf8e27efb0d1f96381cc43994"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/trace/hook/ConsumeMessageOpenTracingHookImpl.java:61-67 | client/src/main/java/org/apache/rocketmq/client/trace/hook/EndTransactionOpenTracingHookImpl.java:53-59 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/trace/hook/ConsumeMessageOpenTracingHookImpl.java"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4ada819212b1829869c01f1615b51905e5acd58504b0df49640d1a2b2f88129"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/trace/TraceDataEncoder.java:51-57 | client/src/main/java/org/apache/rocketmq/client/trace/TraceDataEncoder.java:119-125 \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":"client/src/main/java/org/apache/rocketmq/client/trace/TraceDataEncoder.java"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"34886b53d7f1f676b32ab04176e259efe9171a2bb4dc5d399624d8d9c6d1044d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/compression/ZlibCompressor.java:34-40 | common/src/main/java/org/apache/rocketmq/common/UtilAll.java:408-414 \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 \u0060common/src/main/java/org/apache/rocketmq/common/compression/ZlibCompressor.java:34\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/compression/ZlibCompressor.java"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3385492d1cf2c62724ca1471d517a42b4736b101665aae52f1a85c506f630e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/lite/LiteUtil.java:58-64 | common/src/main/java/org/apache/rocketmq/common/lite/LiteUtil.java:72-78 \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 \u0060common/src/main/java/org/apache/rocketmq/common/lite/LiteUtil.java:58\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/lite/LiteUtil.java"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c97039e94e0abd846ee8b199ad760c6519dbd75d8da590eee0057361eef3b46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/UtilAll.java:173-179 | common/src/main/java/org/apache/rocketmq/common/UtilAll.java:185-191 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/UtilAll.java"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4c10b145a17a484331f66fd46988af192873c03897a2b59a4e5b4c08d2446b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): controller/src/main/java/org/apache/rocketmq/controller/impl/manager/RaftReplicasInfoManager.java:175-181 | controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java:635-642 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060controller/src/main/java/org/apache/rocketmq/controller/impl/manager/RaftReplicasInfoManager.java:175\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/impl/manager/RaftReplicasInfoManager.java"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"44ae8a70b45973e86fc705c38ae4944213a9e6a54acbe118088a989c441c1fc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java:655-661 | controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java:670-676 \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 \u0060controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java:655\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java"},"region":{"startLine":655}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc9e03f7529cc07795215c9fc96758178ecdf3824f6ee3f25e4580907f833823"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/common/ReceiptHandleGroup.java:216-222 | proxy/src/main/java/org/apache/rocketmq/proxy/common/ReceiptHandleGroup.java:241-247 \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 \u0060proxy/src/main/java/org/apache/rocketmq/proxy/common/ReceiptHandleGroup.java:216\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/common/ReceiptHandleGroup.java"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2349e9c320c75e3f2e907783d9e08111ab2ee3c7985c8cea0693e9ff93566d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/client/ClientActivity.java:417-423 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/client/ClientActivity.java:433-439 \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 \u0060proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/client/ClientActivity.java:433\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":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/client/ClientActivity.java"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"393123271f1ca0b2c5435a70cb68397ddc2c24eb563e4a73dd67fc04cd5112cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:112-118 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:210-216 \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 \u0060proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:112\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"1db56f727d5413c076411f8aaa6d47ab0103ded12080c9c1084ad299d26e0a1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/service/relay/LocalProxyRelayService.java:46-52 | proxy/src/main/java/org/apache/rocketmq/proxy/service/relay/LocalProxyRelayService.java:70-76 \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 \u0060proxy/src/main/java/org/apache/rocketmq/proxy/service/relay/LocalProxyRelayService.java:46\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/service/relay/LocalProxyRelayService.java"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"a33f35550b9027f789077d99a0e7d8786675d8a4c39577738e5e2b5df0fedecd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:292-298 | store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:320-326 \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 \u0060store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:292\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1814306cc8a682b80740777c34c0d429007206dc4ccda063e96872bbdbfdd7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:643-649 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1178-1184 \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 \u0060store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:643\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"acc176ab96fdbe8690286e3af74dd3bf0243e1931397bec40c32c443119174dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAConnection.java:113-119 | store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAConnection.java:68-74 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAConnection.java"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b43c618dde1596d55570865147d793a0aca86b699b4bcbcf6804ed984282f7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java:387-393 | store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAService.java:226-232 \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 \u0060store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java:387\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ba50f7f443dc476661ad264f76436075b2b26e91bc2d7cc426f1139d77b74cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java:404-410 | store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAService.java:243-249 \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 \u0060store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java:404\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"a35604f9078432e61512e492d696aced1af67912f421a62c085a890ac514288f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java:118-125 | store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java:207-213 \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 \u0060store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java:118\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":"store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe8911d50a95bd2cad196eb2f29941d7864057de45e6fc723a9af9a79cd1446a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:644-651 | store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:684-690 \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 \u0060store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:644\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java"},"region":{"startLine":644}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce5489f15b4833a3dafe39335d3a22841a276cf1215be2f304474fb1572b7ba8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:721-730 | store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:764-770 \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 \u0060store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:721\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java"},"region":{"startLine":721}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1e9e3374804c18edd05dc95912cff4143aafc8c22dfd76a49e7ffa2be9b5655"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:977-983 | store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:1006-1012 \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 \u0060store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:977\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java"},"region":{"startLine":977}}}],"partialFingerprints":{"codehealthFindingId/v1":"36aa4b8a0fd3a27b35414c6e021fa861688e418f92cf3a6463115cd1306ec033"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/queue/ConsumeQueueStore.java:787-793 | store/src/main/java/org/apache/rocketmq/store/queue/ConsumeQueueStore.java:803-809 \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 \u0060store/src/main/java/org/apache/rocketmq/store/queue/ConsumeQueueStore.java:787\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/ConsumeQueueStore.java"},"region":{"startLine":787}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d6ba1604994e12d51d7d4d38acd4f6f9e99822a0d88901fce183a197343737f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:351-357 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:773-779 \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 \u0060store/src/main/java/org/apache/rocketmq/store/CommitLog.java:351\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"e898969f4a4a2109412214efeb81a0a1af35746882dbcdfab2101c6508a033e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:1409-1417 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:1464-1470 \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 \u0060store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:1409\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":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":1409}}}],"partialFingerprints":{"codehealthFindingId/v1":"deb5d8f2072727bb06573eb0544e612e33985869388ddff23c5cc495cbcddae5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:397-403 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:498-504 \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":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"5db1c28fcaf5d76e713d5e77adc851eaf64923d8c39845f4d9bd44e59dd4f47a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:794-800 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:946-952 \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":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":794}}}],"partialFingerprints":{"codehealthFindingId/v1":"4caa5a5aafbc3d235786256c8eaa30dd1ebe6a85b740135348152a4ce29d4e3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:989-995 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1754-1760 \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":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":989}}}],"partialFingerprints":{"codehealthFindingId/v1":"839deb81e6187c79df0470c15523c4a94141deacd3f9bc50a5ec5942f5f2aee8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/auth/CopyAclsSubCommand.java:72-78 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/CopyUsersSubCommand.java:72-78 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/CopyAclsSubCommand.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d90585cf29fcf4a71ef6726e0c1e9523841c87cde57e3551ba266c5cfa035ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateUserSubCommand.java:76-82 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/UpdateUserSubCommand.java:81-87 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateUserSubCommand.java:76\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/auth/CreateUserSubCommand.java"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5c7c753c38b33ac99f1ea7a0a5fd6f85524f7219183b2c92a980a2bb77e51b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.java:61-67 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/DeleteTopicSubCommand.java:80-86 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.java:61\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.java"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"03fa15e730f115f07fa84f27caff5497a56d4dbfab562146fca1cf82f538f0fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportConfigsCommand.java:102-108 | tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetricsCommand.java:139-146 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportConfigsCommand.java:102\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportConfigsCommand.java"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"5236a3f1d981ad5e6e1deb259fcb8e43b61fa2ee647954f609607f4fae6fef0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByKeySubCommand.java:99-105 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgTraceByIdSubCommand.java:98-104 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByKeySubCommand.java:99\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByKeySubCommand.java"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"b23ec4bbcb19b91f87d91210b6307e259660edb7bb2cd7a21f10b688143da461"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/metadata/RocksDBConfigToJsonCommand.java:261-267 | tools/src/main/java/org/apache/rocketmq/tools/command/queue/CheckRocksdbCqWriteProgressCommand.java:81-87 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/metadata/RocksDBConfigToJsonCommand.java:261\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/metadata/RocksDBConfigToJsonCommand.java"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d405164077ff0fde20a18580fec973127b5c340e8a17772da2865dca84d2899"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:131-136 | broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java:114-119 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:97-102 | broker/src/main/java/org/apache/rocketmq/broker/processor/PollingInfoProcessor.java:72-77 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:278-285 | broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java:351-356 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:131\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b4f6be79aad6848b4e314dd2fb403087858a1614bc9aea1a22e1412658a1f49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2123-2128 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2618-2623 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2810-2815 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2840-2845 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2869-2874 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2123\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":2123}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdb10c6413dd4a3304dca87ddcb3004dff4aa2322b86cf40901b9e2390af6dcb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2645-2650 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2723-2728 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2755-2760 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2926-2931 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2955-2960 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2645\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":2645}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cb7e9823794038e8f8b61dd3208a2c86779797e542196f9bb6eab2c8bcf29ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:140-145 | broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:148-153 | broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:258-263 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e2a91da3c820fdc363f2ce17c58c3001dd6d8c934bf7861cdc7562bd778a746"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java:302-307 | proxy/src/main/java/org/apache/rocketmq/proxy/config/ProxyConfig.java:327-332 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:292-297 \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. 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":"broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c1ce28665fc544ef493ddad7f27e6d5902032d4a62009645ee1b902f2b7105d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1444-1449 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2487-2492 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2790-2795 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1444\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1444}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3aa4b1e06f7d88df61871df31006db814cd9cadcb1a9e9835eda3ed24861dd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3055-3060 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3327-3332 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3389-3394 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3055\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":3055}}}],"partialFingerprints":{"codehealthFindingId/v1":"9df1e0b0dd08904c5d89b54e7f51a3fc51c63e40d857ccf1284b8c9014b9630c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:1052-1057 | namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:1073-1078 | namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:1094-1099 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:1052\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java"},"region":{"startLine":1052}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd3218a7466ad4990b2a071bcd8a3c01541231dc27ca7bac4bd2d124909b9d1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:737-742 | store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:828-833 | store/src/main/java/org/apache/rocketmq/store/queue/SparseConsumeQueue.java:197-202 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:737\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a2976587825d67e1446466eb27a2cb49f55ed2eee81809c8c069f6d346291d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateKvConfigCommand.java:56-64 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java:89-94 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java:107-112 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateKvConfigCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateKvConfigCommand.java:56\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateKvConfigCommand.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5cfc378f22d65631f5f1363c6359f8ea4f1f60ec3120a1ef99edefe758b4c7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:128-133 | auth/src/main/java/org/apache/rocketmq/auth/authorization/provider/LocalAuthorizationMetadataProvider.java:135-140 \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 \u0060auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:128\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"c303b91515b17caf311722c0314a18e6ce447ff6a87128424a1f74de68201b2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:164-169 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:179-184 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:164\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea01da57221efe7a343a4c1d1ee6b932e067e2459bcbf44ab45f34f2420ee3e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:453-458 | broker/src/main/java/org/apache/rocketmq/broker/offset/LmqConsumerOffsetManager.java:140-145 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:453\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"d18764ae42b7d2749021bb25a9e3e8d599bf463ed389bd881211c180c93eff39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:74-79 | broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:90-95 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:74\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1e8fe75b4e46bf433288a5295c0283e96b4df2bde9f8929212efe2cd358ae4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java:327-332 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:747-752 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java:327\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":"broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e252922cb1f310053a457587dc7a136e52cce18e46eab0562922b577c60e782"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:342-347 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:309-314 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:342\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"b955e79b25def4aa144e77e1e5b55892e2f391de483d182b788f3d37b5fd1c1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:355-360 | broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:402-407 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:355\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba8b1367f7cdd88b94b1b0890c591e6d5959589ae21cd3248dcceff02b87e6cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:204-209 | broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:214-219 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:204\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":"broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b6b7b02b2a01a718ce22541ea30a9fcc026e23dda67cea4d3bae3edf6534bd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1357-1362 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3443-3448 \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":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"99e47eb82b8c70cd5ae0aa8e2ff972c09f3170a18a285f67c04f9cb7fc9c603e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:661-667 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:159-164 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:661\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":"broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfed2605678fe763740e3ce316260dc20fd5d16debeb1e37d4e203ab51227cf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:701-709 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:126-131 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:701\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf723495a8099f2d466fbc3b1d7f4ee439d31aa29e22f2bd0085d41444b38250"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:137-142 | broker/src/main/java/org/apache/rocketmq/broker/processor/ChangeInvisibleTimeProcessor.java:116-121 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b3318528140753e38ef065c3baefea5f30df80aaac6ca5c66cab31749ce645f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:581-586 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:742-747 \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":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0b082712a2e65fb615aa0ec77c1d3dec0d129194ee89e321fb736180f118374"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1663-1668 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1701-1706 \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":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1663}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c320e80c740bc7d67570614bbdde69c9bf6ed43091ea629d7fa8215bbbea55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/ChangeInvisibleTimeProcessor.java:325-330 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:940-945 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/ChangeInvisibleTimeProcessor.java"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe85b3aab1d58cf2df4a8e425def9752108ca036cb7a670817440cefc89a7291"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:523-528 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:546-551 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:523\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb6a919decaf2109edaa61205dda4e14503736b7f5530a80db77021d0833e608"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessor.java:301-306 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:489-494 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessor.java"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dff451d770cb97ed8a5954bba45c567823f3c47f5cf77e3ce32c0f3446c5bb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/transaction/rocksdb/TransactionalMessageRocksDBService.java:235-240 | broker/src/main/java/org/apache/rocketmq/broker/transaction/AbstractTransactionalMessageCheckListener.java:62-67 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/transaction/rocksdb/TransactionalMessageRocksDBService.java:235\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/transaction/rocksdb/TransactionalMessageRocksDBService.java"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"f49e74b547f4c15eff5c8a5adadbe94ca3e34157ea99cbef8cb1122bca394c4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/Configuration.java:324-329 | remoting/src/main/java/org/apache/rocketmq/remoting/Configuration.java:338-343 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/Configuration.java:324\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":"remoting/src/main/java/org/apache/rocketmq/remoting/Configuration.java"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5740c867291f5c7064b467a8dfc0e88ff893d539763ff80f45cd348c15abb70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/acl/common/AclSigner.java:50-55 | client/src/main/java/org/apache/rocketmq/acl/common/AclSigner.java:83-88 \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 \u0060client/src/main/java/org/apache/rocketmq/acl/common/AclSigner.java:50\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":"client/src/main/java/org/apache/rocketmq/acl/common/AclSigner.java"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"93736695254e22bcaf4b63a1a0a7f423dd0a4940179081208c787098cb7c7a0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:380-385 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopOrderlyService.java:295-300 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:380\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf67dd2b53de2044ff7afceffa9951cba28ca89a278edb6de321282e93e887c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:413-418 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java:1408-1414 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:413\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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d67fcd8f0088be884b75ec88b47b5f7fc8fe0755cc38c5723de9bce568068de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:160-165 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:202-208 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:160\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5ab48d69cd8d0f337c12e07f5b70b7d33d955c7d3ea7589ec625d0fa8a80cfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:559-564 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:592-598 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:559\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"36c78c30a86a62c0fc5da0c9c8331f1cd02f1601d2b12812567e2f357d7cbd3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1162-1167 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:276-281 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1162\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1162}}}],"partialFingerprints":{"codehealthFindingId/v1":"f20065cb602a8ea57c768b2bdd435db9b7793af35560f0b9fde64809f99c3a87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1178-1183 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1299-1304 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1178\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1178}}}],"partialFingerprints":{"codehealthFindingId/v1":"219dcf8b51745dfa0e2dd1d6c7c3e6839d8d8a4d8313dd831a29433eb87d869b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1203-1208 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:290-295 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1203\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1203}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aa6098dad6f1412ba3027b2b6d90380635c8e2ea584baf5c488fde2a5fb75a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1315-1320 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:268-273 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1315\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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1315}}}],"partialFingerprints":{"codehealthFindingId/v1":"b31b37e894d0a65565378db80aa68b7e2dba663cce689d21696107955e409e8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1576-1581 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1597-1602 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1576\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1576}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2492c3562969fd9482e328d891bad3a68fd41d4227342a8373acf7a90dd7b17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/trace/hook/EndTransactionOpenTracingHookImpl.java:52-58 | client/src/main/java/org/apache/rocketmq/client/trace/hook/SendMessageOpenTracingHookImpl.java:52-57 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/trace/hook/EndTransactionOpenTracingHookImpl.java:52\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/trace/hook/EndTransactionOpenTracingHookImpl.java"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dc5361ce418215fd9d75a3a58458190c956de83369dda944b6e731ae2b59423"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/trace/hook/EndTransactionTraceHookImpl.java:57-62 | client/src/main/java/org/apache/rocketmq/client/trace/hook/SendMessageTraceHookImpl.java:54-59 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/trace/hook/EndTransactionTraceHookImpl.java"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"06f3b02e268ed4337943d2c31e1ce461819fb8fc68348e30505828e2fc46bae3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/message/MessageDecoder.java:199-204 | common/src/main/java/org/apache/rocketmq/common/message/MessageDecoder.java:318-323 \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":"common/src/main/java/org/apache/rocketmq/common/message/MessageDecoder.java"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f76623bfad06d77c2c82cb4158c3675a8d6729c888dabc60d62de86a2bdb9ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): controller/src/main/java/org/apache/rocketmq/controller/impl/heartbeat/DefaultBrokerHeartbeatManager.java:186-191 | controller/src/main/java/org/apache/rocketmq/controller/impl/heartbeat/RaftBrokerHeartBeatManager.java:266-271 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060controller/src/main/java/org/apache/rocketmq/controller/impl/heartbeat/DefaultBrokerHeartbeatManager.java:186\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/impl/heartbeat/DefaultBrokerHeartbeatManager.java"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"d30249bb93cf23bd29c5c7710abb736f45f97fed2d6e3e83da94f77295ff5b8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java:625-630 | controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java:634-639 \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":"controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"18f2878b3bc5ca8ad0b1bd044c36425bd7ca52192d95631df58801b74a68a1b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): controller/src/main/java/org/apache/rocketmq/controller/impl/task/RaftBrokerHeartBeatEventRequest.java:51-56 | controller/src/main/java/org/apache/rocketmq/controller/impl/task/RaftBrokerHeartBeatEventRequest.java:77-82 \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":"controller/src/main/java/org/apache/rocketmq/controller/impl/task/RaftBrokerHeartBeatEventRequest.java"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a58a7534027d2ad646215034438052919a3198bdbddfc3b19a6b214059d13fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): controller/src/main/java/org/apache/rocketmq/controller/metrics/ControllerMetricsManager.java:305-310 | controller/src/main/java/org/apache/rocketmq/controller/metrics/ControllerMetricsManager.java:340-345 \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 \u0060controller/src/main/java/org/apache/rocketmq/controller/metrics/ControllerMetricsManager.java:305\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/metrics/ControllerMetricsManager.java"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"931f90749d8ace27411885d049fa2de856037e1e130f5c48507c001cd4c90717"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/metrics/ProxyMetricsManager.java:150-155 | proxy/src/main/java/org/apache/rocketmq/proxy/metrics/ProxyMetricsManager.java:190-195 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060proxy/src/main/java/org/apache/rocketmq/proxy/metrics/ProxyMetricsManager.java:150\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/metrics/ProxyMetricsManager.java"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"b89913a4f45ab7713b06b857208301d230fcde0165226374bb5af75c8f0dd521"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/processor/ConsumerProcessor.java:495-500 | proxy/src/main/java/org/apache/rocketmq/proxy/processor/ConsumerProcessor.java:523-528 \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 \u0060proxy/src/main/java/org/apache/rocketmq/proxy/processor/ConsumerProcessor.java:495\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/processor/ConsumerProcessor.java"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"d14c352ef5bdfe36571ee54309ee8dcd40552d38e6a7e9ffef2d895fbd822ef1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java:274-279 | store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java:535-540 \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 \u0060store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java:274\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":"store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"72a812dda4aa622945858377b7fbba3702078610d488c58cc04a89150574f7b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java:348-353 | store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java:538-543 \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 \u0060store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java:348\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":"store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"02480135311ddd1823ac1117678e19afabe411fd38cd2930855342012898ef63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:714-719 | store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:727-732 \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":"store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"1be2514abc14b50a355c52883d54292947e2ab9b3b6e8a271294e376d1fc5d4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java:81-87 | store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java:98-103 \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 \u0060store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java:81\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"8713f25e283155a9e9aedd2019b8a639212aeff16d9711b4ecc77bee4857be7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1949-1954 | store/src/main/java/org/apache/rocketmq/store/MessageExtEncoder.java:189-194 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1949\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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1949}}}],"partialFingerprints":{"codehealthFindingId/v1":"c074e66f23c91968b3ae749e5348fde65e4e07c2e300cc66d25e6eef56b91253"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:1398-1405 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:1455-1460 \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 \u0060store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:1398\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":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":1398}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a4993b21c1ea58c7d197c00614cbac0613e5a90383ed723f8bee81758c6eb3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/GetMessageResult.java:116-121 | store/src/main/java/org/apache/rocketmq/store/GetMessageResult.java:125-130 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/GetMessageResult.java"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b3cc9c1578f1b76764266888b6f64a58cfb0e413306be760a4b2634e0ef4d23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreFetcherImpl.java:321-326 | tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreFetcherImpl.java:449-454 \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 \u0060tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreFetcherImpl.java:321\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreFetcherImpl.java"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"1722aeaad3810289e9b28a4f95cda266be3e2f78f5c01a8be14ddda3e0a3f9e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java:436-443 | tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java:470-475 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c7326fc2fcf51e31d61c219672c4f97be37dab9ae00711cffb0ce8ffb074324"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:607-612 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:644-649 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:607\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"344b80e43f33e17cf72f56d5b6e6e046853d6d1a96d85dd80599ecdfb1fd8f79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:758-763 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1904-1909 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:758\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":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":758}}}],"partialFingerprints":{"codehealthFindingId/v1":"33046b63a0eb23a46d14e52c2a373b2499addfebe3c099ad8dec93a7b5cffbff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1364-1369 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1456-1461 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1364\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":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":1364}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3bbef9f45275188ccb002765a4dfc33ce35dbba52da923fed12c9d69acdbff5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/broker/SwitchTimerEngineSubCommand.java:79-84 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/DeleteSubscriptionGroupCommand.java:83-91 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/SwitchTimerEngineSubCommand.java:79\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/SwitchTimerEngineSubCommand.java"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"02e19ff1a6b41d7b3a0649ac09da23b836055936a319115f5ef03c61ab585fbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/CommandUtil.java:92-100 | tools/src/main/java/org/apache/rocketmq/tools/command/CommandUtil.java:119-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/CommandUtil.java:92\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/CommandUtil.java"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"36f8346f745d57b44cc3ae3785ce09b650e09ea8ecc0cf0b27913923d6b01a2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): openmessaging/src/main/java/io/openmessaging/rocketmq/consumer/PushConsumerImpl.java:54-59 | openmessaging/src/main/java/io/openmessaging/rocketmq/producer/AbstractOMSProducer.java:51-56 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060openmessaging/src/main/java/io/openmessaging/rocketmq/consumer/PushConsumerImpl.java:54\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"openmessaging/src/main/java/io/openmessaging/rocketmq/consumer/PushConsumerImpl.java"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b06c42b64f6f9a8e803f8d6911e79b00253dabc4bcf37bb0149557bdc7e3987"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): openmessaging/src/main/java/io/openmessaging/rocketmq/utils/BeanUtils.java:145-150 | openmessaging/src/main/java/io/openmessaging/rocketmq/utils/BeanUtils.java:169-174 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060openmessaging/src/main/java/io/openmessaging/rocketmq/utils/BeanUtils.java:145\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"openmessaging/src/main/java/io/openmessaging/rocketmq/utils/BeanUtils.java"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"df032cb09fb99b0cc208211a6f36135d12dc92e908e659f9f39ee7d13180d2ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByOffsetSubCommand.java:80-85 | tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateKvConfigCommand.java:57-64 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java:90-94 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java:108-112 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateKvConfigCommand.java\u0060 and \u0060tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByOffsetSubCommand.java:80\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByOffsetSubCommand.java"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"40c4331566eb65b2501861b934a54073407e21fc5bec1b07d763dd9f307f7210"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:108-112 | broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:144-148 | broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:162-166 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:108\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"4495a794c44e2aedd0c46274da28e6b75ca0151dbd52585ac337fbf63505fd16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:399-403 | controller/src/main/java/org/apache/rocketmq/controller/metrics/ControllerMetricsManager.java:337-341 | proxy/src/main/java/org/apache/rocketmq/proxy/metrics/ProxyMetricsManager.java:187-191 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:399\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"03fd275ffb84443e533ebe4bef5d2d712024096b140fdbf39045b49a28526fb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/consumer/AssignedMessageQueue.java:123-127 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/AssignedMessageQueue.java:139-143 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/AssignedMessageQueue.java:168-172 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/AssignedMessageQueue.java:123\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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/AssignedMessageQueue.java"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"b44321198ebaeefba82e5134af24044b821e9ec34bd3f34589863e655836ce52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): tools/src/main/java/org/apache/rocketmq/tools/command/broker/CommitLogSetReadAheadSubCommand.java:83-87 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerConfigCommand.java:78-87 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetColdDataFlowCtrInfoSubCommand.java:79-83 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/CommitLogSetReadAheadSubCommand.java:83\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/CommitLogSetReadAheadSubCommand.java"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"409da9e2b6932fe7bd6c65094a15e382ebd5483e71dc51d4cacb0ef2e5036728"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/lite/RocksDBLiteLifecycleManager.java:63-67 | broker/src/main/java/org/apache/rocketmq/broker/lite/RocksDBLiteLifecycleManager.java:78-82 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/lite/RocksDBLiteLifecycleManager.java:63\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/lite/RocksDBLiteLifecycleManager.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3a913c3909b24b9231a91e814fd50f5f47aaccad9fbe4a6fd7630925a3c6e52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java:217-221 | broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/DefaultTransactionalMessageCheckListener.java:65-69 \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 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"589b87b670037d2d4fdc7585bb4af26ee4335d2c4af9d8610837b0d771a9bfc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:126-130 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:255-259 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:126\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"2add60e84ea3175411c49ccb1d03ad63ccbb54c0c28721aa2f53b9d30a95cc74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:302-306 | broker/src/main/java/org/apache/rocketmq/broker/processor/RecallMessageProcessor.java:163-168 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:302\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":"broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"8691f6e30288f5a238449113b7b938a176e18aecc74f937af88115b52c9e16a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:86-90 | broker/src/main/java/org/apache/rocketmq/broker/processor/PollingInfoProcessor.java:61-65 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:86\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed39f30c4624861b9d35278de44d24b0039b72ed93d786bb0d4a2c16f34a6d19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:674-678 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:730-734 \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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java"},"region":{"startLine":674}}}],"partialFingerprints":{"codehealthFindingId/v1":"b56dff2218506aa44ed4e9bfe7f1c0990e1c29dbe202a33ef77af40446f75221"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:313-317 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:609-613 \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":"broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e878d1bc3a411ba61df4ec1104fff9e148bed07bb1b1202a7c981b34f76564a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:1283-1287 | broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:1290-1294 \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":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":1283}}}],"partialFingerprints":{"codehealthFindingId/v1":"3af535b6bf43947fe41209ad9992be50de72c2d2b2b2a68fa58f571426dfa695"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/rpc/ClientMetadata.java:70-75 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:1212-1216 \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 \u0060remoting/src/main/java/org/apache/rocketmq/remoting/rpc/ClientMetadata.java:70\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/rpc/ClientMetadata.java"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"a00e6e7b34e7a828d4613e3bbffbb0d90b38424f98d937ae04dbfae90a9857c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:809-813 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:846-850 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:809\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":809}}}],"partialFingerprints":{"codehealthFindingId/v1":"467ec98794a9cf67fe95fa695d8be10b314222f0ad4b8c09094617c7ea44d9ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1151-1155 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:257-261 \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":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1151}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ba1120bdc309df3273f1940c0a6980394f5f2e6b61fcc5f425eff3a89ece8aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3268-3274 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3311-3315 \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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3268\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":3268}}}],"partialFingerprints":{"codehealthFindingId/v1":"c92a1fe17f80adbfe4d729b8522eb414177683fd42c946ec9ad882cfa1ba2ecb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/trace/hook/EndTransactionOpenTracingHookImpl.java:59-63 | client/src/main/java/org/apache/rocketmq/client/trace/hook/SendMessageOpenTracingHookImpl.java:59-63 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/trace/hook/EndTransactionOpenTracingHookImpl.java"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c200105acad36335ff0232ffc9b6d9f3e24ee937c908a7856518e47f98bc27f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/message/MessageQueue.java:69-73 | common/src/main/java/org/apache/rocketmq/common/message/MessageQueueForC.java:62-66 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/message/MessageQueue.java"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"43d408168151cba0da48d8ea729a91ae39e34a9ed1432e834c4b862d02384b8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): controller/src/main/java/org/apache/rocketmq/controller/impl/event/ListEventSerializer.java:56-60 | controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java:611-615 \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 \u0060controller/src/main/java/org/apache/rocketmq/controller/impl/event/ListEventSerializer.java:56\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":"controller/src/main/java/org/apache/rocketmq/controller/impl/event/ListEventSerializer.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"94b66614c4cda5f97a8f6dddcdf67181a02e7fb42a6d2d4ef88ecd865f6944ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): controller/src/main/java/org/apache/rocketmq/controller/impl/heartbeat/DefaultBrokerHeartbeatManager.java:78-82 | controller/src/main/java/org/apache/rocketmq/controller/impl/manager/RaftReplicasInfoManager.java:116-120 \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 \u0060controller/src/main/java/org/apache/rocketmq/controller/impl/heartbeat/DefaultBrokerHeartbeatManager.java:78\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":"controller/src/main/java/org/apache/rocketmq/controller/impl/heartbeat/DefaultBrokerHeartbeatManager.java"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1a5451a294122d81686e5b287d82170720f610ae0488bac1268f7ca7c8a7dfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): example/src/main/java/org/apache/rocketmq/example/lmq/LMQPushPopConsumer.java:93-97 | example/src/main/java/org/apache/rocketmq/example/simple/PopConsumer.java:57-61 \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 \u0060example/src/main/java/org/apache/rocketmq/example/lmq/LMQPushPopConsumer.java:93\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"example/src/main/java/org/apache/rocketmq/example/lmq/LMQPushPopConsumer.java"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cf3c67d350b8e8e2cebc2ce6c4f9d9156007a9345c33219cc410df49ca4eb8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssign.java:33-37 | example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssignWithSubExpression.java:35-39 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssign.java:33\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":"example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssign.java"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aef252ea18b234fa8f2848ab47420ecc51027a0ae298a4110a8071b671ee0a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:548-552 | filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:562-566 \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 \u0060filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:548\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":"filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"6664b71f528820b5e26762b0ae15768ac47ae8ad3123e1ea7a9d68b6493e5b8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/AckMessageActivity.java:190-194 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/producer/SendMessageActivity.java:374-378 \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 \u0060proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/AckMessageActivity.java:190\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":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/AckMessageActivity.java"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"4888b38de22dfb663330399c398db832d0dfa64df6b90da0cdb1348fd37d21aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java:395-399 | store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAService.java:234-238 \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 \u0060store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java:395\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":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a2c824cef4dcc4a9664488a589b3f5afa5801432b719f184aa1eb28c2a5c0f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:970-974 | store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:999-1003 \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 \u0060store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:970\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java"},"region":{"startLine":970}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fb41fecf58c2a114f565ca1101d3560a5569e09c7ec9ff02602ec1e7568627c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueStore.java:338-342 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:776-780 \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":"store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueStore.java"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e88ad283f927c875f38f70c66a2eaa71cb7aea237d647c3ffc00598d5bbfb78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java:265-269 | store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:1267-1271 \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 \u0060store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java:265\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":"store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6d5b6fb3c63388d6b23126b8ea7887c52939c0f7c14f6f08a4623fb1760e25f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java:483-487 | store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:804-809 \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 \u0060store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java:483\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"a311b2c21a2d9e80fa84081ea6232d3bee6c04fe67542b6a52ab0bd7a9719477"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:1784-1788 | store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:1820-1824 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1784}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cf2356bea2c1182c97e9cc746dc73e718f9aceface13a20157bbcf4960519c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/timer/TimerWheel.java:328-332 | store/src/main/java/org/apache/rocketmq/store/timer/TimerWheel.java:352-356 \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 \u0060store/src/main/java/org/apache/rocketmq/store/timer/TimerWheel.java:328\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":"store/src/main/java/org/apache/rocketmq/store/timer/TimerWheel.java"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee91a411dc85d90d6322e2346924cc99b2738acd75cbb578df8e7dee2bc135bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): tieredstore/src/main/java/org/apache/rocketmq/tieredstore/metadata/DefaultMetadataStore.java:60-64 | tieredstore/src/main/java/org/apache/rocketmq/tieredstore/metadata/DefaultMetadataStore.java:298-302 \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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/metadata/DefaultMetadataStore.java"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"71a400826f1fb29c8ff36ac9cf3cb43cecb5388dcaf020fb4ffd6033fe355d57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1327-1331 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1341-1345 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1327\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":1327}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f88bc40dbc3512ab57473739e64941c453e981a2b2c18963de71b3f0818402e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1411-1415 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1502-1506 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1411\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":1411}}}],"partialFingerprints":{"codehealthFindingId/v1":"db92d74a64f501a305694d94d567ed890cd20ec07e3b7d46538366144b582412"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteGroupInfoSubCommand.java:135-139 | tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteGroupInfoSubCommand.java:152-156 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteGroupInfoSubCommand.java:135\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteGroupInfoSubCommand.java"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"c500e2fbbc87f6161a298692a7e06cea91a133240140af703f3ca052b549e798"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/monitor/MonitorService.java:215-219 | tools/src/main/java/org/apache/rocketmq/tools/monitor/MonitorService.java:273-277 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/monitor/MonitorService.java:215\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/monitor/MonitorService.java"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"efa4bd341420ab6063b3d4465fc13070e1d0a763de69f3baa89d2291c510fa93"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java: broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java changed 2 times in last 90 days, max complexity 76. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"50c656fffc15dfc0afbf6af8d840d34622640cfea5c60c9e2ebfe9659e099a9c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: store/src/main/java/org/apache/rocketmq/store/CommitLog.java: store/src/main/java/org/apache/rocketmq/store/CommitLog.java changed 4 times in last 90 days, max complexity 37. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9faac1003a5d6f9874033ec57e7ad1d81e8e2b59088a1f778928fa7052d5ed4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreDispatcherImpl.java: tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreDispatcherImpl.java changed 3 times in last 90 days, max complexity 32. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreDispatcherImpl.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eacffa56f13b786c3240180a17c7fa6f2dd1e4cf95ec7d29e0196b0de4f805ac"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java: tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java changed 4 times in last 90 days, max complexity 16. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3f95b40af59200f2a4e2f6669c93afc5dd003658f16eaa2edcd2a71122ac5e1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java: broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java changed 3 times in last 90 days, max complexity 20. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ed16433b7ad532fff32b7cfb639a83f773d04926827a64c8f55fc52232c3ac1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/FlatMessageFile.java: tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/FlatMessageFile.java changed 4 times in last 90 days, max complexity 15. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/FlatMessageFile.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"18a31e8e322ac27d60f4605281e2aab50c24a443c6a451d4d1c99d3276ecf2eb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java: store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java changed 2 times in last 90 days, max complexity 29. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0198db75172569901bc9629202aedca1961fc42ac909021c57402b06c142ac2d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java: broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java changed 2 times in last 90 days, max complexity 23. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a7e1c74c310e5dde47508838973ff7fe8c7681347e1ac8de673ad29c507cd84"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/ReceiveMessageActivity.java: proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/ReceiveMessageActivity.java changed 2 times in last 90 days, max complexity 18. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/ReceiveMessageActivity.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"caec96319de5f18a802cdf4f06c531b941edf59108599e353a33908f6ebed3b8"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 11 significant file(s) lose their only recent owner: tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreDispatcherImpl.java, tieredstore/src/main/java/org/apache/rocketmq/tieredstore/provider/FileSegment.java, tieredstore/src/main/java/org/apache/rocketmq/tieredstore/provider/PosixFileSegment.java, broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerRocksdbStore.java, tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/FlatFileStore.java, tieredstore/src/main/java/org/apache/rocketmq/tieredstore/stream/CommitLogInputStream.java, store/src/main/java/org/apache/rocketmq/store/rocksdb/CqCompactionFilterJni.java, tieredstore/src/main/java/org/apache/rocketmq/tieredstore/MessageStoreExecutor.java (\u002B3 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6a7c19a9331ba4f0ce8a9351711523d41fcac800bbb73c929d9f0efb5188583f"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #2: If anonymized user #2 becomes unavailable, 10 significant file(s) lose their only recent owner: proxy/src/main/java/org/apache/rocketmq/proxy/remoting/activity/ConsumerManagerActivity.java, tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterSendMsgRTCommand.java, tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommand.java, tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerConfigCommand.java, tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerEpochSubCommand.java, proxy/src/main/java/org/apache/rocketmq/proxy/config/Configuration.java, tools/src/main/java/org/apache/rocketmq/tools/monitor/DefaultMonitorListener.java, common/src/main/java/org/apache/rocketmq/common/compression/ZlibCompressor.java (\u002B2 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0fabf973ffbaf44d0309f60f20591af0f8f89b5b4d9bca69f93cf239608e8974"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #3: If anonymized user #3 becomes unavailable, 7 significant file(s) lose their only recent owner: remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java, common/src/main/java/org/apache/rocketmq/common/message/MessageClientIDSetter.java, client/src/main/java/org/apache/rocketmq/client/producer/RequestFutureHolder.java, common/src/main/java/org/apache/rocketmq/common/message/MessageVersion.java, broker/src/main/java/org/apache/rocketmq/broker/transaction/TransactionMetricsFlushService.java, remoting/src/main/java/org/apache/rocketmq/remoting/metrics/RemotingMetricsConstant.java, remoting/src/main/java/org/apache/rocketmq/remoting/protocol/FastCodesHeader.java. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"a8f20aa0850c1e8265428769f09ca9485fc747df4ecee1546e26bac5fe1a28ae"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #4: If anonymized user #4 becomes unavailable, 6 significant file(s) lose their only recent owner: broker/src/main/java/org/apache/rocketmq/broker/lite/LiteEventDispatcher.java, broker/src/main/java/org/apache/rocketmq/broker/metrics/LiteConsumerLagCalculator.java, broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java, tools/src/main/java/org/apache/rocketmq/tools/command/lite/GetLiteGroupInfoSubCommand.java, tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java, broker/src/main/java/org/apache/rocketmq/broker/lite/ExclusiveEvictionTombstones.java. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"42f96ef6c76b199e58eb2c42390d9c0d8cabe7384df1213f5a77d5c2d3a931f5"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #5: If anonymized user #5 becomes unavailable, 4 significant file(s) lose their only recent owner: auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java, auth/src/main/java/org/apache/rocketmq/auth/authorization/chain/UserAuthorizationHandler.java, auth/src/main/java/org/apache/rocketmq/auth/authorization/strategy/AbstractAuthorizationStrategy.java, controller/src/main/java/org/apache/rocketmq/controller/BrokerHeartbeatManager.java. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"594bfe120dfe368065e91b5d531af66ead696e5150160e245a9d7239ff322579"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 17 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 (56 single-owned of 831 analysed files in total, counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). They are anonymized user #6 (2 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)), anonymized user #9 (1 file(s)), anonymized user #10 (1 file(s)), anonymized user #11 (1 file(s)) (\u002B11 more) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c944f16efa9dc933cdd60eeb0499773fb8658339fef716bac59e5e65b128ef45"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"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":"94562ecc0842fd2390e9ab08cef74aab64578828f675360bd03a56b99cfbdb4b"},"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"}}]},{"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":"5e0907820765c0c13b9f8a189ad8d6dd98aa3d0b6546b14fda6b84b40faecd7a"},"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"}}]},{"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":"4cd933b53464aad62d1c0f1b4391c94d7440c34f71f4d1d2169f3e9bcd6b1c1a"},"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"}}]},{"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":"af04828bd1a98be7313536b7157d5c60900831df6e81c516fd052660bdd7226b"},"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"}}]},{"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":"ac0e91f5e51769abdd6089d936ae897cf6e1d7a2c98654a463156b80555052ea"},"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"}}]},{"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":"4ef7b416c4e323fca41529aea9f6bbd33cae37924f9195bd02fd2c1475902631"},"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"}}]},{"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":"ed2a21a31ff2568935f8546a7cf3533e47208775c39289319599f5b7df4411b3"},"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"}}]},{"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":"75d5f102212eb8d79354b6b53a610b83675dc2d4e5248a0dd08164cbe3e1cfc1"},"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"}}]},{"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":"5bd8f4523f0941c5e4b0c0d0b01d39df1ac657bc797352f726265eb990a5d76f"},"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"}}]},{"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":"b4c5073d3a1866a5ced66575bed13feae832ca568d38ee4a3389d5f9b32b4173"},"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"}}]},{"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":"791992623af91f2ad79574da628c905ee6393874a72b0aefcf7c573f8ebc3a52"},"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"}}]},{"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":"3b2981bc2389c1f7a966f55b5db89f35e4a75949dae2dd89997f555b0b6cd9a9"},"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"}}]},{"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":"9b63cadf35fb7305c83b73b1ea031f04a974f1f938f08397b753d85a116ab18d"},"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"}}]},{"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":"d8eeae57080e11284c408f3bd7e22a3eac91462212f663f692ab676e02b276c3"},"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"}}]},{"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":"57866491f06098ef74fb1f07ea339ae802c3c44b106dca298eb30084d9bc77aa"},"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"}}]},{"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":"33950d81b767b7246cafb08ed0358c42b9471f8f679b125147dab74807a8976c"},"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"}}]},{"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":"12aa4514b36c9957cb5af06a50d0a771913bc5213351845e0f98072f79dc8f5e"},"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"}}]},{"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":"e47ef170a264692580e2646abb79f52646d2db55e1dad83ed583f60df4c5b564"},"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"}}]},{"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":"ce6ad67af8483d55f009534135addf855e1c31c3974ee07e1bcfd12a6556706d"},"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"}}]},{"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":"214176b58579a7e6b7fd26408210138ca7510c8d90eaa6d4fd7682ef67165113"},"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"}}]},{"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":"9f670320108603d0f20247f0dc653e7cf575644c1fe186454861f1cecf02ed89"},"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"}}]},{"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":"7ba6456bbee25ac5f7c53b861029ed6ae5bbdd12a59a088335d9e41e45f82cef"},"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"}}]},{"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":"5c6a2a2424fc448dbd0bcc973f4d9695bf27ca5ee81273f0dcf4c52c1a41de50"},"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"}}]},{"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":"cd05a6edc094073cade84130f0e76ac1c1aef21b0e87b468d0db21de0c11eb98"},"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"}}]},{"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":"dcac9a7e27e92b7f947ef0c232263be1edd4254f1c12e58fa99879feed91dfa4"},"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"}}]},{"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":"3204772f8a7865f5b124ae5cade18b31ef8f865fea9dd38746a17aa83459a546"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"5776ec3f08f0c20a69c94e65b6c875fbca1063e07f53366b4b6a727d7feea6da"},"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"}}]},{"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":"e7d4a7e7ed7f6fe9dbf8ffc673fee279c88e8706c97ed239fcc5605f17a1840f"},"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"}}]},{"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":"b32f5ca0559dddf57092a1f5dc59adc459045abfb01f674d43ddf42152931f66"},"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"}}]},{"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":"99b19e411e3af0f3b6ca42e59b28289847faed09e668e8c5822a08fbfa9bf749"},"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"}}]},{"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":"932e0b73ce2d2909bc129b3e0a22eeab67f4376fa2d9277d0a5223f1eb9dad78"},"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"}}]},{"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":"1f96033f7b8723f740a4d2e684f334a537f56a313572a3a5112d47ca16a38e56"},"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"}}]},{"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":"61dc75e134ba15c44dc362465d79aa5c549ce347fb931f7c7640e6c35d00af13"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"ab8d83539c5ebe567cb6deae98d392d6617f9ea4001a34a9a21fb3f393c0be8f"},"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"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3e4fd9d03b3c75923b83ef8f4f21f80b9eda7749151695f8893d992481d45d96"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"49dbb4207504cd5d0098f2ed08dd4cbf9f959309f0feb245bf48306fb3a3c9d0"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"96c15b266b815d705259455dabb74036250f97dc839ba7a714b63fd81a5da3f7"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1738a6236dd9a609279b2198e4a3b6d794013c4ad992ce2d8139a992680adc19"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4d39706a1a05d6c57b9d3454c96d30f8a168cf9f41cad2d43182435cd69c151d"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"de5419da17a4c8eda89ce19628d2a544d78ca49d531bc0c37552b2fa3ff1ce32"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e24aab79781f5c1ed633fcb829832ef3daf35f33e1024947fbe505152ff5e9a"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b3845b1839e4d1d69f2d72eef0d383ac56c7a5d18b9a5274c8a06a31227a8f9"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"de4d1ff7a571dc6088b0f4de05043c1348c9641213c55cf7cf9f492e1349a1e8"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"505bada2755d8e681b092aeeb1c7abd92eae6021fe4f4884cc2c49aa1ffcfd12"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/impl/DLedgerController.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"71e19b93aac50bb259e7d7958d644f6d93d456bee4da2b891e0c0c777a33c62e"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"69325bff7c31476fa1c7f828e4d2f31e98c850d826e21743b772694b0a3edd78"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce736419d1b0cc76cad7989d875e7fe864522e25889c72536fea65c1d0aeece4"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/StoreStatsService.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"964c6f3aa30af77273dd17a8c2a0d403a6b6525c68be6d71e092e8e56b5d5ea8"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e7748b32b58f21246004fb32762a3da5b36b42032c540551345a26a6012b03d"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3532a99ad7bcbc581393fe45051b6561dce9e2a95182b852bf7f1814b252ab05"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f91f2d9262a3f7ac5be4120f76e9ed5e7c1849a1461c402e90375cc309657c3"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueueExt.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"102c5224203d41152c14fbfb4c7f5b20e7c51468a664b02a0e4f6dcbc1d25ec4"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"52aa8958ff54a9aa38e87f56141024bf4e79225a12412f0cd1bc6f1126e3ae3d"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4521c433da19069c8e08a24bfb8a2d6634e62284c2cce956c6a3948922d98a2b"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPullConsumer.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"03d4b54434612f11049929ca23924d5feb7408fc9fa8cae6f9cd85b260a7e969"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/admin/MQAdminUtils.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"94410a31236c74ed268efb5fba1a6f88dd1b43a32eec61d06e241fcc4b4f1e4b"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueTable.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"03801874287a6a3fe55698681574206bbd8c2fd2d225bf86882c272ac3458f01"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/src/main/java/org/apache/rocketmq/controller/ControllerManager.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4beec89325cd38730370945b602eaf6124d63f8357049481e8dae6ba3355f0c8"}},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 398 smaller file(s) also have no living knowledge \u2014 folded into the freshness score and metrics rather than listed individually (416 orphaned of 851 analysed files in total, counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: PositiveAtomicCounter.java \u2194 DefaultMQProducerImpl.java: \u0060broker/src/main/java/org/apache/rocketmq/broker/util/PositiveAtomicCounter.java\u0060 (context broker) and \u0060client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java\u0060 (context main) sit in DIFFERENT parts of the tree yet change together 91% of the time (10 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/util/PositiveAtomicCounter.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8b3813b6231ba525d1b7c1769874a2af9d2a28aa8f722f41025663d611ca07e"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: PositiveAtomicCounter.java \u2194 DefaultMQProducer.java: \u0060broker/src/main/java/org/apache/rocketmq/broker/util/PositiveAtomicCounter.java\u0060 (context broker) and \u0060client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java\u0060 (context main) sit in DIFFERENT parts of the tree yet 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 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/util/PositiveAtomicCounter.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"61ff94084d87ba13dae35a57b7bdb4b24bf1ed90fe7565adc6dae1f273c8ad48"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: PositiveAtomicCounter.java \u2194 MQProducer.java: \u0060broker/src/main/java/org/apache/rocketmq/broker/util/PositiveAtomicCounter.java\u0060 (context broker) and \u0060client/src/main/java/org/apache/rocketmq/client/producer/MQProducer.java\u0060 (context main) sit in DIFFERENT parts of the tree yet 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 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/util/PositiveAtomicCounter.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9e13221fcd1e6dac37eac7dc08ec0595db18af475ee382e9793475b28fe7577"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: MQClientAPIImpl.java \u2194 MQAdminExt.java: \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java\u0060 (context main) and \u0060tools/src/main/java/org/apache/rocketmq/tools/admin/MQAdminExt.java\u0060 (context tools) sit in DIFFERENT parts of the tree yet change together 53% of the time (75 of the 142 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"058ca906f179bfe0329eb459727dbe99ba3dc6030bca7f6e6bd377edd088a660"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: MQClientAPIImpl.java \u2194 DefaultMQAdminExt.java: \u0060client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java\u0060 (context main) and \u0060tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExt.java\u0060 (context tools) sit in DIFFERENT parts of the tree yet change together 51% of the time (78 of the 154 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1abf84b7be34d731ec1c6e00909e758a326a66044411a11a7e9a08c9107f437a"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: QueueLevelConsumerManager.java \u2194 PopMessageProcessor.java: \u0060broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java\u0060 and \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java\u0060 change together 82% of the time (9 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8352bfbf3698f9c47414378281b192ece9081c179eb74e825e1b3f9ba8729f8e"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: CommitLog.java \u2194 StoreCheckpoint.java: \u0060store/src/main/java/org/apache/rocketmq/store/CommitLog.java\u0060 and \u0060store/src/main/java/org/apache/rocketmq/store/StoreCheckpoint.java\u0060 change together 72% of the time (13 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4cff660189ab6bcbb7bf499695d24521d5efd1c0e5fce3300b42c399c34f088"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: ConsumeQueue.java \u2194 BatchConsumeQueue.java: \u0060store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java\u0060 and \u0060store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java\u0060 change together 69% of the time (11 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d990f39bb8344d35844dddcb4756f4022d555216b8a4c552d0bf6cfdb239c6d"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: DefaultMessageStore.java \u2194 AbstractPluginMessageStore.java: \u0060store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java\u0060 and \u0060store/src/main/java/org/apache/rocketmq/store/plugin/AbstractPluginMessageStore.java\u0060 change together 68% of the time (23 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbae71ffa915ffbc82d9b4f24f3a4ad149a4525c5cb856dede36abf8c934b807"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: QueueLevelConsumerManager.java \u2194 AckMessageProcessor.java: \u0060broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java\u0060 and \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java\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) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e7f37059f7038eeb7a156cb2d5865c2ae25aef399191d2436ce534d3bd8fe60"}},{"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"}},{"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"}},{"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"}},{"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":"0752d0df7434000fcabf1048e2de30a7a1a8b982b3db9a19898c4dec199856b4"}}],"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-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-328","guid":"f0ffc869-97c3-dc5c-8825-be1159f1fc5f","name":"CWE-328","shortDescription":{"text":"CWE-328"},"helpUri":"https://cwe.mitre.org/data/definitions/328.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"CWE-353","shortDescription":{"text":"CWE-353"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Command Injection","shortDescription":{"text":"Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"OS Command Injection","shortDescription":{"text":"OS Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Cross-site Scripting (XSS)","shortDescription":{"text":"Cross-site Scripting (XSS)"},"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":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"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":46,"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."]}]}