{"$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":"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":"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":"PopMessageProcessor.processRequest (cyclomatic 46): PopMessageProcessor.processRequest has cyclomatic complexity 46 (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":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"233af7d6e2d692f0079b026a24715f00a1a20ff513a9ef154e800c78b37c5346"}},{"ruleId":"D1","level":"warning","message":{"text":"BrokerController.shutdownBasicService (cyclomatic 45): BrokerController.shutdownBasicService has cyclomatic complexity 45 (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":1293}}}],"partialFingerprints":{"codehealthFindingId/v1":"34f98a25d03877d2ed63845881d60e9de59e04f6d8c7f18c2f3ede1c4460c1b1"}},{"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":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8bc29d838feeb4e110378d9bfc494d15478000044a4a46dc520670bec877f47"}},{"ruleId":"D1","level":"warning","message":{"text":"RouteInfoManager.registerBroker (cyclomatic 42): RouteInfoManager.registerBroker 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":"namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee32618c86a497240808e82db41540a6a49256313360220bb87938ad51ac5283"}},{"ruleId":"D1","level":"warning","message":{"text":"PullMessageProcessor.processRequest (cyclomatic 39): PullMessageProcessor.processRequest has cyclomatic complexity 39 (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":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bcf4774e451225355bb334ad06d1095a60ad5a7f0cc295fab9b0182957f0b92"}},{"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":996}}}],"partialFingerprints":{"codehealthFindingId/v1":"587de87383f570c37eb70e16ddf6f592a5fdea5b7db5f793aabcf28e1c8928ad"}},{"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":900}}}],"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":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef510f37ae518f873b8e8af52922881dac5d2bd49c8bca1f9e90c93ed93dff87"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMessageStore.getMessage (cyclomatic 36): DefaultMessageStore.getMessage 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":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":782}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ef283e03f2cf1f20723b8943addfb058c44a8678166a7700ea43ad2d076bcf6"}},{"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":"PopBufferMergeService.scan (cyclomatic 33): PopBufferMergeService.scan 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbfb7bf0f87ab62b47425fcde7919b93c553e962fd5d1c0056adbbcf9eac4f1e"}},{"ruleId":"D1","level":"warning","message":{"text":"PopReviveService.consumeReviveMessage (cyclomatic 33): PopReviveService.consumeReviveMessage 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"c53450a9c35aa8f78f0ac8278d25e58c2dc8f50404db08eb3968f3720909fc15"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMQProducerImpl.sendDefaultImpl (cyclomatic 31): DefaultMQProducerImpl.sendDefaultImpl 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":"client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"44dfd513212f5996a86b82386dfba0a8f82c103d5ac1598dd9dbe94f938d42c6"}},{"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":1077}}}],"partialFingerprints":{"codehealthFindingId/v1":"b323df8734a6c6bd54f4f7d0f2d3a4d4df01a63ffda45e671f707934b4e092af"}},{"ruleId":"D1","level":"warning","message":{"text":"CommitLog.checkMessageAndReturnSize (cyclomatic 30): CommitLog.checkMessageAndReturnSize 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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"df3a46af845723d54f5ae7425cb082e2bf80fa24ed0ca09f710b1221436231c7"}},{"ruleId":"D1","level":"warning","message":{"text":"PlainAccessResource.parse (cyclomatic 29): PlainAccessResource.parse 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":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainAccessResource.java"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"260acaacbfa2be9bbe5291bf6a519f4234ffa43dfb335d68d95dc77d328da717"}},{"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":91}}}],"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":880}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3bc148c31264cf162a50a14ea84db72161660f618e2e64a092a134bd785933"}},{"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":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3e5e63ca8e74ec9422f0e586231a48ca16e2625cd7e94731210b8b710d00c3b"}},{"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":220}}}],"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":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"f82c10d54544c4f6f20fb8b5e48af4b6605dbcb2bfe554dd3c0c15dc03dc375f"}},{"ruleId":"D1","level":"warning","message":{"text":"BrokerController.startBasicService (cyclomatic 26): BrokerController.startBasicService has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":1526}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f0006eff0dfcac2cff2bcf5229b151d08453481412da50c91b841457643321"}},{"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":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"58d9b987a63f57fad9fbeed99d3d30583a6db01f382984c22cd2391be54054d1"}},{"ruleId":"D1","level":"warning","message":{"text":"PopMessageProcessor.popMsgFromQueue (cyclomatic 25): PopMessageProcessor.popMsgFromQueue 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/PopMessageProcessor.java"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"d78cd40e19c90c394a58ee1cf32ce49d483cca5be418385f8d029a2c080e3019"}},{"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":"TimerMessageStore.checkAndReviseMetrics (cyclomatic 25): TimerMessageStore.checkAndReviseMetrics 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":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1170}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ca48528cb44635c227e04d26dfdd239d7453ec15636b7a7727253f8176e1cd6"}},{"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":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"e27d0aa6fc05ca4e58e16879ead039e7b72841b218b6037323b375c456945905"}},{"ruleId":"D1","level":"warning","message":{"text":"BrokerStartup.buildBrokerController (cyclomatic 24): BrokerStartup.buildBrokerController has cyclomatic complexity 24 (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":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5ae3102a949b3d0fa6468e39a38acd7f124f8c3752cdac738fdcd7c56fcd149"}},{"ruleId":"D1","level":"warning","message":{"text":"RemotingCommand.decodeCommandCustomHeaderDirectly (cyclomatic 24): RemotingCommand.decodeCommandCustomHeaderDirectly 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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"08c4ee0a3fc0dda5bc111fba8d4b2186fe872f76a00745e9d43ada7579efcb6a"}},{"ruleId":"D1","level":"warning","message":{"text":"MQAdminImpl.queryMessage (cyclomatic 24): MQAdminImpl.queryMessage 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":"client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd1434e26dee1137e39d759df8724a9b6a99d80f4b8995878ec7046e16f30d49"}},{"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":"PlainAccessResource.parse (cyclomatic 23): PlainAccessResource.parse has cyclomatic complexity 23 (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":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainAccessResource.java"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bf370b4e262c5112b84b04d18e7ee56e7952b9f952499b02951f0e96a659dbb"}},{"ruleId":"D1","level":"warning","message":{"text":"NotificationProcessor.processRequest (cyclomatic 23): NotificationProcessor.processRequest 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java"},"region":{"startLine":65}}}],"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":698}}}],"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":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd6ede1a349710ea81a8b470041110b672b4cc87616049a58f68ea9b1ce0d19"}},{"ruleId":"D1","level":"warning","message":{"text":"CompositeFlatFile.getOffsetInConsumeQueueByTime (cyclomatic 23): CompositeFlatFile.getOffsetInConsumeQueueByTime 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/CompositeFlatFile.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a2344a1bf5bf6d6082e7d7e256198d085b3e0550ce1a193613e1193eddeb402"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsumerProgressSubCommand.execute (cyclomatic 23): ConsumerProgressSubCommand.execute 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":"tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerProgressSubCommand.java"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cd14e8d9fbdb54cd91f9731d352cf6f3b8d45c940976df4ba436534a95c30a1"}},{"ruleId":"D1","level":"warning","message":{"text":"FilterDataMapByTopic.register (cyclomatic 22): FilterDataMapByTopic.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":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"fccedb6cde2f7e88449ab307bf3601d037e6594a4d97d9011e5548d6d1ff4fa6"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsumerLagCalculator.processAllGroup (cyclomatic 22): ConsumerLagCalculator.processAllGroup 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/metrics/ConsumerLagCalculator.java"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0f9d8c375bb4e54984d0be6bff038b380bd40d552b9f97294d5e926cc5f5f68"}},{"ruleId":"D1","level":"warning","message":{"text":"MQClientInstance.sendHeartbeatToAllBrokerV2 (cyclomatic 22): MQClientInstance.sendHeartbeatToAllBrokerV2 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":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d82daf30939d3767d959f56f2a76ce6dae73253dc3158b122ef85921b396047"}},{"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":"ConsumeQueue.correctMinOffset (cyclomatic 22): ConsumeQueue.correctMinOffset 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/ConsumeQueue.java"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"f65f1402e9c2944dc3cfa970d13edbe39fd344d95dc26bc07575d071ecfab36f"}},{"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":81}}}],"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":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"276e289805c890978bb0d2475353f8420d6f8731ae116e1ab280a12696ad087b"}},{"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":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ddec060d3737253d5efe3a2e50a37a4cec391231d91cd1a3e0aa319f85403dd"}},{"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":713}}}],"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":1074}}}],"partialFingerprints":{"codehealthFindingId/v1":"677e3a266fea6cadce846452b38a70d27fcb85aa4c45b5bf6eb281dde016bd83"}},{"ruleId":"D1","level":"warning","message":{"text":"BrokerContainerProcessor.addBroker (cyclomatic 21): BrokerContainerProcessor.addBroker 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":"container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"4536cc2f58c3f8d6515756acdaf16a9968efa4f346229f91f83752823f4cb13f"}},{"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":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"523fdd55ee2772d480b99fd2264b2c9d5d880571cacfdbb44c6e3b3a1d950a46"}},{"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":763}}}],"partialFingerprints":{"codehealthFindingId/v1":"444ad2cfbd79d6a4d885bfdc197022b3ff7e6312deab71d6402e2a5782d9ca72"}},{"ruleId":"D1","level":"warning","message":{"text":"PullMessageRequestHeader.decode (cyclomatic 20): PullMessageRequestHeader.decode 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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"31f479c84bf8cfc8ea928046e80f780ca7b0e98cda4b9bfc7f58eb756a67cba2"}},{"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":"GrpcConverter.buildSystemProperties (cyclomatic 20): GrpcConverter.buildSystemProperties 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/common/GrpcConverter.java"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb610fbcdbafc8f22c3a4f59f65dd2812e1add33ca8532656d508977a93a5c7a"}},{"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":"TimerMessageStore.doPut (cyclomatic 20): TimerMessageStore.doPut 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/timer/TimerMessageStore.java"},"region":{"startLine":1068}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1ba3d151e4251ad6b17ff19f2c161e65dd8ca627c3cdeb188f8be5ee2b5425e"}},{"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":"PlainPermissionManager.load (cyclomatic 19): PlainPermissionManager.load 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":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"9841bbb4843daf90c2db01cfd0154a160cfd3819efa4cd385fda08e09de88324"}},{"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":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"024e59c9cd299d52608d19b9a42378d6137f1731b8a7c97bc83e894ae727c76a"}},{"ruleId":"D1","level":"warning","message":{"text":"BrokerMetricsManager.init (cyclomatic 19): BrokerMetricsManager.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":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0f25cfefeb2c09706b7114ff14853c027b94c2200c2073ce8858d832aabc178"}},{"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":596}}}],"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":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"619d9f0529f95875ec6832517a9f7325e8d53f8265ecc07fe8a57d39f89d39da"}},{"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":285}}}],"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":196}}}],"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":1534}}}],"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":2312}}}],"partialFingerprints":{"codehealthFindingId/v1":"86cadd16b5da725b5ef4ddfe5c5d54dcde8ce81649233fd7bcfc61e14833a0d4"}},{"ruleId":"D1","level":"warning","message":{"text":"ReputMessageService.doReput (cyclomatic 19): ReputMessageService.doReput 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":2815}}}],"partialFingerprints":{"codehealthFindingId/v1":"985de190d66f8c445a28696741352a0b2adcb370a4c3f4d747340b87d78de8aa"}},{"ruleId":"D1","level":"warning","message":{"text":"TieredDispatcher.dispatchFlatFile (cyclomatic 19): TieredDispatcher.dispatchFlatFile 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredDispatcher.java"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c7b18335cabe655ec9db15984ebd1edf1d30099ff38f8a93ed11f53c2f97ece"}},{"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":1334}}}],"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":55}}}],"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":"MixAll.properties2Object (cyclomatic 18): MixAll.properties2Object 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":"common/src/main/java/org/apache/rocketmq/common/MixAll.java"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"14743d50472ee8c10a1a27da58a1054dcf71d4caee32b4ad0640e852d82f3bca"}},{"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":"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":57}}}],"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":626}}}],"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":"CommitLog.recoverAbnormally (cyclomatic 18): CommitLog.recoverAbnormally 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":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2cc2a7ac8943674ae613a92a793a14eca3596ab38bea71b9461c6d26e5b584f"}},{"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":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"59dcbb7a2328683d395cbb19df00881b0f99b45cd99f33e183f9c8d0b5cb2a64"}},{"ruleId":"D1","level":"warning","message":{"text":"PlainPermissionManager.updateAccessConfig (cyclomatic 17): PlainPermissionManager.updateAccessConfig 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":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"4abc615243f4591a4fc205f94256de8ab16adb37a696629dc04001fba0c10ddf"}},{"ruleId":"D1","level":"warning","message":{"text":"SendMessageProcessor.sendMessage (cyclomatic 17): SendMessageProcessor.sendMessage 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/processor/SendMessageProcessor.java"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"98024a7630db01985fcd93b945b2828f1cebd79031fa94964ba95e51c4f547bb"}},{"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":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"8879e58f4fef3aad0ef83b276bbc8c5cbecd437b6c610b2c836fa92c600608f1"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMQProducerImpl.sendMessageInTransaction (cyclomatic 17): DefaultMQProducerImpl.sendMessageInTransaction 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/producer/DefaultMQProducerImpl.java"},"region":{"startLine":1382}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fcd29bc0832c24c2854c7f96cc56f3b4c68075ba4f6930aa90b0a106b494511"}},{"ruleId":"D1","level":"warning","message":{"text":"UtilAll.getIP (cyclomatic 17): UtilAll.getIP 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/UtilAll.java"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"005ca434fcaa9d81f612b573d1e90c3b8d59f39587c4bed2390ee4017f4d1871"}},{"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":"SendMessageActivity.buildMessageProperty (cyclomatic 17): SendMessageActivity.buildMessageProperty 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":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/producer/SendMessageActivity.java"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"35a5457320b0fb5f146c892033975fa930849a8e1b90109d83cadcbcf3b9c0d1"}},{"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":1076}}}],"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":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"803241acc5590abe1a177b9afa82a7932e72f50ccad4f44eb88126c9f5fd863c"}},{"ruleId":"D1","level":"warning","message":{"text":"TieredDispatcher.dispatch (cyclomatic 17): TieredDispatcher.dispatch 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredDispatcher.java"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb1b3d87e25d1100c98a93fe0f1f000eac7f4c9d64303fddecec21fc05bbc5ba"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultMQAdminExtImpl.examineConsumeStats (cyclomatic 17): DefaultMQAdminExtImpl.examineConsumeStats 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/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"a27c1a91a470ccd779c45809d1a35136b0d4cb1e3539ef1ba1b5235f63c3250e"}},{"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":"19ffdf0d1efa6fa96ac0435f8b43883446970889de8a8bcf2bcc4d32afc7ca2a"}},{"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":"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":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"28cfbef4228af642a9e272e71944a2740f868af8820b0d41dc7fe73d4ab18a76"}},{"ruleId":"D1","level":"warning","message":{"text":"ResetOffsetByTimeCommand.execute (cyclomatic 17): ResetOffsetByTimeCommand.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/offset/ResetOffsetByTimeCommand.java"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2535e71ff09004e4fc4a107a38e9b7aefb323b455449a99f63728440fa697e8"}},{"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":41}}}],"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":"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":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"355f97d0f220a337f52473d78c371e9d7063c951c26f0f4a941d4d7528e6d4d5"}},{"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":519}}}],"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":"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":569}}}],"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":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d191a5c75905eea5e6e175b8f799934debd3f6da327b690d42d88cae4e8d202"}},{"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":1111}}}],"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":"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":1433}}}],"partialFingerprints":{"codehealthFindingId/v1":"d96dd9dfdb6a2ddcc470b60d8b16e98eda5ab189e777443edf678de3e1eb61aa"}},{"ruleId":"D1","level":"warning","message":{"text":"UpdateAccessConfigSubCommand.execute (cyclomatic 16): UpdateAccessConfigSubCommand.execute 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":"tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e69ad0670a5c47939f9811ecd18cd0c92c9c5891c123cfafde0fbfe3853e68c"}},{"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 166): DefaultMessageStore.getMessage has cognitive complexity 166 (threshold 15). Drivers by points: if/else 140, loops 13, error handling 7, boolean chains 6 (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":782}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b2acf40a468a3c776db51160fa10f675f851a0f86567325a4828c2dfb9025da"}},{"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":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd2c925a6a373b9fe99ecc13fcdfcc242b9ef80437991e12b121e93a4dae3ae4"}},{"ruleId":"D2","level":"warning","message":{"text":"PopReviveService.consumeReviveMessage (cognitive 121): PopReviveService.consumeReviveMessage has cognitive complexity 121 (threshold 15). Drivers by points: if/else 103, loops 10, boolean chains 5, error handling 3 (nesting depth added 83). To reduce it, split the body into named stages: move each independent step or branch into 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":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fbc91895532bab6b9c25238d200703e29f4bf579bac0aceef45a4273aa698d9"}},{"ruleId":"D2","level":"warning","message":{"text":"PopBufferMergeService.scan (cognitive 111): PopBufferMergeService.scan has cognitive complexity 111 (threshold 15). Drivers by points: if/else 84, loops 21, boolean chains 6 (nesting depth added 78). To reduce it, split the body into named stages: move each independent step or branch into 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":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"835c82f46f3b8f9740f70afba7f2cc5d734e1c29420a7884ba016de147db4836"}},{"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 97): DefaultMQProducerImpl.sendDefaultImpl has cognitive complexity 97 (threshold 15). Drivers by points: if/else 69, error handling 16, ternaries 5, match/switch 4, loops 2, boolean chains 1 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into 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":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ef4179876a1af5ba3e24aac4f451b27f2b36ae6b6b048b5fce4cc0f316c01d7"}},{"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":"PlainAccessResource.parse (cognitive 89): PlainAccessResource.parse has cognitive complexity 89 (threshold 15). Drivers by points: if/else 61, loops 23, boolean chains 3, error handling 2 (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":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainAccessResource.java"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dc6f776f63f1f31a3fe628ec06b867fd28036ec806390dd5f86b7b1f19e68a4"}},{"ruleId":"D2","level":"warning","message":{"text":"MQAdminImpl.queryMessage (cognitive 88): MQAdminImpl.queryMessage has cognitive complexity 88 (threshold 15). Drivers by points: if/else 59, loops 23, error handling 4, boolean chains 2 (nesting depth added 61). To reduce it, split the body into named stages: move each independent step or branch into 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":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"6459c40dc8cc5ad509c40f31e876b1b6c8dd07b3ba5abde1ac4092b0ba228102"}},{"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":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c1954e43a4c91bb3a836df769a4fa7c41fac119f6a0741e341fb2e51c7b25fe"}},{"ruleId":"D2","level":"warning","message":{"text":"RouteInfoManager.registerBroker (cognitive 81): RouteInfoManager.registerBroker has cognitive complexity 81 (threshold 15). Drivers by points: if/else 55, boolean chains 12, 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":"PopMessageProcessor.processRequest (cognitive 80): PopMessageProcessor.processRequest has cognitive complexity 80 (threshold 15). Drivers by points: if/else 52, loops 16, error handling 7, boolean chains 4, match/switch 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9ce87f81aeaaa24a811de93cad8d9c0443342889b1f0301c3e70567b0870a8a"}},{"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":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"8daa225f519ebedb7d10e6e1207f97f46fe907771f8702a40b79928da269600e"}},{"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":555}}}],"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":"PullMessageProcessor.processRequest (cognitive 65): PullMessageProcessor.processRequest has cognitive complexity 65 (threshold 15). Drivers by points: if/else 57, boolean chains 5, error handling 2, match/switch 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"560d727712ba6aa4bee05ea71f825c7a933490b066488de7d238f46f279437c8"}},{"ruleId":"D2","level":"warning","message":{"text":"CommitLog.checkMessageAndReturnSize (cognitive 65): CommitLog.checkMessageAndReturnSize has cognitive complexity 65 (threshold 15). Drivers by points: if/else 55, loops 5, boolean chains 3, error handling 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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"14e0bc519dadd345cf9ff2fd61af157c8f1cdb2f67391a9088604a2c5cbf3ea9"}},{"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":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"addfabb2a670f1d8cd9ff2d590e677d1c7bda7a8749b25f2f58db32740b1372d"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerProgressSubCommand.execute (cognitive 64): ConsumerProgressSubCommand.execute has cognitive complexity 64 (threshold 15). Drivers by points: if/else 33, error handling 16, ternaries 10, 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":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8efe5f3ad13089b51e67215fd83363f51dde68f07fbc3b891b918242b9eec71"}},{"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":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"89d5b9094b8408bf27f078f9cedb81ef92d1043ab05ef4acc46a85907bfff724"}},{"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":"ConsumerLagCalculator.processAllGroup (cognitive 58): ConsumerLagCalculator.processAllGroup has cognitive complexity 58 (threshold 15). Drivers by points: if/else 50, boolean chains 5, loops 3 (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/metrics/ConsumerLagCalculator.java"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a05f4047ce8e7c560798d79cc0f6347d6b42edfe449e8e14e78fe83b043b364"}},{"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":880}}}],"partialFingerprints":{"codehealthFindingId/v1":"198f2c783a2d6062255785c4284fe54116bc71948e40bca51d4d4b6278239596"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerMessageStore.checkAndReviseMetrics (cognitive 57): TimerMessageStore.checkAndReviseMetrics has cognitive complexity 57 (threshold 15). Drivers by points: if/else 39, loops 12, ternaries 4, boolean chains 1, error handling 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":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1170}}}],"partialFingerprints":{"codehealthFindingId/v1":"366f81864b62c96fd5593a7fd9e40d1a2618d8345b9b862a95a8900b02cf8a33"}},{"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":1334}}}],"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":105}}}],"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":864}}}],"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":1534}}}],"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":"CommitLog.recoverAbnormally (cognitive 53): CommitLog.recoverAbnormally has cognitive complexity 53 (threshold 15). Drivers by points: if/else 48, loops 4, boolean chains 1 (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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d9d1687121144691cccc13acebe1a61044f573b1e3d99c7a8dd54319c6ad734"}},{"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":406}}}],"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":1074}}}],"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":156}}}],"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":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"659e7556efd015ce00dad64001027d9ff8225f466ac1ab7d57638d0b6eba8b09"}},{"ruleId":"D2","level":"warning","message":{"text":"MQClientInstance.sendHeartbeatToAllBrokerV2 (cognitive 50): MQClientInstance.sendHeartbeatToAllBrokerV2 has cognitive complexity 50 (threshold 15). Drivers by points: if/else 40, boolean chains 4, error handling 3, loops 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/factory/MQClientInstance.java"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a7d579d7b126276a85e7d5d935dacba25f505f94796a01644cb24a0bb28b31c"}},{"ruleId":"D2","level":"warning","message":{"text":"RemotingCommand.decodeCommandCustomHeaderDirectly (cognitive 48): RemotingCommand.decodeCommandCustomHeaderDirectly has cognitive complexity 48 (threshold 15). Drivers by points: if/else 32, error handling 9, 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":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba83e51cb0558cb995314d2dc2be570784c6002391ea7dec63111e4351edd546"}},{"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":698}}}],"partialFingerprints":{"codehealthFindingId/v1":"4414c6473ce74dccc4ea328b6357265356e9948ca04ff3e17d62ee51796f79eb"}},{"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":73}}}],"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":"UtilAll.getIP (cognitive 47): UtilAll.getIP has cognitive complexity 47 (threshold 15). Drivers by points: if/else 40, boolean chains 3, loops 3, 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":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"e36203bc64a9df22816fa7d32468fd6322829b3e53ade5d5dc2682a4b6cdc656"}},{"ruleId":"D2","level":"warning","message":{"text":"NotificationProcessor.processRequest (cognitive 46): NotificationProcessor.processRequest has cognitive complexity 46 (threshold 15). Drivers by points: if/else 35, loops 10, 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/NotificationProcessor.java"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"61625c14bf2194bf00b2352f8452a0060d493080fbc5c0290d1dd9b34fdd4f1d"}},{"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":"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":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"532876505f2674c7406c307858268a3458f813733b67aac3c908a611c15bd95e"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerController.shutdownBasicService (cognitive 45): BrokerController.shutdownBasicService has cognitive complexity 45 (threshold 15). Drivers by points: if/else 43, boolean chains 1, 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":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":1293}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd915ed36e2fec03833f81b52d023c3f01460e1545d3115597b301b2dd3971af"}},{"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":"FilterDataMapByTopic.register (cognitive 44): FilterDataMapByTopic.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":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa1a77f21e341bd4ddaaea941f415bc963c3f47ef5c2eb6f9ac7877b8cdbc11b"}},{"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":"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":"PullRequestHoldService.notifyMessageArriving (cognitive 43): PullRequestHoldService.notifyMessageArriving has cognitive complexity 43 (threshold 15). Drivers by points: if/else 28, error handling 11, loops 3, boolean chains 1 (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":"broker/src/main/java/org/apache/rocketmq/broker/longpolling/PullRequestHoldService.java"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"841a45f55c5b819c2207e0f5f17061ad06c358626f929eda303c7628917bcd77"}},{"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":218}}}],"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":"ReputMessageService.doReput (cognitive 43): ReputMessageService.doReput has cognitive complexity 43 (threshold 15). Drivers by points: if/else 31, 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":2815}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b22cf0233a773717a717eb3e9ecf2077fdb71eb3117ab54705072b9829cf9c2"}},{"ruleId":"D2","level":"warning","message":{"text":"PlainPermissionManager.updateAccessConfig (cognitive 42): PlainPermissionManager.updateAccessConfig has cognitive complexity 42 (threshold 15). Drivers by points: if/else 31, loops 7, error handling 3, boolean chains 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":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"83e529aae76289071bfbfa1cf5fa5028f4495fa2d154f4c48dcd526018279c69"}},{"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":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a95dff2a3983c7ebd86547e2011145d7b8c9e10bda9aba419c4caede5adbd20"}},{"ruleId":"D2","level":"warning","message":{"text":"CompositeFlatFile.getOffsetInConsumeQueueByTime (cognitive 41): CompositeFlatFile.getOffsetInConsumeQueueByTime has cognitive complexity 41 (threshold 15). Drivers by points: if/else 25, match/switch 8, loops 7, 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/CompositeFlatFile.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"912180ab0f79944f5c09e8c9d78e5da071550bc5217db4e1dd74c2013fba44a4"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumeQueue.correctMinOffset (cognitive 40): ConsumeQueue.correctMinOffset has cognitive complexity 40 (threshold 15). Drivers by points: if/else 33, loops 4, error handling 2, 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/ConsumeQueue.java"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"389b45dd1da2f00119d4f6f8d0790f31f1b40a0ba98501839d24512ea33f03b3"}},{"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":996}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d45daf4b4e768256441e15205765727d54e87aa6af3a3d0069faf6cf2bb2f08"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQPushConsumerImpl.processPopResult (cognitive 39): DefaultMQPushConsumerImpl.processPopResult has cognitive complexity 39 (threshold 15). Drivers by points: if/else 23, loops 10, error handling 5, boolean chains 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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java"},"region":{"startLine":616}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a209d9f55b307ac5e3046697ffa60953264a308106ccd23803d54eca5952ef4"}},{"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":172}}}],"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":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"150038e1e5463c39c24b5c8a5067e2f9384ec7412229f9c575c452bed239db51"}},{"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":"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":41}}}],"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":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"bee62a35b0354c1a8422bd0459857c91edb212b8b21af5bf617c8095d1599369"}},{"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":1111}}}],"partialFingerprints":{"codehealthFindingId/v1":"9813bcee14226da6aa617828f73986217fa59231a6a13e96f779e84414e1ae4f"}},{"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":"f6d386638ea7f4b19bdc08c4f52d45348b59b578deaac327a979e28b25dc14b4"}},{"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":1279}}}],"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":"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":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c2a3532968427f0182e7eebf48248a26d5b3bc51dd94e696550c816fd386a13"}},{"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":497}}}],"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":1076}}}],"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":473}}}],"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":"QueryMsgByIdSubCommand.execute (cognitive 35): QueryMsgByIdSubCommand.execute has cognitive complexity 35 (threshold 15). Drivers by points: if/else 24, loops 9, boolean chains 1, error handling 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":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b2da684b698e26d53258d373c12b666428fdc77e67d645a1d08a7c27fcf941e"}},{"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":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e8c55bfad9bcbad960c7307c2fca5b029d7c511803717aca7e3f846a4593445"}},{"ruleId":"D2","level":"warning","message":{"text":"AdminBrokerProcessor.fetchAllConsumeStatsInBroker (cognitive 34): AdminBrokerProcessor.fetchAllConsumeStatsInBroker has cognitive complexity 34 (threshold 15). Drivers by points: if/else 26, loops 6, boolean chains 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":2284}}}],"partialFingerprints":{"codehealthFindingId/v1":"05991bf3ae4315dfdc8b74e42847ff5f1493c3b1c995fcf526a16e76362ace80"}},{"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":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"316054701a05fdc12df9240e8686cc567db71512e7b8e03b56389b72aa64f800"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerContainerProcessor.addBroker (cognitive 34): BrokerContainerProcessor.addBroker has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19, error handling 5, loops 4, boolean chains 3, match/switch 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":"container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e8fb4fea6fc06c911afccfdf078635b161475acbcd734263cf55c9a54be6684"}},{"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":1077}}}],"partialFingerprints":{"codehealthFindingId/v1":"83fabfd2a01239ae4a8ff7c5c5924039678f437e9e294eeebfd2c2aa50dc3542"}},{"ruleId":"D2","level":"warning","message":{"text":"CommitLog.recoverNormally (cognitive 34): CommitLog.recoverNormally has cognitive complexity 34 (threshold 15). Drivers by points: if/else 30, boolean chains 2, loops 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9b9ddb694329dd752e3f5678078d9299e50d77fa57c8116591a04abf7194146"}},{"ruleId":"D2","level":"warning","message":{"text":"TieredDispatcher.buildConsumeQueueAndIndexFile (cognitive 34): TieredDispatcher.buildConsumeQueueAndIndexFile has cognitive complexity 34 (threshold 15). Drivers by points: if/else 31, 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredDispatcher.java"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"430dd1d9f3f8e6bb3df17b6a618c60b7648818ca47ba3618222901e10fe4e846"}},{"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":1433}}}],"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":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6faf1ee149a7461cd18745edf83f2580b4d803a038e2e14df76bf843f9fa3f6"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerFilterManager.decode (cognitive 33): ConsumerFilterManager.decode has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18, loops 5, ternaries 5, error handling 4, boolean chains 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":"broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eed7985869b8330ccb8efa8793d28d2d04d45cad3dc180d22d93a2f398d8972"}},{"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":81}}}],"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":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"e68d1ba994ad173d5a6920f886fe9479a20492cd36b927835c22e8cc0efaf50d"}},{"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":763}}}],"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":2312}}}],"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":"PlainPermissionManager.load (cognitive 32): PlainPermissionManager.load has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20, loops 7, boolean chains 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":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"571e6bb55356d078ab9e8d1c4dda8f9af1e1f5097a3b74b13e343fba89c67d65"}},{"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":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdbf5710189ea50df54b84b06d820d96a21bf4b84c34fbc7f6a9c99a7699d34c"}},{"ruleId":"D2","level":"warning","message":{"text":"PopMessageProcessor.popMsgFromQueue (cognitive 32): PopMessageProcessor.popMsgFromQueue has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16, boolean chains 6, error handling 5, loops 4, ternaries 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2ee031fdf73910c9e71e41394136db07e07194193885bf1cfd6854e359e4922"}},{"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":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3692a822553f7244d604e78ae9ae375260db09022f9e99a82c8086660baf05e"}},{"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":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"1efb002066b4fb66c50d0ee4f616bd7e720e3dea2da3ee21c6997b9b6976a5ae"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerDequeuePutMessageService.run (cognitive 31): TimerDequeuePutMessageService.run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17, loops 6, error handling 5, 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":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":1463}}}],"partialFingerprints":{"codehealthFindingId/v1":"a09b5a5c44f3ccca8a9fb8736b0e3f33d708441c98e0b1134df9970e0893583a"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerMetricsManager.init (cognitive 30): BrokerMetricsManager.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":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa93f9ace9292a3ba7a7cb69e18a2ee58122a7bdeed4c16a894e8307841c5f33"}},{"ruleId":"D2","level":"warning","message":{"text":"MixAll.properties2Object (cognitive 30): MixAll.properties2Object has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20, boolean chains 6, 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":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"97c10a3c942d90d0290ff8fb05c4d686183407a0feb4063bd3e6534e771ec38f"}},{"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":285}}}],"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":"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":852}}}],"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":123}}}],"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":"MQClientInstance.sendHeartbeatToAllBroker (cognitive 29): MQClientInstance.sendHeartbeatToAllBroker has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, error handling 3, loops 3, boolean chains 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":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6a6c7165c9e03599fccc0d37a1d06f56d6616b8f16acd7d0a8d334844918378"}},{"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":"ReceiveMessageActivity.receiveMessage (cognitive 29): ReceiveMessageActivity.receiveMessage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17, ternaries 4, boolean chains 3, loops 3, 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":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/ReceiveMessageActivity.java"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"09e95f20cdad8d4e32da5177b95f006b311ba40972f6c9cc32bd33d054a41c77"}},{"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":201}}}],"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":"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":3106}}}],"partialFingerprints":{"codehealthFindingId/v1":"05037acccfe3861aaae1b17e19a2794ceeb6f1f75677f0c0cc1771ab6fe7d4b6"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQAdminExtImpl.examineConsumeStats (cognitive 29): DefaultMQAdminExtImpl.examineConsumeStats has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17, loops 7, error handling 4, 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":"tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"25f00c154466816bad85bf44a4a0ba072a8251362575d06615dc278a08376232"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerConsumeStatsSubCommad.execute (cognitive 29): BrokerConsumeStatsSubCommad.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/BrokerConsumeStatsSubCommad.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"92c648724ba85f1c96f4a324502289c7554ed51174cf10d0a5a89aeefb08cf38"}},{"ruleId":"D2","level":"warning","message":{"text":"Broker2Client.resetOffset (cognitive 28): Broker2Client.resetOffset has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, error handling 4, loops 3, 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":"broker/src/main/java/org/apache/rocketmq/broker/client/net/Broker2Client.java"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f3d0bc19fd299053f29db96ad2e536eea1961d13769fb6e479ec6e96ec9d662"}},{"ruleId":"D2","level":"warning","message":{"text":"AckMessageProcessor.appendAck (cognitive 28): AckMessageProcessor.appendAck has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, boolean chains 4, 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":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"95d41c7856f5edcdcd5c3322d75570363c1c5c4773e34043f86059a0142492ff"}},{"ruleId":"D2","level":"warning","message":{"text":"TopicConfigManager.createTopicInSendMessageMethod (cognitive 28): TopicConfigManager.createTopicInSendMessageMethod has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, ternaries 3, error handling 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/topic/TopicConfigManager.java"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"abc0e5b8e3235c848034ca368253aaee9841b457bc051c89e967444e8ffa9c56"}},{"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":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"c352e6bf44611aa51c955e3a26c04fc9ff97ba89ea634b4fc7195e2f9982de95"}},{"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":"ConsumeQueueStore.recoverOffsetTable (cognitive 28): ConsumeQueueStore.recoverOffsetTable has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, loops 5, ternaries 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":"store/src/main/java/org/apache/rocketmq/store/queue/ConsumeQueueStore.java"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6fcf16cffa5d253addc097ce8f0d606d7444f83a49be26d499a692c892079b8"}},{"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":387}}}],"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":1439}}}],"partialFingerprints":{"codehealthFindingId/v1":"da7380680a909ccf5a324430c0989d2bce58563f0315bbd023af5d4869bdd8fd"}},{"ruleId":"D2","level":"warning","message":{"text":"AdminBrokerProcessor.getConsumeStats (cognitive 27): AdminBrokerProcessor.getConsumeStats has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23, 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1639}}}],"partialFingerprints":{"codehealthFindingId/v1":"00a59e05907a618951b6708e090c9de96a1f238d1ea739a08a9a024d7bccd7e2"}},{"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":"BrokerController.startBasicService (cognitive 27): BrokerController.startBasicService has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, boolean chains 1, 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":"broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java"},"region":{"startLine":1526}}}],"partialFingerprints":{"codehealthFindingId/v1":"545500d911bc5839d50cc9e12e2c982d7d022e3d8e27ac3cefcf7f570e65b95a"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerStartup.buildBrokerController (cognitive 27): BrokerStartup.buildBrokerController has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19, boolean chains 2, error handling 2, loops 2, match/switch 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ee0449b96e009df72c6cd57c0ef8ec2d7776478cc269d2a82d6dfd6ac018418"}},{"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":187}}}],"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":258}}}],"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":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd9e6b2b6ce6cf9ad70c96dabd01224a1180d49787aeed5f8520b39da386b77c"}},{"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":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ddb02df6c953714a4e72346714f29ae879bce4e345f3081a1827a5ccc11ec4b"}},{"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":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"a61757229416579167194a77b4d8568eaec2fd9dad980c9dfa0e98aca4eddcc4"}},{"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 21, error handling 3, boolean chains 1, match/switch 1 (nesting depth added 14). 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":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"66b8e1756f94fc95619737f5af39b9dded5e3fb404e28b2df53c1ef146e4ba5c"}},{"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":"IndexService.buildIndex (cognitive 26): IndexService.buildIndex has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, loops 3, match/switch 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":"store/src/main/java/org/apache/rocketmq/store/index/IndexService.java"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e5da927a7364fd360ad4f9e1614ed930b5414a27497b1abaad435c4ff2cde8e"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerMessageStore.enqueue (cognitive 26): TimerMessageStore.enqueue has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, loops 4, 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":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"07d1a429bc8af62da45db906c4c4eb5e69c8bd74a3898b24b811a511c4848eb2"}},{"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":"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":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ba2502499c286b39b25a729dca6953ce843e387e1623cf1e3f8b7aef00d3cee"}},{"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":519}}}],"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":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e8a5b682b5057f30a436f4bf6d7859fda0ba6c5a1baf32e1684a78fd19905d5"}},{"ruleId":"D2","level":"warning","message":{"text":"TraceDataEncoder.decoderFromTraceDataString (cognitive 25): TraceDataEncoder.decoderFromTraceDataString has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, 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":"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":"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":91}}}],"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":"TieredDispatcher.dispatch (cognitive 25): TieredDispatcher.dispatch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, error handling 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredDispatcher.java"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f334b973b630713e630009b678eb9a72a8a1d6c2d56f31a3edf49806ffca3b6"}},{"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":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ef2a926e2baa965509c6de033bec324b4bc492d65688b4b34737501dc039267"}},{"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":152}}}],"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":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4b4a3ae420e86dbbbf44e73cc6722fb152151a54d47ad86afc6a54c8ded98aa"}},{"ruleId":"D2","level":"warning","message":{"text":"QueryAssignmentProcessor.doLoadBalance (cognitive 24): QueryAssignmentProcessor.doLoadBalance has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, error handling 2, boolean chains 1, match/switch 1 (nesting depth added 11). 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":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"2056ca2aae19134f9b45902a0bfed2d1fe99ac7e14ecb17e2b95baadb87b6aee"}},{"ruleId":"D2","level":"warning","message":{"text":"NettyRemotingClient.getAndCreateNameserverChannel (cognitive 24): NettyRemotingClient.getAndCreateNameserverChannel has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, boolean chains 3, loops 3, error handling 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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fdfc75591592228ebf019a317b4f29252fdec536b9051559db3dd066763195d"}},{"ruleId":"D2","level":"warning","message":{"text":"NettyRemotingClient.invokeImpl (cognitive 24): NettyRemotingClient.invokeImpl has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, boolean chains 1, 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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbc6e2c41be2b19f7ab7e80afbdc010ce1bcd2984273fb7365170746202b9645"}},{"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":"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":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"656a63ceb06f6bcf3980320308a8ab3ac2353f5e1b6887397ffcb61e249b4074"}},{"ruleId":"D2","level":"warning","message":{"text":"TimerMessageStore.doPut (cognitive 24): TimerMessageStore.doPut has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, match/switch 3, boolean chains 2, 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/timer/TimerMessageStore.java"},"region":{"startLine":1068}}}],"partialFingerprints":{"codehealthFindingId/v1":"48c12f4d7f546b43b5212b1f59a71fbf89005ca73c99487d6ae8bd0481a9bfd4"}},{"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":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0b23ebf8968ff5d0a0338c23efdf9af206fc49b01cb2e9319e21d9501fd9b56"}},{"ruleId":"D2","level":"warning","message":{"text":"PlainAccessResource.parse (cognitive 23): PlainAccessResource.parse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, loops 6, boolean chains 2, 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":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainAccessResource.java"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"d50b968ca4bc67cae1f79cd1170e080c3c4397de4f7755d8356b0e7f8e44cf45"}},{"ruleId":"D2","level":"warning","message":{"text":"SendMessageProcessor.sendMessage (cognitive 23): SendMessageProcessor.sendMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, boolean chains 3, ternaries 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e095d9b876929a096d7917d7599683d32c57adc8788c5309ac52cbaa17b9dcb"}},{"ruleId":"D2","level":"warning","message":{"text":"SlaveSynchronize.syncTopicConfig (cognitive 23): SlaveSynchronize.syncTopicConfig has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, loops 6, 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":"broker/src/main/java/org/apache/rocketmq/broker/slave/SlaveSynchronize.java"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"aff4eb8e80dcc7d6a176d903966a4c38723cf4b81906274019c13fe84a4560e6"}},{"ruleId":"D2","level":"warning","message":{"text":"NettyRemotingClient.closeChannel (cognitive 23): NettyRemotingClient.closeChannel has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, error handling 3, loops 2, 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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8c83b5da66c126cde1a35514a5148498109171da76bb52fd79b88f7d2b7ac20"}},{"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":"NetworkUtil.getLocalAddress (cognitive 23): NetworkUtil.getLocalAddress has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, loops 5, 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":"common/src/main/java/org/apache/rocketmq/common/utils/NetworkUtil.java"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d1dad498da77b9e16b6a38b632d0aec4762c705eec049d05e9c738e7e27e410"}},{"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":319}}}],"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":"GrpcConverter.buildSystemProperties (cognitive 23): GrpcConverter.buildSystemProperties has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, boolean chains 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":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/common/GrpcConverter.java"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ba05939fa8fba270b856f3bfff79fdd4441c7c7c9a1a68c3eb05f740a2f9d84"}},{"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":211}}}],"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":"AllocateMappedFileService.mmapOperation (cognitive 23): AllocateMappedFileService.mmapOperation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, error handling 8, 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/AllocateMappedFileService.java"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bdd048a33bc27079d85d4bd4dc7a6676d04979659dc46d1088afec3df3daf0a"}},{"ruleId":"D2","level":"warning","message":{"text":"AllocateMappedFileService.putRequestAndReturnMappedFile (cognitive 23): AllocateMappedFileService.putRequestAndReturnMappedFile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, boolean chains 1, 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":"store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d3b8b333f26e058bec9a1b7f8ec46a0c6102f66f8a9e811174dc5741e3279cf"}},{"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":1637}}}],"partialFingerprints":{"codehealthFindingId/v1":"55c27544eb5fc34a2bd263a6b9ea811674b8a1d948583f282efffd13c3f88821"}},{"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":1544}}}],"partialFingerprints":{"codehealthFindingId/v1":"130ada1ba24563f1f0b496c73dfdd1f923cb265f2344f18a95a1ae7440cf9198"}},{"ruleId":"D2","level":"warning","message":{"text":"UpdateAccessConfigSubCommand.execute (cognitive 23): UpdateAccessConfigSubCommand.execute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, loops 9, 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/acl/UpdateAccessConfigSubCommand.java"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"e84d5ec5daff693ad3a59c975e062badaff834045d8a2e2826f0fe6b99ef26f7"}},{"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":"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":134}}}],"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":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf2595e6a611a2a5a00f15f13dc3fcbfa91c7fe14fa71e641ab48a17c98d0ab4"}},{"ruleId":"D2","level":"warning","message":{"text":"BrokerController.\u003Cinit\u003E (cognitive 22): BrokerController.\u003Cinit\u003E has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 14, if/else 6, 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/BrokerController.java"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"127d42dc2beaa5f532f1cf70bd7b3980ad96071ac4a42df6e1818d801cc0069a"}},{"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":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"d01b36e6468ed9ce190a800c39de5a2bd2bc86b38708c3a44b625985debe96f8"}},{"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":471}}}],"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":650}}}],"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":"TieredDispatcher.dispatchFlatFile (cognitive 22): TieredDispatcher.dispatchFlatFile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, boolean chains 2, match/switch 2, error handling 1, 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredDispatcher.java"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"498b00f5bd3d6cf6418769ed9b965a897d6e263d1db5565d72e23e12914c3b9a"}},{"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":"AckMessageProcessor.processRequest (cognitive 21): AckMessageProcessor.processRequest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, boolean chains 3, 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/processor/AckMessageProcessor.java"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f7c2342d068d72450d1c7ddc31a393e82293d5c6db155f5fef4ec4171ea2696"}},{"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":2502}}}],"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":992}}}],"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":615}}}],"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":679}}}],"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":361}}}],"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":"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":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea240edb29086c1f1ebb2ec9ab80a7d87362ebf2b4481ad87fda3a85220a3847"}},{"ruleId":"D2","level":"warning","message":{"text":"AclFileWatchService.run (cognitive 21): AclFileWatchService.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, loops 7, error handling 2, 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":"srvutil/src/main/java/org/apache/rocketmq/srvutil/AclFileWatchService.java"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"c08ba4b44e8848606776639a0d87206cb0733b44a5cd49a4bd7138b69329c8dd"}},{"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":1750}}}],"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":677}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffd339ee67dea78ec867b552771dff5b25382e95fda7e3d36bc9dbf0815ec723"}},{"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/DefaultMessageStore.java"},"region":{"startLine":2511}}}],"partialFingerprints":{"codehealthFindingId/v1":"52172a039e45680ff7bc8cdcc8b015c152493c4bc726958157fb2163f490d0f6"}},{"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":"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":112}}}],"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":"PlainPermissionManager.load (cognitive 20): PlainPermissionManager.load has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, loops 6, boolean chains 4 (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":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"596cec481197225d62ac9d413ba67296e0b6ea3df6e2e5f1ec19c96ca3ac652b"}},{"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":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"208cb4fb3c300fee7be2de27fe7281d2364a183a525197b29a97373e9bf757eb"}},{"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":"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":936}}}],"partialFingerprints":{"codehealthFindingId/v1":"48f4300fe5ef68d35b5e8a3af06aaca5da5cc0f17bfd80b8c0a0f8c21fe5c719"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQProducerImpl.sendMessageInTransaction (cognitive 20): DefaultMQProducerImpl.sendMessageInTransaction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, 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":1382}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cdbfefaadf3e55681daab0fadbb65c1ff54871331cd366a06454624e60f16fb"}},{"ruleId":"D2","level":"warning","message":{"text":"SendMessageActivity.buildMessageProperty (cognitive 20): SendMessageActivity.buildMessageProperty has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, loops 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/producer/SendMessageActivity.java"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a1bf9e0e5a04a23976cbefbc31e100bdca569a4beb04f3f9dec284be8f6d2d9"}},{"ruleId":"D2","level":"warning","message":{"text":"AbstractWriteSocketService.transferToSlave (cognitive 20): AbstractWriteSocketService.transferToSlave has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, 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/ha/autoswitch/AutoSwitchHAConnection.java"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"3354fe63f22ad6f3f602e5ab3dbc1bd93384da6105333c7865fba7a010b86732"}},{"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":648}}}],"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":739}}}],"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":197}}}],"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":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"221f11023c16006c190eaffa9c7a943e69178198e4766d0a8e1427757c6b3302"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMessageStore.resetWriteOffset (cognitive 20): DefaultMessageStore.resetWriteOffset has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, error handling 2, boolean chains 1, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java"},"region":{"startLine":1559}}}],"partialFingerprints":{"codehealthFindingId/v1":"23963ca8ad3ab83d0eeb07f14865897d836e39eead2806ecec3162df83453dae"}},{"ruleId":"D2","level":"warning","message":{"text":"TieredStoreMetricsManager.init (cognitive 20): TieredStoreMetricsManager.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, boolean chains 4, loops 3, 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/metrics/TieredStoreMetricsManager.java"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d53a186244be732c796e5ed3b6e149bf828bdc880ff58a47763045a6d7fe050"}},{"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/provider/stream/CommitLogInputStream.java"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9f1f33f7cefaf524469c9746d695fba8500ad1684461f53af780882c15cb2c4"}},{"ruleId":"D2","level":"warning","message":{"text":"TieredMessageFetcher.getMessageFromCacheAsync (cognitive 20): TieredMessageFetcher.getMessageFromCacheAsync has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, loops 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageFetcher.java"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"066b1b5ceb12a949918ba5ae05851e24508a5b4c57227804a90b398bf4a3df4a"}},{"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":"RemoteAddressStrategyFactory.getRemoteAddressStrategy (cognitive 19): RemoteAddressStrategyFactory.getRemoteAddressStrategy has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, 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":"acl/src/main/java/org/apache/rocketmq/acl/plain/RemoteAddressStrategyFactory.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"540eeb68c53dbe958a2b0da62d9f204309400d0dd1c6644fd375eb3fc072acd4"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultConsumerIdsChangeListener.handle (cognitive 19): DefaultConsumerIdsChangeListener.handle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, loops 4, boolean chains 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":"broker/src/main/java/org/apache/rocketmq/broker/client/DefaultConsumerIdsChangeListener.java"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"b660b817acf632d387c9ca53585589593b1419df83b3847c26f3ce8fa3234ec6"}},{"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":"PopLongPollingService.polling (cognitive 19): PopLongPollingService.polling has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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/longpolling/PopLongPollingService.java"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"373e5fd1f67023d4a771671894b68b78f7887b103b31529992f966caaf2777b1"}},{"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/offset/ConsumerOrderInfoManager.java"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"73e31ae55ca24aca78ffff3d3613b099bee0ff905a7d32c3f304a2fe597f5dbb"}},{"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/offset/ConsumerOrderInfoManager.java"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4bf2e566687c55e1c8d1efc81b7f9337a22aa10155cd90719d6b7a642a0f80b"}},{"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":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e79a905c6d010e9097e4140559121dfc50510c7922c833a2a2eb4cad2ca7369"}},{"ruleId":"D2","level":"warning","message":{"text":"AdminBrokerProcessor.resetOffsetInner (cognitive 19): AdminBrokerProcessor.resetOffsetInner has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 4, boolean chains 3 (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/processor/AdminBrokerProcessor.java"},"region":{"startLine":1863}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bab9a0b08a80a7a5b0bbb90754de39532e5112439dbcaa3a3ea728b3b609b61"}},{"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":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec91a5e81208feb26bda1f3aefea7dcf1e08ec43480556642102f9dc08a32a67"}},{"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":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"34da725b495413da0a7a3d033f50053f2cb9714edd4650b7adcf1761ad2d221e"}},{"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":"PullMessageRequestHeader.decode (cognitive 19): PullMessageRequestHeader.decode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"3aad7d07bb949c008e14b9fdb577f8709b09679e289ecfff22f4a7f39cf7cbf1"}},{"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":"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":"HAProxyMessageForwarder.forwardHAProxyMessage (cognitive 19): HAProxyMessageForwarder.forwardHAProxyMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/remoting/protocol/http2proxy/HAProxyMessageForwarder.java"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"08c8252b75fa8e756ea48f24d0227c976d46b4a6a093f931ac886f54b7286eaf"}},{"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":523}}}],"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":"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":"TieredMessageFetcher.prefetchMessage (cognitive 19): TieredMessageFetcher.prefetchMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 3, ternaries 3, loops 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/TieredMessageFetcher.java"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"720f947438b21da2cde02e5c4b0544e672ab250a4931d5f3c54bd676b92d8e73"}},{"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":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"503c77b2408031e24becb96b4d5924c06092b4268d29789a1c3d0309fc4fd2be"}},{"ruleId":"D2","level":"warning","message":{"text":"ResetOffsetByTimeCommand.execute (cognitive 19): ResetOffsetByTimeCommand.execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, error handling 3, ternaries 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":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c83d455c6bded1fe3ba0a524c0662ceb4715165c1d47f3a164627d80f6795ad"}},{"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":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"90087c8749080d9cf3f6c9c4e0b9f550d9d888be435bb165dcf3352d863a241a"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsumerOrderInfoManager.autoClean (cognitive 18): ConsumerOrderInfoManager.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/offset/ConsumerOrderInfoManager.java"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"7906263a21e35e4e4b00453242a0e754d4dbd427535763ed9e3be1d00847ad2b"}},{"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":1056}}}],"partialFingerprints":{"codehealthFindingId/v1":"942f7dd260c44a0ce3543292a930c90e313d59a728d8b5565ebde589eb659962"}},{"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":177}}}],"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":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"8534b96ee2207b8271ab342d3b95a1ca8ea086a83afe3bd30a0f44d79385098a"}},{"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":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"769d68f600a97657c47b508eeb271a32bdd77bfe83cfe05b9c6ee95ff30326ed"}},{"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":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1263a41cb17d7fe13cb98368cf5e4915d4e1624ca16f096adc86a349b4aa8c5"}},{"ruleId":"D2","level":"warning","message":{"text":"RebalanceImpl.truncateMessageQueueNotMyTopic (cognitive 18): RebalanceImpl.truncateMessageQueueNotMyTopic has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"85cddc9565a76e37f0e9a8b8002b1d5d799dc62ec60a9ed2d993b5e854084275"}},{"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":"RocksDBConsumeQueueTable.binarySearchInCQByTime (cognitive 18): RocksDBConsumeQueueTable.binarySearchInCQByTime has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, ternaries 4, 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/RocksDBConsumeQueueTable.java"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ebcae95845c3cd1f8dcddabaa6651e404881e7d04dd0c836012eee5a9190bb4"}},{"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":1489}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee5805d7a5b45e23cdce205f4f6441eeef603874e0b1c69c7fed1364bd396547"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMessageStore.queryMessage (cognitive 18): DefaultMessageStore.queryMessage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, 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/DefaultMessageStore.java"},"region":{"startLine":1257}}}],"partialFingerprints":{"codehealthFindingId/v1":"30eca8e3a26eb4243f42895995c96add6a4f0795d35332cc80995b6062633f43"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageExtEncoder.encode (cognitive 18): MessageExtEncoder.encode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, ternaries 2, 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/MessageExtEncoder.java"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"64be8f7ecda46a6b3766cd79a61f2a44adb8c7cec7267a980ed7838a6b77ad07"}},{"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":"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":596}}}],"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":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"19319ee400561c5586dbd2dff60c07261c3953a9a6ac2736f635a6688f85a3c7"}},{"ruleId":"D2","level":"warning","message":{"text":"NettyRemotingClient.createChannel (cognitive 17): NettyRemotingClient.createChannel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, 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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc6f4266ebbca398e6e80ebbac245cb57b713b69741530a696d16941e76f40cd"}},{"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":346}}}],"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":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0c883a713351f7e176cfa70459c8d8848c146a89a9eaa10df39d1814055203b"}},{"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":"BrokerContainerStartup.createBrokerContainer (cognitive 17): BrokerContainerStartup.createBrokerContainer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, 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":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"817a408cfdb0ddcd3e97c2c445b8242a61e980e402290d77ef321a5452b341e9"}},{"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":393}}}],"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":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b84e8f5cb734da93fb0fee05406ac59d3e73f7f0041a874cc4b6f2f67506723"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageQueueSelector.selectOneByPipeline (cognitive 17): MessageQueueSelector.selectOneByPipeline has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, ternaries 6, 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":"proxy/src/main/java/org/apache/rocketmq/proxy/service/route/MessageQueueSelector.java"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"2743a59b42afa999cf7cc57e0858b4dd0c61b6ceef311a1b1f1a89b953e783ea"}},{"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":"CommitLog.isMappedFileMatchedRecover (cognitive 17): CommitLog.isMappedFileMatchedRecover has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 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/CommitLog.java"},"region":{"startLine":825}}}],"partialFingerprints":{"codehealthFindingId/v1":"b84783fc7313f543a7ce8dee2e8cc99ac2229d3407ad1604b08e35af6ab8b1cd"}},{"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":527}}}],"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":"PrintMessageSubCommand.execute (cognitive 17): PrintMessageSubCommand.execute has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4, if/else 4, loops 3, match/switch 3, 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":"tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageSubCommand.java"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"4969f92a5a9e3ea2e105c48f6cfbddcab280ed1de052de8d85de04b48794f2d3"}},{"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":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"3260b1d44becb7ba357a9f2c1fba3104b6754c999c8aed8d396956b138aafeaa"}},{"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":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"272d51104a847f1bab11fc3a764b1de16f0481570ff2f9abb4c107b9ec98d447"}},{"ruleId":"D2","level":"warning","message":{"text":"PopReviveService.reviveMsgFromCk (cognitive 16): PopReviveService.reviveMsgFromCk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, match/switch 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java"},"region":{"startLine":512}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cd42e41640890de9fc16c6b4fdd009bdc49bf8dd14eb7ba98faedc7b46d93fa"}},{"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":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdc2af1811d9834fa484d4977d3c3b470b57cbd3900782875955fee227ac86c5"}},{"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":"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":401}}}],"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":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e9a896e1c806de3358445314f86e0f198f5e33a34ba4d9a6b593fbb6a55e0ce"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultMQPushConsumerImpl.start (cognitive 16): DefaultMQPushConsumerImpl.start has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, match/switch 4 (nesting depth added 7). 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/DefaultMQPushConsumerImpl.java"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cdfe66b06f05330bdeecd59fb6e34609059b72138c2134442b4dba7dd31c969"}},{"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":"AsyncRunnable.run (cognitive 16): AsyncRunnable.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, 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":"client/src/main/java/org/apache/rocketmq/client/trace/AsyncTraceDispatcher.java"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"5040688073d841abae64122f581d0b5a9c2f7e334cdf635651189a1e7017fc1c"}},{"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":"NetworkUtil.openSelector (cognitive 16): NetworkUtil.openSelector has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, error handling 5 (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/utils/NetworkUtil.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c16e2620d2b8bb015780e39092b8dbf80dbe6496dde561fb6f02c52c1898562"}},{"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":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"38b30c42f5a17812204c64ecd3d6639b724fd73878c534b5bbcfc4327f39d6bb"}},{"ruleId":"D2","level":"warning","message":{"text":"ProducerProcessor.sendMessage (cognitive 16): ProducerProcessor.sendMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 2, loops 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/processor/ProducerProcessor.java"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"93719698d6d23f34c003f819d76edc90d3c8dfc2a7b1d9cc426a6b3934b70e8b"}},{"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":495}}}],"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":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cfa0f12691e12fa686c37c2ffb821ae62a1707dc764f5f51c414d8d56a54baa"}},{"ruleId":"D2","level":"warning","message":{"text":"IndexService.queryOffset (cognitive 16): IndexService.queryOffset 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":"store/src/main/java/org/apache/rocketmq/store/index/IndexService.java"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bd5f8f1746dc1cb6eb70d2b353dd6b223798c8bc949a9e146003bfda7d73cc5"}},{"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":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fe3b1b15c394c9a57b03c05ad4c6442f74f9e26dc5821fd39302a49443e30cb"}},{"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":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"259b0cda495677555a501609131ca3c22986183c26bd8a73c6deb8196339a713"}},{"ruleId":"D2","level":"warning","message":{"text":"CleanConsumeQueueService.deleteExpiredFiles (cognitive 16): CleanConsumeQueueService.deleteExpiredFiles has cognitive complexity 16 (threshold 15). Drivers by points: error handling 5, if/else 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/DefaultMessageStore.java"},"region":{"startLine":2470}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfb1f900533d51c78a55e84809021f179cce6651792fe44c6d200b30d54609d0"}},{"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":"TieredFileSegment.commitAsync (cognitive 16): TieredFileSegment.commitAsync has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, ternaries 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/provider/TieredFileSegment.java"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c440ec997049415774a308b870edb356236979488169978ee64ef342277486"}},{"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":1517}}}],"partialFingerprints":{"codehealthFindingId/v1":"d08d8d017a666b2a7223b73c43deb1a82d2511ab620112b104a9364f7d1627ff"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BrokerConfig: TooManyMethods \u2014 343 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 342 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":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"80cd9e156ee10d26eff2f017e317956065eb35c8b7dd012aec05f0fcd59dfc03"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ProxyConfig: TooManyMethods \u2014 293 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: DefaultMessageStore: TooManyMethods \u2014 162 methods. Most of these members implement store.MessageStore (110 of 155 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":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c21fcd7adfb611f630ce37c9cda91e0965a71be17e504c399a32ab5d356122b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BrokerController: TooManyMethods \u2014 158 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":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5446cdb844350d3fca7fffeab127d64cb41e6d43d4a8fbde04b8a736d05a5fd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: impl/MQClientAPIImpl.java: FileTooLong \u2014 2416 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: MQClientAPIImpl (230-3295). 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":"TooManyMethods: MQClientAPIImpl: TooManyMethods \u2014 130 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":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"639695f5f4a5b9039be9a69f23abe38f2c5d084226e82318618e3f2d3c05aaaa"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQAdminExt: TooManyMethods \u2014 128 methods. Most of these members implement admin.MQAdminExt (94 of 108 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":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eb33b9aeaa62ed19f0c097cafe410cbcee0977cea62367e847dcbaddd20cfe2"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQAdminExtImpl: TooManyMethods \u2014 127 methods. Most of these members implement admin.MQAdminExt (94 of 109 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":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"67b4107efe30156eb36f69a05e045ea3018d71a45d4a1b3fbb2d116caee52ff1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: processor/AdminBrokerProcessor.java: FileTooLong \u2014 2094 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: AdminBrokerProcessor (194-2818). 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":"FileTooLong: store/DefaultMessageStore.java: FileTooLong \u2014 2088 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: DefaultMessageStore (116-3327). 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 117 methods. Most of these members implement store.MessageStore (110 of 111 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":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"af84f6d4142583ee729d066305a9fa5d1ca9df4c0b91e8fb6d38f275a56a5a62"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQProducer: TooManyMethods \u2014 107 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":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4f186d79edf7cfadd51a0ff361877860b8a785b55d3240262dbcff9a09f10f3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQPushConsumer: TooManyMethods \u2014 103 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":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"717e277be9f834a0d933b07b6338f42d6ece8abf56bddabebcef92d91850ffec"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQProducerImpl: TooManyMethods \u2014 97 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: broker/BrokerController.java: FileTooLong \u2014 1559 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: BrokerController (170-2422). 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":"FileTooLong: store/CommitLog.java: FileTooLong \u2014 1526 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: CommitLog (72-2447). 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":"TooManyMethods: DefaultMQPushConsumerImpl: 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/impl/consumer/DefaultMQPushConsumerImpl.java"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"15545121242691b05b8c3b8ce6125e8717579b1f1b05bfc097b96795ef84cafc"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultLitePullConsumer: TooManyMethods \u2014 84 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":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c99e45a5e3aed8e2ebc0604c1fba909609c1354c6453257e4552813cdf1a21a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TimerMessageStore: TooManyMethods \u2014 83 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":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b0bbdc891c7a2bdba56e6ce40e618b4b59821add6763895c63fc1a682db3ebb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: admin/DefaultMQAdminExtImpl.java: FileTooLong \u2014 1371 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: DefaultMQAdminExtImpl (124-1934). 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: AdminBrokerProcessor: TooManyMethods \u2014 80 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":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dca0e633f63a053f1a310796f945760d0412bcc2ebadac8aad659b0c9702dd8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultLitePullConsumerImpl: TooManyMethods \u2014 79 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: timer/TimerMessageStore.java: FileTooLong \u2014 1291 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: TimerMessageStore (74-1871). 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":"FileTooLong: producer/DefaultMQProducerImpl.java: FileTooLong \u2014 1243 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: DefaultMQProducerImpl (101-1813). 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: CommitLog: 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":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"e17a1ab060b77a7243f480f230608aea919a26bcb9c1440efe1a23332ad71ae5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TieredMessageStoreConfig: TooManyMethods \u2014 68 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/common/TieredMessageStoreConfig.java"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"15b4a46b8348c0044ac4d56126e2cada1e372433ce5cca1936c057c6a9892771"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQPullConsumerImpl: 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":"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":"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: BrokerStatsManager: 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":"store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"a44c475bccf832eb7300d8d3171fed06803f555222b2178e1038359c6502edd5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ClientConfig: 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":"client/src/main/java/org/apache/rocketmq/client/ClientConfig.java"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9b3f41a869e93222924be6077f33edf434a76ff26f7949495da50e1ce4120d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMappedFile: TooManyMethods \u2014 64 methods. Most of these members implement logfile.MappedFile (39 of 56 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"582adbb1f66922a8464a72275a881689f3bdac9329c4d2786caed4d518e5097b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BrokerOuterAPI: 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":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1de3830b18673bd32e0c15a6caac2b979054ad43f93667a053601df3a9d1853"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: out/BrokerOuterAPI.java: FileTooLong \u2014 1050 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: BrokerOuterAPI (145-1475). 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":"FileTooLong: consumer/DefaultMQPushConsumerImpl.java: FileTooLong \u2014 1046 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: DefaultMQPushConsumerImpl (97-1564). 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 62 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":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa57b5405e6ab8bdff59802cd0caf3d7fe2b7ca0b686dd7cd17f0c7b4223e476"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MQClientInstance: TooManyMethods \u2014 61 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":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9f252b67eb805ee1c75b69d0a369b445ab3ae6a7e84c8315c24f08ef20e3934"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultMQPullConsumer: 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":"client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPullConsumer.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bcfc0ee762db387a83eda9b5180466045f25f29e2d509b10d1941f34d3055e6"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BatchConsumeQueue: 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":"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: config/MessageStoreConfig.java: FileTooLong \u2014 918 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: MessageStoreConfig (26-1808). 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: 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":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6d0aeba19d44980178a7510b506aab6196d49b01afa91596b0f0e5cbf944a63"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MappedFileQueue: TooManyMethods \u2014 53 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":"FileTooLong: common/BrokerConfig.java: FileTooLong \u2014 880 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: BrokerConfig (28-1783). 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: ControllerConfig: TooManyMethods \u2014 52 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: ConsumeQueue: TooManyMethods \u2014 52 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":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"3565ce1dbd883b13bc4c6d3aa9a88b29d037d4f1b9aa797510fa52f8a78e5d60"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: factory/MQClientInstance.java: FileTooLong \u2014 866 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: MQClientInstance (91-1334). 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":"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-1112). 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: consumer/DefaultLitePullConsumerImpl.java: FileTooLong \u2014 823 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: DefaultLitePullConsumerImpl (79-1302). 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: netty/NettyRemotingClient.java: FileTooLong \u2014 813 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: NettyRemotingClient (92-1181). 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: config/ProxyConfig.java: FileTooLong \u2014 791 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ProxyConfig (41-1474). 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":"TooManyMethods: ConsumeMessageContext: TooManyMethods \u2014 47 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: store/ConsumeQueue.java: FileTooLong \u2014 779 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ConsumeQueue (44-1196). 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":"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":"FileTooLong: queue/BatchConsumeQueue.java: FileTooLong \u2014 766 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: BatchConsumeQueue (46-1173). 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":"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: 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: 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 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/ConsumeQueueStore.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"331ab34ee70172c22939ad74f4c14140e55ef8f4c6c07f1d97881c86851df10e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CompositeFlatFile: 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/CompositeFlatFile.java"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"c03aef7b43b2f09adf2ba92aa28e430e72a54a8f1c59c300ff255dfe22c54152"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RebalanceImpl: 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":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cdf7887a0a42f363834f86de9ee5b1f83071612d30d9ef43056ca4134506f40"}},{"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: RocksDBConsumeQueue: 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/RocksDBConsumeQueue.java"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2bea440309ea5a86e78cbcc3724ea3767ddb204dd80f0b6b61f0af08e2391f3"}},{"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: dledger/DLedgerCommitLog.java: FileTooLong \u2014 664 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: DLedgerCommitLog (64-1016). 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":"FileTooLong: processor/PopMessageProcessor.java: FileTooLong \u2014 661 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: PopMessageProcessor (96-907). 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":"TooManyMethods: Message: 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":"common/src/main/java/org/apache/rocketmq/common/message/Message.java"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"21649821bb17a1601865d471318d0ba45bd5558039963f90115c432be8460b08"}},{"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: DefaultMessagingProcessor: TooManyMethods \u2014 39 methods. Most of these members implement processor.MessagingProcessor (33 of 37 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":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"9952c79816890b09e997e60a8928e40d1b191e46930e801702ebdf4b8aa6d6b3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DLedgerCommitLog: 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":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"24f27f5dadd480985b8f93c08bf52de4212c0c5158b4d6f514ea1e19fb059962"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: processor/PullMessageProcessor.java: FileTooLong \u2014 631 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: PullMessageProcessor (80-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":"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: PlainAccessResource: 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":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainAccessResource.java"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"38ada392440e6fef2c43e5450928c385ae10fcbc16c976fc29fd00c16ba04058"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RocksDBConsumeQueueOffsetTable: 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":"store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueOffsetTable.java"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5bd19cc145d0d99f76692b473966cd3b6ade78edc793e72802f42d9387fc38e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: logfile/DefaultMappedFile.java: FileTooLong \u2014 602 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: DefaultMappedFile (61-929). 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: TopicConfigManager: TooManyMethods \u2014 36 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":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"245b9d750efa9b1d0e895f8782dbb2b544d5634411e401b56754ece10c29acbf"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MixAll: TooManyMethods \u2014 36 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":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6726a58b88140970fb8cbe43b7a65e08c763b24c0acb0ff21db28d70aa87d98"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NettyRemotingClient: TooManyMethods \u2014 36 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":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d27c95b420613aaa25d73eda858285612971cc1755c87899f647e52a1d030d2"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NettyServerConfig: TooManyMethods \u2014 36 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: TieredFileSegment: TooManyMethods \u2014 36 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/provider/TieredFileSegment.java"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"f767b77e3ceb36273393105d8fb6ce72c2bb27fe5f0ac1c2c6d1fe9723f994dd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: admin/DefaultMQAdminExt.java: FileTooLong \u2014 597 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: DefaultMQAdminExt (76-877). 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: 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: processor/PopBufferMergeService.java: FileTooLong \u2014 578 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: PopBufferMergeService (47-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/processor/PopBufferMergeService.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"14788792788e1c852e42acbc5b522005a7db7a745c14fa5ff8e47179a0654020"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: schedule/ScheduleMessageService.java: FileTooLong \u2014 569 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: ScheduleMessageService (64-850). 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":"TooManyMethods: SubscriptionGroupConfig: 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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/subscription/SubscriptionGroupConfig.java"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"f77a85f84364684b3454fe1779b4c6911a959174b6599b2de7938f714b09e5af"}},{"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":"FileTooLong: store/MappedFileQueue.java: FileTooLong \u2014 560 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: MappedFileQueue (40-911). 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 559 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: DefaultMQPullConsumerImpl (74-843). 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":"FileTooLong: stats/BrokerStatsManager.java: FileTooLong \u2014 553 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: BrokerStatsManager (43-778). 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":"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":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"6db0cc6858fec0cc44f6f8818d458b88830cd0e2a71d9365e458a8f76ce2acbc"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PullMessageRequestHeader: 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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"22c595370f8427e36eef3f5081c020505a8c4d222acecbc5b65e99e9930d1f1b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SendMessageRequestHeaderV2: 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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/SendMessageRequestHeaderV2.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9bf96a783b95b833939c7abafcf4a792c58a24aa9ad0ac0e9b52c62f10d6f48"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RocksDBConsumeQueueStore: 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":"store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueStore.java"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9b57a85ca1f0a9402f7c3817035cf8a744d990c10c6df10438196397b4a6303"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: consumer/RebalanceImpl.java: FileTooLong \u2014 546 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: RebalanceImpl (49-849). 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: controller/ReplicasManager.java: FileTooLong \u2014 537 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ReplicasManager (67-879). 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 532 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: NettyRemotingServer (91-812). 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: producer/DefaultMQProducer.java: FileTooLong \u2014 530 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: DefaultMQProducer (64-1382). 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":"TooManyMethods: SubscriptionGroupManager: 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":"broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c9a6f717cc55d15d497cfb49f6866bf8e7985a3577df82cc34347cf7d45dd10"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NettyRemotingServer: 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":"remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingServer.java"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"67db8d8875c05114d2fba9ea8f50736cbaf2ec20c71873cce3eb85258d370235"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DispatchRequest: 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":"store/src/main/java/org/apache/rocketmq/store/DispatchRequest.java"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"912520326328482f33b1c6a7c13aa89851cc3088c253b45495eb4325155bf17b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: processor/PopReviveService.java: FileTooLong \u2014 504 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: PopReviveService (64-689). 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: processor/SendMessageProcessor.java: FileTooLong \u2014 504 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: SendMessageProcessor (78-686). 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":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:1143-1163 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:1166-1186 \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:1143\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":1143}}}],"partialFingerprints":{"codehealthFindingId/v1":"850aea5a506215e1948233fc0ad8db3e83bea79498ac7658781214bb91d4239c"}},{"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:495-512 | store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:639-656 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java"},"region":{"startLine":495}}}],"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): remoting/src/main/java/org/apache/rocketmq/remoting/RemotingClient.java:56-72 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/RemotingProtocolServer.java:244-260 \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:753-769 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:131-147 \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:753\u0060 it begins part-way through the construct above it, so those exact 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":753}}}],"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:872-888 \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 (16 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:385-400 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:426-441 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:385\u0060 it begins part-way through the construct above it, so those exact 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":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca27afe7e2b04aad99189baeb1bb77a3e6ba990b0fb09e1fa48ae4462582b59a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/compression/ZlibCompressor.java:41-56 | common/src/main/java/org/apache/rocketmq/common/UtilAll.java:416-431 \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:41\u0060 it begins part-way through the construct above it, so those exact 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/ZlibCompressor.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"a601b916b64d3d025081830c1001de52808a19e889ffbac038cb96c4505b3648"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2664-2679 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2694-2708 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2723-2737 \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:2664\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":2664}}}],"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:1414-1428 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1050-1064 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1414\u0060 it begins part-way through the construct above it, so those exact 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":1414}}}],"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:163-177 | 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:163\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":163}}}],"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:534-550 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:696-710 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:534\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae00efbd3dbc2ccdb6c4df93ff1084c151659405a8a8b014d286b491caddc050"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java:95-109 | common/src/main/java/org/apache/rocketmq/common/stats/StatsItemSet.java:48-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 \u0060common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java:95\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"2438e4bb1ae3d633b373de9bfa6ccd14a708aaefd7564a06080b9e3920c07133"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): tieredstore/src/main/java/org/apache/rocketmq/tieredstore/provider/stream/CommitLogInputStream.java:115-129 | tieredstore/src/main/java/org/apache/rocketmq/tieredstore/provider/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/provider/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/provider/stream/CommitLogInputStream.java"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a1e5d600fe202ac630f58a672e43ae5a1d885aa4c75c7aebc2da75701a5d043"}},{"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 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:928-941 | broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:965-978 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:928\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":928}}}],"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:253-266 | 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:253\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":253}}}],"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:1542-1555 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1599-1612 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1542\u0060 it begins part-way through the construct above it, so those exact 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":1542}}}],"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:2187-2201 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2216-2229 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:2187\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":2187}}}],"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:77-90 | common/src/main/java/org/apache/rocketmq/common/UtilAll.java:382-395 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. 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:77\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":77}}}],"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:720-733 \u2014 both copies are in the same file, so extract the block 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:1742-1755 \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:521-534 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:708-722 \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:521\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":521}}}],"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:382-395 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:780-793 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:382\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4d408711b98f73a33225f55b79f3b8cdca5eed863dae02bd4a73329bcb4310d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1678-1691 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1786-1799 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1678\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":1678}}}],"partialFingerprints":{"codehealthFindingId/v1":"22c1b5e30e7a346099b461379b0dd9d17f4a21b6d156b62309d69c9e042a1dfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:373-386 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1109-1122 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:373\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":373}}}],"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:48-61 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/SkipAccumulationSubCommand.java:83-96 \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:48\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java"},"region":{"startLine":48}}}],"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:72-84 | 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: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerEpochSubCommand.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7be11c86e40ebcc3dfaa30edcf6a7829c2448051b6fd834eb1b1b5e5e252052"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1570-1582 | 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:1570\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":1570}}}],"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:280-292 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:770-782 \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:770\u0060 it does not close everything it opens, so those exact 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":280}}}],"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:483-495 \u2014 both copies are in the same file, so extract the block 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:469-481 | client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:505-517 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:469\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":469}}}],"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/MQClientAPIImpl.java:1262-1274 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1295-1307 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1262\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":1262}}}],"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:2445-2457 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2493-2505 \u2014 both copies are in the same file, so extract the block 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":2445}}}],"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/CommitLog.java:1039-1051 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1199-1212 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1039\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":1039}}}],"partialFingerprints":{"codehealthFindingId/v1":"853ba00f1e893a0b69621e15af57d9bb3a0c09c2e62bc2a8b1aeced44805fb81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:320-332 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:341-353 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:320\u0060 it begins part-way through the construct above it, so those exact 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":320}}}],"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:1402-1414 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1493-1505 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1402\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":1402}}}],"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/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 11): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:368-379 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:401-412 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:430-441 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:451-462 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:474-485 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1445-1456 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1595-1606 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2077-2088 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2137-2148 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2749-2760 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3062-3073 \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. 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":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f6c5b4f1d0bad6ffe70d73a2767ec700b925342cdcc57e896df062e4e90d8d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:751-762 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1458-1469 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1746-1757 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1802-1813 \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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:751\u0060 it begins part-way through the construct above it, so those exact 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":751}}}],"partialFingerprints":{"codehealthFindingId/v1":"0382ad4c7dd387a6b4e3bccb9d81842ef5da1cd2895d92f9fe6d8b46c11357c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:437-448 | client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:473-484 | client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:509-520 \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:437\u0060 it begins part-way through the construct above it, so those exact 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":437}}}],"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:131-142 | namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvStartup.java:164-175 | namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvStartup.java:203-214 \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: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. 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":131}}}],"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:350-361 \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): broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:287-298 | broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:344-355 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:287\u0060 it begins part-way through the construct above it, so those exact 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/ConsumerLagCalculator.java"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"859826b026e9aa32a2002cf0e5417dca3ae2b4be27b36c0bec2991d55f969b30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:868-879 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1320-1332 \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/out/BrokerOuterAPI.java"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbfd8f8511f2c16139919c003981b6aeb74382054726fbed0d1d9e8f979ab5a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:890-901 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1372-1384 \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/out/BrokerOuterAPI.java"},"region":{"startLine":890}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc7a2381175b792865694ce19c1d44276220a70bd4e3f391a5323af9425fedfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:911-922 | broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:950-962 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:911\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java"},"region":{"startLine":911}}}],"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:817-828 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:847-858 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:817\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":817}}}],"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/ClientManageProcessor.java:103-118 | broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java:169-180 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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: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":"broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java"},"region":{"startLine":103}}}],"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:1674-1685 | container/src/main/java/org/apache/rocketmq/container/InnerBrokerController.java:97-108 \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:1674\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":1674}}}],"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:143-154 | remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java:161-172 \u2014 both copies are in the same file, so extract the block 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":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe348cd05c54cfcafb7691dfe13f305399c184d4f67c3ef6d14f7699d2876a78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:83-94 | client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:64-75 \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: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":"client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"98654955a6ba572895741403d77f8d84404864d33e062a6f73b9e8d3d9acac22"}},{"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:364-375 | 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:364\u0060 it begins part-way through the construct above it, so those exact 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":364}}}],"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:491-503 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:611-622 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:491\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":491}}}],"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:2095-2106 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2115-2126 \u2014 both copies are in the same file, so extract the block 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":2095}}}],"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:826-837 | namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:859-870 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:826\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":826}}}],"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:1098-1109 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:1120-1131 \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:1098\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":1098}}}],"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:796-807 | store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:918-929 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:796\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java"},"region":{"startLine":796}}}],"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:937-948 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1102-1113 \u2014 both copies are in the same file, so extract the block 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":937}}}],"partialFingerprints":{"codehealthFindingId/v1":"31c3bd92bef7e3edd2a0dffeb0906ae2f376de530230a4152e59b35f433cea9b"}},{"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): namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java:531-542 | namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java:565-575 | namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java:585-595 | namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java:604-614 \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 \u0060namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java:531\u0060 it begins part-way through the construct above it, so those exact 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":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e2da819f493b615ba4d5772434c4a0614e771872f4c03dc0092ef4323bf3ebb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/offset/BroadcastOffsetStore.java:31-41 | client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:82-92 | client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:63-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/offset/BroadcastOffsetStore.java"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c09a5fb5eed39baea159f2402ab0af90172c0bdfc3adf7ff2054c5481241123"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:133-143 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:147-157 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:175-185 \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":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"623e79e1654d2590ceaf85aad781892f5af6b22ac51dec38abce95ae1199ff19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2512-2522 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2528-2538 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2545-2555 \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":2512}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a926d7fce2d1a4ef90f9453f16910d38e51560ec435c4d785908ff16615447f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:1058-1068 | namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:1079-1089 | namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:1101-1111 \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:1058\u0060 it begins part-way through the construct above it, so those exact 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":1058}}}],"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: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 \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/filter/ConsumerFilterManager.java:374-384 | broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java:395-405 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:374\u0060 it begins part-way through the construct above it, so those exact 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":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce9e4074d83bf333b129efedfac04eff36e483e2f2183b37165fdd3c046c8075"}},{"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:123-133 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/RemotingProtocolServer.java:332-342 \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: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":"broker/src/main/java/org/apache/rocketmq/broker/latency/BrokerFastFailure.java"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"65ecfebe2d6603ec032e50def09ae7109861de38ceae7ba278ef15691de35510"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOrderInfoManager.java:98-108 | broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOrderInfoManager.java:146-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 \u0060broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOrderInfoManager.java:98\u0060 it does not close everything it opens, so those exact 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/offset/ConsumerOrderInfoManager.java"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdbc3ed7ca0af1285d3d829a7ffe909a41f2cce6735790f0dd77fbecd8051e42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/offset/LmqConsumerOffsetManager.java:41-51 | broker/src/main/java/org/apache/rocketmq/broker/offset/RocksDBLmqConsumerOffsetManager.java:36-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 \u0060broker/src/main/java/org/apache/rocketmq/broker/offset/LmqConsumerOffsetManager.java:41\u0060 it begins part-way through the construct above it, so those exact 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/LmqConsumerOffsetManager.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"91d1284f4ba0f3d41ab063da714fed1e61ddc06d8bb98551e2e350ad98c24cbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:871-881 | container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java:267-278 \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:871\u0060 it begins part-way through the construct above it, so those exact 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":871}}}],"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/QueryMessageProcessor.java:120-130 | broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:165-175 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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: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. 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":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ccadb89ffc2d87243e8fbd53ad7d20d07b9adc8bc477c5fbafbe0dc83e229f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java:361-371 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:666-676 \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:361\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":361}}}],"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/TopicConfigManager.java:455-465 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:478-488 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:455\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"20b10b34f0ca3bb52f0716421cad67d5b99322f95fe0fb40827e6edb294e0b0e"}},{"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/BrokerController.java:1648-1658 | container/src/main/java/org/apache/rocketmq/container/InnerBrokerController.java:71-81 \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:1648\u0060 it does not close everything it opens, so those exact 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":1648}}}],"partialFingerprints":{"codehealthFindingId/v1":"18e4beadf3f2dd66486ca82d42eb251a400ad20ad1450cfebe8f2a8aa5b31d10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/netty/TlsHelper.java:216-226 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/MultiProtocolTlsHelper.java:102-112 \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:216\u0060 it begins part-way through the construct above it, so those exact 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":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"da502b71d4362fddbf3241e8235b8a208c013942670dc16d7ae5b31265861748"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:108-118 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/SendMessageResponseHeader.java:60-70 \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":108}}}],"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:99-109 | client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:80-90 \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: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":"client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d22c24df138cdfb99bd30f2c93a79d1981f73d2e04465cc8e791ad94c91e0cb"}},{"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:1050-1060 | 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:1050\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":1050}}}],"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:455-465 | client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:491-501 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:455\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":455}}}],"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:1646-1656 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1845-1855 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1646\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":1646}}}],"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:1798-1808 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1820-1830 \u2014 both copies are in the same file, so extract the block 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":1798}}}],"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/DefaultMQProducer.java:302-312 | client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java:337-347 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/DefaultMQProducer.java:302\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"f43577790a4c3b2a98386b1915f3a631e1c50ff9065857fddb9cc38b722f80f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java:78-88 | client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java:123-133 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"654caa2955e95feb676a0637f14769d5dd63441ab2b6ca75a8e86d9e7b0ccc78"}},{"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): namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/ClientRequestProcessor.java:91-101 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/activity/GetTopicRouteActivity.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 \u0060namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/ClientRequestProcessor.java:91\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"a94a2b7ac693b6d443165f92b370662f897af042e692c99e3fb1c140e0ed08ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/remoting/channel/RemotingChannel.java:167-177 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/channel/RemotingChannel.java:197-207 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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: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":"proxy/src/main/java/org/apache/rocketmq/proxy/remoting/channel/RemotingChannel.java"},"region":{"startLine":167}}}],"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:110-120 | proxy/src/main/java/org/apache/rocketmq/proxy/service/sysmessage/HeartbeatSyncer.java:148-158 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:110\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/service/sysmessage/HeartbeatSyncer.java"},"region":{"startLine":110}}}],"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:845-855 | store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:943-953 \u2014 both copies are in the same file, so extract the block 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":845}}}],"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:900-910 | store/src/main/java/org/apache/rocketmq/store/MessageExtEncoder.java:307-317 \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":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceaed5f141cf831cd70e987341523c058534529c31a0c6d52a1d669603af75d7"}},{"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:152-162 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByUniqueKeySubCommand.java:103-113 \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:152\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":152}}}],"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 4): acl/src/main/java/org/apache/rocketmq/acl/common/AuthenticationHeader.java:38-47 | common/src/main/java/org/apache/rocketmq/common/consumer/ReceiptHandle.java:85-94 | controller/src/main/java/org/apache/rocketmq/controller/impl/heartbeat/BrokerLiveInfo.java:49-58 | 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 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. 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":"acl/src/main/java/org/apache/rocketmq/acl/common/AuthenticationHeader.java"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba6840eec07f504ef3ddd3bfbba14177b8771c8bf8a2cb7c6580e780d61ed9e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java:91-100 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:101-110 | broker/src/main/java/org/apache/rocketmq/broker/processor/PollingInfoProcessor.java:79-88 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:257-267 \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:91\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"54487ed5aaba39d675c753026536a2765d5a97c42a15c2df302ad421e18b694a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): tools/src/main/java/org/apache/rocketmq/tools/command/acl/DeleteAccessConfigSubCommand.java:52-61 | tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java:50-59 | tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateGlobalWhiteAddrSubCommand.java:48-57 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicSubCommand.java:52-61 \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":"tools/src/main/java/org/apache/rocketmq/tools/command/acl/DeleteAccessConfigSubCommand.java"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"d38e80a42d5f7908121f5e89c18b94147095490dfe4afd82822a63ae96deb83e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java:54-63 | tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateGlobalWhiteAddrSubCommand.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 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":"tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"71878d162ad451619f91fb68168de84f8d9d4d589e4a91cd28562ea10dee6c89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:408-419 | broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:608-618 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3111-3120 \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":408}}}],"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:204-213 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:235-244 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:262-271 \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: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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java"},"region":{"startLine":204}}}],"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:1843-1853 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1881-1890 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1899-1908 \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":1843}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d3d854fc60ca388112b5513181b0ca231c8b286a8c51e33812794edae4b18eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:351-360 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:745-755 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:158-168 \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/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. 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":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"69dda94edf7e0c2f4703519161f72ba698e553961211708e5084eada32390a27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): tools/src/main/java/org/apache/rocketmq/tools/command/acl/DeleteAccessConfigSubCommand.java:87-97 | tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java:161-170 | tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateGlobalWhiteAddrSubCommand.java:94-103 \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/acl/DeleteAccessConfigSubCommand.java:87\u0060 it begins part-way through the construct above it, so those exact 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/acl/DeleteAccessConfigSubCommand.java"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"abb9dd23c384cce342cc3c8d1fdb4ed2fab1bb9c049efb4fe6b7350b99437d96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): 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 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/CommitLogSetReadAheadSubCommand.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/broker/CommitLogSetReadAheadSubCommand.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b3a16eb8b23d8dc208f99e131dfd469479122081fe89791bda5de92bb0b8e7d"}},{"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 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.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 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/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 2): broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java:322-331 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:195-204 \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:322\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":322}}}],"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:276-285 | broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:333-342 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:276\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"da69e4e1cf1e629bdd0366c80942b2cbfcdd3b748bd44c6b14a2a6b39527f49a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:143-152 | broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:161-170 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:143\u0060 it begins part-way through the construct above it, so those exact 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":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"84f0156c2b0db7488e6e426c3f4d461c0df813ef2e9f3100880ee1aa35afd8c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1159-1168 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1957-1966 \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":1159}}}],"partialFingerprints":{"codehealthFindingId/v1":"10017b7d25f7be4fa3279c4eaba9d5f22da586cbacbe72f82db37355b5a012fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1793-1802 | container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java:296-305 \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:1793\u0060 it begins part-way through the construct above it, so those exact 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":1793}}}],"partialFingerprints":{"codehealthFindingId/v1":"3460af1225cc5de0cf83028a55f1dbeeea906df0c740c16ec4de9ecad02b2b06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:269-279 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:386-395 \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":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"c001210b8e7f46147ed5ebfbcb14d883b5e6e2bbc55df6f336155002bedf7124"}},{"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/BrokerStartup.java:225-234 | container/src/main/java/org/apache/rocketmq/container/BrokerContainerStartup.java:349-358 \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:225\u0060 it begins part-way through the construct above it, so those exact 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":225}}}],"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:420-430 | remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:471-480 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:420\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"5669e453ab6f70e0f4428ef6de7025f9274761b10d2a1c58d69138320816adde"}},{"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:188-197 \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:601-610 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:659-668 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:601\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":601}}}],"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/factory/MQClientInstance.java:624-634 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:702-711 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:624\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e517eb17ce4b2a71c1b2b2c415b3eaa0de918e66c465091e9c8e57c93858ccf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:660-669 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1300-1309 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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: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. 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":660}}}],"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:1597-1606 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1628-1637 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1597\u0060 it does not close everything it opens, so those exact 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":1597}}}],"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:1654-1663 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1698-1707 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1654\u0060 it does not close everything it opens, so those exact 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":1654}}}],"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:2888-2897 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3227-3236 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:2888\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":2888}}}],"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:224-233 | client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java:238-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 \u0060client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java:224\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":224}}}],"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/ConfigRocksDBStorage.java:137-147 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:94-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/src/main/java/org/apache/rocketmq/common/config/ConfigRocksDBStorage.java"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0311a27e5fb1e1bee27ecc8bddfe36b81ed49349474e7346cc6471df065f860"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): common/src/main/java/org/apache/rocketmq/common/config/ConfigRocksDBStorage.java:185-194 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:142-151 \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":"common/src/main/java/org/apache/rocketmq/common/config/ConfigRocksDBStorage.java"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"46f2f4390ae65bbffbc05088f044ef2f53026640b2b4e4b22126f8a4d1a364de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:351-360 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:406-415 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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: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. 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":351}}}],"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:836-845 \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:246-255 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:163-172 \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: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. 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":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d4dbf70993387a501214585b9d765de9073a5c7b5e28364a3ed3f105edaa935"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/queue/ConsumeQueueStore.java:462-471 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:1565-1574 \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/ConsumeQueueStore.java:462\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/ConsumeQueueStore.java"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"03674484d4d79bd21c5b04d0e00decc445f8950e3e0b4cadf5a0e31393d8d7d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1055-1064 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1216-1225 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1055\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":1055}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a0a5275bb503c3c24698fdebb5004255c8c76528092d3b2e5ec4d429982b71b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/DispatchRequest.java:96-105 | store/src/main/java/org/apache/rocketmq/store/DispatchRequest.java:112-121 \u2014 both copies are in the same file, so extract the block 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":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"29419216bc30b3e6fd31b26f1297e1726689e6872b5f48e5b88746334d512f37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredDispatcher.java:138-147 | tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredDispatcher.java:260-269 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredDispatcher.java:138\u0060 it begins part-way through the construct above it, so those exact 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":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredDispatcher.java"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"390448fd01f6b4fc56b89c276207b562fe144516ccfa3f9068ef7099cb333c1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/acl/ClusterAclConfigVersionListSubCommand.java:57-66 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerStatusSubCommand.java:53-62 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/acl/ClusterAclConfigVersionListSubCommand.java"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc646ced7f1951dfbd8dd167fb3d19ae6cc06f0d895c02dc321d92d65764f39d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/acl/DeleteAccessConfigSubCommand.java:98-107 | tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java:171-180 \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/acl/DeleteAccessConfigSubCommand.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":"tools/src/main/java/org/apache/rocketmq/tools/command/acl/DeleteAccessConfigSubCommand.java"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"923e426882e370ecce0b9560aa8838e9a9e6bf0f9884b7fc6dfc9d09b7393818"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommad.java:42-51 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByUniqueKeySubCommand.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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommad.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/BrokerConsumeStatsSubCommad.java"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4240b65da0ada4d4c164b56811246a7ac1ad7c66973d1c4e254521a73789fa6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 14): proxy/src/main/java/org/apache/rocketmq/proxy/ProxyStartup.java:152-160 | 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/GetBrokerEpochSubCommand.java:46-54 | 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:49-57 | tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetadataCommand.java:54-62 | 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 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.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 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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":"proxy/src/main/java/org/apache/rocketmq/proxy/ProxyStartup.java"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"71050b42e42099916682ff4044575e610f27ccddc4e9d97b5d27fbe4e9c5ec59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 13): 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/message/PrintMessageByQueueCommand.java:116-124 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByKeySubCommand.java:44-52 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByOffsetSubCommand.java:47-55 | 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:81-89 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/SkipAccumulationSubCommand.java:49-57 | tools/src/main/java/org/apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java:59-67 \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/controller/ReElectMasterSubCommand.java"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"776c0d1ba1d3abbf3f232745757715bac8026134dc85206c731149d63d4e9127"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 12): tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommad.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:70-78 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByIdSubCommand.java:194-202 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByUniqueKeySubCommand.java:149-157 | 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 12 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 12 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/src/main/java/org/apache/rocketmq/tools/command/broker/BrokerConsumeStatsSubCommad.java"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f0da01ff790b2db468c70ce35318942a0af7e13a8219b6e75ad728a97502e54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 11): example/src/main/java/org/apache/rocketmq/example/operation/Producer.java:74-82 | 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/message/PrintMessageByQueueCommand.java:118-126 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgByOffsetSubCommand.java:49-57 | 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:83-91 | tools/src/main/java/org/apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java:61-69 \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":"example/src/main/java/org/apache/rocketmq/example/operation/Producer.java"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"1832fb24ec3411746c655e1060d0c0049e32cdb1161dad834506afba5e32c63e"}},{"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:53-61 | 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:157-165 | 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 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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:211-219 | remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RpcClientImpl.java:257-265 | remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RpcClientImpl.java:295-303 | remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RpcClientImpl.java:316-324 | remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RpcClientImpl.java:337-345 \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:211\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The 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":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"77d02ec0d594bccb234d4cc808657601d54772c71dfc2eb4c4095731e2535208"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): 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/GetBrokerConfigCommand.java:53-61 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetColdDataFlowCtrInfoSubCommand.java:55-63 | 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":"dfba75d34fd90514262515eb5c3e4732aeacc788691f536670c1867da4a242ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:409-417 | store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:538-546 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:924-932 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1092-1100 \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":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"a677cb2add6c6473be10395d060ef327a020c2e3bea2b3e4fc75ce937ccdabff"}},{"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":"35f715305bff70965c2a76b5637158968f8ab34bc3617878ce8865d74c2022cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): 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/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 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":"example/src/main/java/org/apache/rocketmq/example/filter/SqlFilterConsumer.java"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a2ee8307d5a1a31e49547e59354a9d32f5c35dbef34fed93117749a284bbc5d"}},{"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/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: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. 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":"81c42cb327b9a2dd547dca170fcd6ab9146d8b1dd6fec09210002341e0a38b76"}},{"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:99-107 | 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): broker/src/main/java/org/apache/rocketmq/broker/offset/LmqConsumerOffsetManager.java:58-66 | broker/src/main/java/org/apache/rocketmq/broker/offset/RocksDBLmqConsumerOffsetManager.java:53-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 \u0060broker/src/main/java/org/apache/rocketmq/broker/offset/LmqConsumerOffsetManager.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. 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/LmqConsumerOffsetManager.java"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c22355d043395ea52f24b1ca163d24afa6ae5c2bd9699f26789f71bbe52bfe3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:838-847 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2823-2831 \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":838}}}],"partialFingerprints":{"codehealthFindingId/v1":"85ec96af551e27e50c79045ab0c30a1b973d903e1ede6d7eca79a0e38fdd0cdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:421-429 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:487-495 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:421\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"287e0b39fc1851d97cbc2269ab867bc36637e97376fa94a6e95f25f67231d1e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:975-983 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1766-1774 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:975\u0060 it begins part-way through the construct above it, so those exact 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":975}}}],"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:1709-1719 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2349-2357 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1709\u0060 it begins part-way through the construct above it, so those exact 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":1709}}}],"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/ClientManageProcessor.java:135-145 | broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java:192-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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d21b0c5ccfb2d671120fc75c093167c0136f10e7d8199293b7ae47532c3de49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:149-157 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:195-203 \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:149\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c74fe6b36ab5ad8063d116a05c34a3df7a12b46fa1d0cc5e9e289fb7c579fd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:288-296 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:396-404 \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:288\u0060 it does not close everything it opens, so those exact 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":288}}}],"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/NotificationProcessor.java:127-135 | broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java:155-163 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/NotificationProcessor.java:127\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dbb1676a844b96b982cb63fce4fe4ae213e6b0d55339f7c51459c6def684bd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:651-659 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:690-698 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:651\u0060 it begins part-way through the construct above it, so those exact 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/PopBufferMergeService.java"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"4577b269db1d1bdaa9deba464a494fadfe415a6d8eb1a123455d16827a28af9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java:309-317 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:307-315 \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":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"faf24e2dbcecf6e75ae5739f553624d7c73304f02505e74c4de0980ea89865b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/slave/SlaveSynchronize.java:89-97 | broker/src/main/java/org/apache/rocketmq/broker/slave/SlaveSynchronize.java:108-116 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/slave/SlaveSynchronize.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/slave/SlaveSynchronize.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2e5d1ba90e0a8f8107c23c4112410a5631d1cc48aa15f9aaef5bd085513103c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java:154-162 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:507-515 \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: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. 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/subscription/SubscriptionGroupManager.java"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"28d860c2b94b4d27c9ca9a9752d7d1f449fcd4b0b0d82201ea3b90c5babf4470"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java:196-204 | container/src/main/java/org/apache/rocketmq/container/BrokerContainerStartup.java:318-326 \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: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/BrokerStartup.java"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a6b3f1378a90fdd098dab0b55a8eaec1ae4af658eef65c4054e8f4e7efd0173"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java:266-274 | tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetadataCommand.java:63-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":"broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f40cc7f3ad5f6d9ee6837cd21c47fd777ecdaeb187b669ab306fed41f756eb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:126-134 | client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:154-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 \u0060client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:126\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"f37983ab531fc264e15ee61d2dbf55512c50e054cd793a57982ee2a73f531eba"}},{"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:519-527 \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:526-534 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:550-558 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:526\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":526}}}],"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:746-754 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:787-795 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:746\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":746}}}],"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:102-110 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:193-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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java"},"region":{"startLine":102}}}],"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:221-229 \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:1040-1048 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:1085-1093 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1040\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":1040}}}],"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:960-968 | proxy/src/main/java/org/apache/rocketmq/proxy/processor/ProducerProcessor.java:187-195 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. 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:960\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":960}}}],"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:197-205 | common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java:211-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 \u0060common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java:197\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":197}}}],"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): proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:117-125 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:208-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: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. 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":117}}}],"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:152-160 \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/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:943-952 \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:385-393 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:414-422 \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:385\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":385}}}],"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:689-698 | 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:689\u0060 it does not close everything it opens, so those exact 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":689}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6e5125ded905fb3145976f6631e2e83c5744910bfd7e8c15d6df7c2d908f38e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/queue/SparseConsumeQueue.java:55-63 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:322-331 \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/SparseConsumeQueue.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":"store/src/main/java/org/apache/rocketmq/store/queue/SparseConsumeQueue.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"f62b9b768e690e47ef0d303e270bfb045ca385b334e7590a301c4eb53812c493"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:653-661 | store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:670-678 \u2014 both copies are in the same file, so extract the block 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":653}}}],"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:1657-1665 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1769-1777 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1657\u0060 it begins part-way through the construct above it, so those exact 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":1657}}}],"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:2338-2346 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:2360-2368 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:2338\u0060 it begins part-way through the construct above it, so those exact 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":2338}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7692389f76cf2371f7cf671f1c7f8da72d05e4c48fd880e522be52c545a25bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:2819-2827 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:3110-3118 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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: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. 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":2819}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b9857ac617a6eef8eb84cf2c8b595129f6738a34bf9a0ad4c6bea8a18792f5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java:528-536 | store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java:571-579 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:528\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":528}}}],"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:377-385 \u2014 both copies are in the same file, so extract the block 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): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:360-368 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1147-1155 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:360\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":360}}}],"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:1445-1453 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1476-1484 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1445\u0060 it begins part-way through the construct above it, so those exact 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":1445}}}],"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/acl/UpdateGlobalWhiteAddrSubCommand.java:106-115 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java:158-166 \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/acl/UpdateGlobalWhiteAddrSubCommand.java:106\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/acl/UpdateGlobalWhiteAddrSubCommand.java"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce09cfcd089a2a07715f5d5edf650b3ae41942d5106296a56a8e3b96069af2ff"}},{"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:59-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."},"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/UpdateSubGroupSubCommand.java:199-207 | tools/src/main/java/org/apache/rocketmq/tools/command/topic/UpdateTopicSubCommand.java:162-171 \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":"bb4eeeb2ad559cdec56d0f4c8c7b9f297383c32c6510d519f61524b723bbd30f"}},{"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:62-70 | 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":62}}}],"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/export/ExportMetadataInRocksDBCommand.java:53-61 | tools/src/main/java/org/apache/rocketmq/tools/command/metadata/RocksDBConfigToJsonCommand.java:50-58 \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/ExportMetadataInRocksDBCommand.java"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad97c1dbd0eb27262f74578f704e0b76e28ee9e02e799f4514954ecd09a8d638"}},{"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:123-131 \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/metadata/RocksDBConfigToJsonCommand.java:85-93 | tools/src/main/java/org/apache/rocketmq/tools/command/metadata/RocksDBConfigToJsonCommand.java:103-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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/metadata/RocksDBConfigToJsonCommand.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":"tools/src/main/java/org/apache/rocketmq/tools/command/metadata/RocksDBConfigToJsonCommand.java"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f19a2013351c0c31afb212ee20eefa1fc7f722de6b589301f7a09cada6b03e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java:165-173 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/SkipAccumulationSubCommand.java:117-125 \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: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":"tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java"},"region":{"startLine":165}}}],"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 4): client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java:194-201 | client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java:213-220 | client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java:231-238 | client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java:249-256 \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:194\u0060 it does not close everything it opens, so those exact 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":194}}}],"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/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.java:71-78 | 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:200-210 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.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 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/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":"e416d88e06f646c521dfcf85538958934891026a190af0b31f93916a864c7009"}},{"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): store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:225-232 | store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:394-402 | 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:225\u0060 it does not close everything it opens, so those exact 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":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"d16e44a1ce2f3aab8ebb23e7bdb53088e5aab48c76e873c193451caf2b8c049e"}},{"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:139-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. 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/failover/EscapeBridge.java:95-102 | broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:210-217 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:95\u0060 it does not close everything it opens, so those exact 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/failover/EscapeBridge.java"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec046779657e74e6339430ef6b9e1bf2a6d1388a0925ee5f9a1bd8a4de452648"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:103-110 | broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:236-243 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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: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":"broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fea443f2e0d0b5bdb97fac023ba51b4f66c1f44f6abfb89650c27d159eb3776"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:322-329 | broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:377-384 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aafd72be89b80244b437def516c5233ce13f8531fbbea530ca06cee74328d06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:78-85 | broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:94-101 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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: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":"broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"60ab51d099fdeb975ed9fa8b7788a51d4d7d66ba0ea5bea93e42e9cc2186ae5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:361-368 | broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1350-1357 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:361\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"050f08de1e94b1f890e4a0b22d09368038de6410f167823eccc120829b5e81bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1091-1098 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:788-795 \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:1091\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":1091}}}],"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:1129-1137 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1983-1990 \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:1129\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":1129}}}],"partialFingerprints":{"codehealthFindingId/v1":"134edd3f12d56f842f4af2aa8594f3be0ad3127aecb95f054d1ceccd90c48e68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1680-1690 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2332-2339 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:2332\u0060 it does not close everything it opens, so those exact 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":1680}}}],"partialFingerprints":{"codehealthFindingId/v1":"be58809a0edb4704bbd949c7dfaac15d1d889a0deec4957d607365164a7cca50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:116-123 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:179-186 \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: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. 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":116}}}],"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/NotificationProcessor.java:190-197 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:264-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 \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java:190\u0060 it does not close everything it opens, so those exact 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/NotificationProcessor.java"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"294b8b5514c2e5738f19b321d9832253318bd04eae83ea3938674ef4ccb8fe71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:190-197 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:453-460 \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: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":"9be7a195cf86bcf44876662624500b201590c06a8bb9a2c50cc2e42da58e2bc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:373-380 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:398-405 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:373\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":373}}}],"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:674-681 \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): broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:328-335 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:611-618 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"93f3ccc371079338d4e47083ae70f6d218650b6868a5f8fb5bb63e181df63ce2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java:333-340 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:573-580 \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:333\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"576cc1eed2498d6d14317726522ee0f0df643f83207f467abf2afcc059e17fc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:203-210 | remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:319-327 \u2014 both copies are in the same file, so extract the block 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":203}}}],"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:325-332 \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:174-182 | client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:179-186 \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:174\u0060 it begins part-way through the construct above it, so those exact 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":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f51274b972e3c60c9334b9cfa077270c7765927cb4ce76f8a40441147a94fbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:292-299 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.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. 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: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. 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":292}}}],"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:391-398 | 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:391\u0060 it begins part-way through the construct above it, so those exact 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":391}}}],"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:362-369 \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/factory/MQClientInstance.java:588-596 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:639-646 \u2014 both copies are in the same file, so extract the block 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":"client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"33a1ce765ab33cc2b7eb636dbf05eadebb206ceac9558624332d4bc74987f607"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): controller/src/main/java/org/apache/rocketmq/controller/ControllerStartup.java:150-158 | namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvStartup.java:226-233 \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":150}}}],"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/grpc/v2/route/RouteActivity.java:264-271 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java:273-280 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/route/RouteActivity.java:264\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"999952549f2607cb0bd854c574c1392ea6ece686fc87a2c6d990237e55fb0957"}},{"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/queue/SparseConsumeQueue.java:320-327 | store/src/main/java/org/apache/rocketmq/store/queue/SparseConsumeQueue.java:344-351 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:320\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":320}}}],"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:45-52 \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:99-106 | store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java:116-123 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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: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":"store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java"},"region":{"startLine":99}}}],"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:797-804 | store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java:824-831 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:797\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":797}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c02ed4ab13684d10b36a083d19f52c1a1b322782e6ec8e0c923c8a674325001"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tieredstore/src/main/java/org/apache/rocketmq/tieredstore/metrics/TieredStoreMetricsManager.java:177-184 | tieredstore/src/main/java/org/apache/rocketmq/tieredstore/metrics/TieredStoreMetricsManager.java:207-214 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tieredstore/src/main/java/org/apache/rocketmq/tieredstore/metrics/TieredStoreMetricsManager.java:177\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"c762a6d24c43b133f89b94992e6b901ca1dd0dfca9c24e7ae4263e616bb84d14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1372-1379 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1382-1389 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1372\u0060 it begins part-way through the construct above it, so those exact 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":1372}}}],"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/acl/UpdateAccessConfigSubCommand.java:131-138 | tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java:143-150 \u2014 both copies are in the same file, so extract the block 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/command/acl/UpdateAccessConfigSubCommand.java"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"30ac657b1aada7034da53fea8ee6f936cf111073bc96d325d7b2cc0722a41cae"}},{"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:67-77 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetColdDataFlowCtrInfoSubCommand.java:69-76 \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: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/broker/GetBrokerConfigCommand.java"},"region":{"startLine":67}}}],"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 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/cluster/ClusterListSubCommand.java:50-57 | 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 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/cluster/ClusterListSubCommand.java"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cf10bed628921b10054fc179f36b76bfbb70fcca1348ebaca3f6189f0c5e51f"}},{"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:80-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/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/message/QueryMsgByKeySubCommand.java:77-84 | tools/src/main/java/org/apache/rocketmq/tools/command/message/QueryMsgTraceByIdSubCommand.java:95-102 \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:77\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bd76a17e5045944c597014b3461fcc55fbb911327cae47a50c8b312d94e251f"}},{"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 9): proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:205-211 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:223-229 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:241-247 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:260-266 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:295-301 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:314-320 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:332-338 | 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:370-376 \u2014 all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/GrpcMessagingApplication.java:205\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"5caed5944fd703eb874d584436efb6b3d943967a31968e18f5e5836cf57dc332"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2463-2469 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2655-2661 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2685-2691 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2714-2720 \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:2463\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":2463}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d6af309e771d669c4399e9626fd6eb68d2c2e511f60629f623a5fe9634aaaf2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): tools/src/main/java/org/apache/rocketmq/tools/command/container/AddBrokerSubCommand.java:55-61 | 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 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/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":"e6bbafe13fdb3eca6c091aa4c8fecb5b0e06f2756eaae38deeac75b6ec141e9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/coldctr/ColdDataCgCtrService.java:90-96 | broker/src/main/java/org/apache/rocketmq/broker/coldctr/ColdDataPullRequestHoldService.java:73-79 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:2283-2289 \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/coldctr/ColdDataCgCtrService.java:90\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac3183d4d0286967285820c5ef5396535fe1cf274e47688719fe185ca9f1c0b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:796-802 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:835-841 | container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java:240-247 \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:796\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":796}}}],"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/AdminBrokerProcessor.java:1448-1454 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1736-1742 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1792-1798 \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:1448\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":1448}}}],"partialFingerprints":{"codehealthFindingId/v1":"6476dfb0164046c75c97110f0dd7bfa57ef038044e372f4be2d9a3625225da47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/processor/ConsumerManageProcessor.java:115-121 | broker/src/main/java/org/apache/rocketmq/broker/processor/ConsumerManageProcessor.java:206-212 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingManager.java:242-248 \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/ConsumerManageProcessor.java:115\u0060 it does not close everything it opens, so those exact 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/ConsumerManageProcessor.java"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"b18dd4cf90eaf8284823b1247fede3ff2a2b0d5ffd8e910feba3bddff67d6f6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1564-1570 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1622-1628 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1692-1698 \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":1564}}}],"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): store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:446-452 | store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:468-474 | store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:479-485 \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":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"9159e2ed5aed03124a685a3352f699100edf299501606cc51e6c897282ad4063"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): tools/src/main/java/org/apache/rocketmq/tools/command/acl/DeleteAccessConfigSubCommand.java:72-80 | 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 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/acl/DeleteAccessConfigSubCommand.java:72\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/acl/DeleteAccessConfigSubCommand.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bac3222b06c1c7f9859944d5f06ba0b0f825b147d994b9f84f2360326638bb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): acl/src/main/java/org/apache/rocketmq/acl/plain/PlainAccessResource.java:123-129 | acl/src/main/java/org/apache/rocketmq/acl/plain/PlainAccessResource.java:132-138 \u2014 both copies are in the same file, so extract the block 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":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainAccessResource.java"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"282f6ab984375d41d36b783d7b5fda293444c76a8b70dde8b79f7c599e670b4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/metrics/PopMetricsManager.java:72-78 | remoting/src/main/java/org/apache/rocketmq/remoting/metrics/RemotingMetricsManager.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/metrics/PopMetricsManager.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/metrics/PopMetricsManager.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"c106d7d0997012c48e46960a5ead703e60678b53bfe772d72374f44a1c70a9ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1451-1457 | 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:1451\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":1451}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aef307ed3e7fcf0f8583e48e857ff0eac444d7383c14f1e2506ab8bcc6b4cf0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:129-136 | broker/src/main/java/org/apache/rocketmq/broker/processor/ChangeInvisibleTimeProcessor.java:85-91 \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:129\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"9992b6f87e9d729ac3f299bb6c9c752e79686577be9af49dd7488a4ef46f9bd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:605-611 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:639-645 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:605\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"52b13fba955b7546f1aae306cdf4456378413768ac9d4ba53197785f2eeaf760"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1501-1507 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2018-2024 \u2014 both copies are in the same file, so extract the block 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":1501}}}],"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:2636-2642 | broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/DefaultTransactionalMessageCheckListener.java:74-80 \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:2636\u0060 it begins part-way through the construct above it, so those exact 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":2636}}}],"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:129-135 | broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:154-160 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:129\u0060 it does not close everything it opens, so those exact 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":129}}}],"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:159-165 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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:792-798 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:806-812 \u2014 both copies are in the same file, so extract the block 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":792}}}],"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/PopReviveService.java:208-214 | 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:208\u0060 it does not close everything it opens, so those exact 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":208}}}],"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:224-230 | broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageBridge.java:152-158 \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:224\u0060 it begins part-way through the construct above it, so those exact 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":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"25ad8ed7589c8d8484da33ec75c473a6ee4afe8e0bfc55f39077e81a551ab76e"}},{"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:154-161 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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":"8c29fecbc3668af979028a5cb4377f70684fee9a22896fb260880a7a0631dd4a"}},{"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:480-486 \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/schedule/ScheduleMessageService.java:338-344 | store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:1129-1135 \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":338}}}],"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:1660-1666 | container/src/main/java/org/apache/rocketmq/container/InnerBrokerController.java:83-89 \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:1660\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":1660}}}],"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:2125-2131 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:2137-2143 \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:2125\u0060 it does not close everything it opens, so those exact 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":2125}}}],"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/MQPullConsumerScheduleService.java:65-71 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:230-236 \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:432-438 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java:586-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/consumer/DefaultMQPushConsumerImpl.java:432\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/DefaultMQPushConsumerImpl.java"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f3b5987b13ec5b420863df2cda7cf157b19babbbb645ca86547f268d5471888"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java:792-799 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java:841-847 \u2014 both copies are in the same file, so extract the block 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":792}}}],"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:480-486 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:600-606 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:480\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":480}}}],"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:388-394 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3049-3055 \u2014 both copies are in the same file, so extract the block 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":388}}}],"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:889-895 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:381-387 \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:889\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":889}}}],"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:2918-2924 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3201-3207 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:2918\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":2918}}}],"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/UtilAll.java:172-178 | common/src/main/java/org/apache/rocketmq/common/UtilAll.java:184-190 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4c10b145a17a484331f66fd46988af192873c03897a2b59a4e5b4c08d2446b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): proxy/src/main/java/org/apache/rocketmq/proxy/common/ReceiptHandleGroup.java:172-178 | proxy/src/main/java/org/apache/rocketmq/proxy/common/ReceiptHandleGroup.java:196-202 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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:172\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":172}}}],"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:283-289 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/client/ClientActivity.java:299-305 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:299\u0060 it does not close everything it opens, so those exact 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":283}}}],"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:109-115 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:200-206 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:109\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":109}}}],"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): proxy/src/main/java/org/apache/rocketmq/proxy/service/route/ClusterTopicRouteService.java:43-49 | proxy/src/main/java/org/apache/rocketmq/proxy/service/route/LocalTopicRouteService.java:66-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 \u0060proxy/src/main/java/org/apache/rocketmq/proxy/service/route/ClusterTopicRouteService.java:43\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"proxy/src/main/java/org/apache/rocketmq/proxy/service/route/ClusterTopicRouteService.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"af259e24994fadc6db2b1dd3e6f3b21cec4aa51b677cd342aac69aa647ad0033"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:524-530 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1083-1089 \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:524\u0060 it does not close everything it opens, so those exact 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":524}}}],"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:380-386 | store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAService.java:219-225 \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: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":"store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java"},"region":{"startLine":380}}}],"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:397-403 | store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAService.java:236-242 \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:397\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":397}}}],"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:115-122 | store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java:204-210 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:115\u0060 it does not close everything it opens, so those exact 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":115}}}],"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:783-789 | store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:812-818 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:783\u0060 it begins part-way through the construct above it, so those exact 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":783}}}],"partialFingerprints":{"codehealthFindingId/v1":"36aa4b8a0fd3a27b35414c6e021fa861688e418f92cf3a6463115cd1306ec033"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:2539-2545 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:2555-2561 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:2539\u0060 it begins part-way through the construct above it, so those exact 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":2539}}}],"partialFingerprints":{"codehealthFindingId/v1":"73c0e0eebe67c7428c1231b91b325a512774a178290b747f4d2a89740630d0b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredDispatcher.java:178-184 | tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredDispatcher.java:344-350 \u2014 both copies are in the same file, so extract the block 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/TieredDispatcher.java"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"852a2d49c34797398b87c8c78f761a4bf0d280b102115e0fe133a5136226df1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:420-426 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:507-513 \u2014 both copies are in the same file, so extract the block 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":420}}}],"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:979-985 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1733-1739 \u2014 both copies are in the same file, so extract the block 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":979}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e4c80ad3421ad281c875ed3a3f33c29d5e187665bcb0372804967a809ac9012"}},{"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:137-144 \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":"d81f5605aed3c888f39ce8d426dc8c72e1883f530933f500a6154b69518e3cf6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2012-2017 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2463-2468 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2655-2660 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2685-2690 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2714-2719 \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:2012\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":2012}}}],"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:2490-2495 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2568-2573 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2600-2605 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2771-2776 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2800-2805 \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:2490\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":2490}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cb7e9823794038e8f8b61dd3208a2c86779797e542196f9bb6eab2c8bcf29ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java:300-305 | proxy/src/main/java/org/apache/rocketmq/proxy/config/ProxyConfig.java:296-301 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:298-303 \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":300}}}],"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:1344-1349 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2332-2337 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2635-2640 \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:1344\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":1344}}}],"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:2840-2845 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3028-3033 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3090-3095 \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:2840\u0060 it does not close everything it opens, so those exact 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":2840}}}],"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:1050-1055 | namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:1071-1076 | namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:1092-1097 \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:1050\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":1050}}}],"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:711-716 | store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:802-807 | 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:711\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":711}}}],"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/acl/ClusterAclConfigVersionListSubCommand.java:83-92 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.java:70-75 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/UpdateColdDataFlowCtrGroupConfigSubCommand.java:80-85 \u2014 before extracting anything, compare \u0060tools/src/main/java/org/apache/rocketmq/tools/command/broker/RemoveColdDataFlowCtrGroupConfigSubCommand.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 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/acl/ClusterAclConfigVersionListSubCommand.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. 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/acl/ClusterAclConfigVersionListSubCommand.java"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"d416d9f907b42b85064fdeaaee68b37aca53d69d0c6b674b32128ba7259a22bb"}},{"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:85-90 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java:101-106 \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): acl/src/main/java/org/apache/rocketmq/acl/common/AclSigner.java:49-54 | acl/src/main/java/org/apache/rocketmq/acl/common/AclSigner.java:82-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 \u0060acl/src/main/java/org/apache/rocketmq/acl/common/AclSigner.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":"acl/src/main/java/org/apache/rocketmq/acl/common/AclSigner.java"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"64dd515cf0c96d1691cb1464bb48c1cf333951227388b7e76ad80e7320180a40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java:141-146 | acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java:221-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3799e52524e690a20d35d6822287861c03df7e75631cd51b86995ae05f7fc4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): acl/src/main/java/org/apache/rocketmq/acl/plain/RemoteAddressStrategyFactory.java:186-192 | acl/src/main/java/org/apache/rocketmq/acl/plain/RemoteAddressStrategyFactory.java:208-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 \u0060acl/src/main/java/org/apache/rocketmq/acl/plain/RemoteAddressStrategyFactory.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. 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":"acl/src/main/java/org/apache/rocketmq/acl/plain/RemoteAddressStrategyFactory.java"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc6cba4a9df91b735a7de7b69fdba04856a628ac0883870fcb1ab252b898d7a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:163-168 | broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:212-217 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:163\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"457598c0a23335d4748e6da4eb43a72d51c5d28f07c96c7317abbb97259ae73c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:298-303 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:271-276 \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:298\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":298}}}],"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:257-262 | broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:296-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 \u0060broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.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. 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":257}}}],"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:182-187 | broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:192-197 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:182\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":182}}}],"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:1208-1213 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3144-3149 \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":1208}}}],"partialFingerprints":{"codehealthFindingId/v1":"99e47eb82b8c70cd5ae0aa8e2ff972c09f3170a18a285f67c04f9cb7fc9c603e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:437-442 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:507-512 \u2014 both copies are in the same file, so extract the block 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":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"72a2223f2a3dd6375b516d879f8b5917c0222da6669659e336c79a77c16a9006"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/ChangeInvisibleTimeProcessor.java:219-224 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:710-715 \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":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b88c4ade1b026a69670617b2eac2788bdbe8f5a9264bc4a79fba5e7ef2e89a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java:68-73 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:199-204 \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/NotificationProcessor.java"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfaa4b14e7e4dfb22489927fd67e5aeff96b0c1dcdaa9d7838b3740614f228c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:630-635 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:670-675 \u2014 both copies are in the same file, so extract the block 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":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e0606f7c17cc33767df78b63f71a2bdba250fdf2f41238b0a7eb3d5cd428974"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:363-368 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:398-403 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:363\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b594cf6a5acdca3db4fe89b1202677bf77460cecdc014b53c14239c01829bae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:373-378 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:408-413 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:373\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"0746d8fea075012292272042d309e68e3df3292db19b2831dbc19e4e16c627b9"}},{"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:456-461 \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":"c56f6827ae5844ae73e6118a173a688f565477ba596779a69be41f9f16a89021"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/subscription/RocksDBSubscriptionGroupManager.java:55-60 | broker/src/main/java/org/apache/rocketmq/broker/topic/RocksDBTopicConfigManager.java:68-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060broker/src/main/java/org/apache/rocketmq/broker/subscription/RocksDBSubscriptionGroupManager.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. 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/subscription/RocksDBSubscriptionGroupManager.java"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"356d0c9be0a54aa8c290a0f2048cd44267138e25cb1fce30711aae8f825c7d15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingServer.java:795-800 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/ProxyAndTlsProtocolNegotiator.java:194-199 \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/NettyRemotingServer.java:795\u0060 it does not close everything it opens, so those exact 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/NettyRemotingServer.java"},"region":{"startLine":795}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bfdc8d777883d66bfe86a4e6eb0b739a650e4a05319d09205a406da51e1d033"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:111-116 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:121-128 \u2014 both copies are in the same file, so extract the block 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":"remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ab7ffc9d3d89266b7aa340807be36a57e505be1a0afc89461d8780b991ed615"}},{"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/client/impl/consumer/ConsumeMessageOrderlyService.java:378-383 | 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:378\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":378}}}],"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:393-398 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java:1371-1377 \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: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java"},"region":{"startLine":393}}}],"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:165-170 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.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 \u0060client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:165\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":165}}}],"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:606-611 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:639-645 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:606\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":606}}}],"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/producer/TopicPublishInfo.java:80-86 | proxy/src/main/java/org/apache/rocketmq/proxy/service/route/MessageQueueSelector.java:203-208 \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/TopicPublishInfo.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":"client/src/main/java/org/apache/rocketmq/client/impl/producer/TopicPublishInfo.java"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf944750e33ac89430bcecae2d96cb0203d9688e4ee7c399d0d19fabafadd8ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1123-1128 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:266-271 \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:1123\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":1123}}}],"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:1161-1166 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:280-285 \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:1161\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":1161}}}],"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:1216-1221 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:258-263 \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:1216\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":1216}}}],"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:1475-1480 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1496-1501 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1475\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":1475}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dad61af8101c03c87de6e8a5c12e5b6451c715c1c0ec884c104143e584b166f"}},{"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/metrics/ControllerMetricsManager.java:298-303 | controller/src/main/java/org/apache/rocketmq/controller/metrics/ControllerMetricsManager.java:333-338 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:298\u0060 it does not close everything it opens, so those exact 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":298}}}],"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:429-434 | proxy/src/main/java/org/apache/rocketmq/proxy/processor/ConsumerProcessor.java:452-457 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060proxy/src/main/java/org/apache/rocketmq/proxy/processor/ConsumerProcessor.java:429\u0060 it begins part-way through the construct above it, so those exact 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":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5c3d130f363c41cc6845d262d9fa00c28c76ec65745b2db03f95e84cd97823d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:690-695 | store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:703-708 \u2014 both copies are in the same file, so extract the block 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":690}}}],"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:62-68 | store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java:79-84 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:62\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java"},"region":{"startLine":62}}}],"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:320-325 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:694-699 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:320\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9fd6d1eb08ab897e1e8ad54fd38493d87bfa7d372959952b69f09d087d26c60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1856-1861 | 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:1856\u0060 it does not close everything it opens, so those exact 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":1856}}}],"partialFingerprints":{"codehealthFindingId/v1":"c074e66f23c91968b3ae749e5348fde65e4e07c2e300cc66d25e6eef56b91253"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/GetMessageResult.java:114-119 | store/src/main/java/org/apache/rocketmq/store/GetMessageResult.java:123-128 \u2014 both copies are in the same file, so extract the block 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":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b3cc9c1578f1b76764266888b6f64a58cfb0e413306be760a4b2634e0ef4d23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tieredstore/src/main/java/org/apache/rocketmq/tieredstore/provider/posix/PosixFileSegment.java:176-181 | tieredstore/src/main/java/org/apache/rocketmq/tieredstore/provider/posix/PosixFileSegment.java:222-228 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tieredstore/src/main/java/org/apache/rocketmq/tieredstore/provider/posix/PosixFileSegment.java"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"c57d1c9c8e2952b049f9b713f6cdfec916d5aee852bfe9d1cd9256496112d374"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:616-621 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:653-658 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:616\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":616}}}],"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:767-772 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1873-1878 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:767\u0060 it does not close everything it opens, so those exact 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":767}}}],"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:1348-1353 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1440-1445 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1348\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":1348}}}],"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/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:75-80 | 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:86-90 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java:102-106 \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:75\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"40c4331566eb65b2501861b934a54073407e21fc5bec1b07d763dd9f307f7210"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:293-297 | controller/src/main/java/org/apache/rocketmq/controller/metrics/ControllerMetricsManager.java:330-334 | 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: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":"broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"03fd275ffb84443e533ebe4bef5d2d712024096b140fdbf39045b49a28526fb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:105-109 | broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:141-145 | broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:159-163 \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:105\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"4495a794c44e2aedd0c46274da28e6b75ca0151dbd52585ac337fbf63505fd16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java:216-220 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2628-2632 | broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/DefaultTransactionalMessageCheckListener.java:66-70 \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/processor/AbstractSendMessageProcessor.java"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdc8f81dad1f613a05718db86a5d3ecc8145434d6058e020fd2e5b851fee0791"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/processor/ChangeInvisibleTimeProcessor.java:108-112 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:603-607 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:648-652 \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/ChangeInvisibleTimeProcessor.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. 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/ChangeInvisibleTimeProcessor.java"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"430293fb62e7ff07af9e0cccb52343019eb9ebb5ddc9adf75bf5f37b3020c25a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): broker/src/main/java/org/apache/rocketmq/broker/processor/ChangeInvisibleTimeProcessor.java:193-197 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:687-691 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:719-723 \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/ChangeInvisibleTimeProcessor.java:193\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/ChangeInvisibleTimeProcessor.java"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"bec0eaa961d20a0560276b91734c4bc0ee2d610fd70f125787e83922de436932"}},{"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:79-88 | tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetColdDataFlowCtrInfoSubCommand.java:77-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. 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 3): tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetadataInRocksDBCommand.java:109-113 | tools/src/main/java/org/apache/rocketmq/tools/command/metadata/RocksDBConfigToJsonCommand.java:81-85 | tools/src/main/java/org/apache/rocketmq/tools/command/metadata/RocksDBConfigToJsonCommand.java:99-103 \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 \u0060tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetadataInRocksDBCommand.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. 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/export/ExportMetadataInRocksDBCommand.java"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"a641f5c67e8d46cb489c8eeb60f270c75c000eee821ac5b79be4c608c74a0373"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java:170-174 | acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java:253-257 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java:170\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"7379b5b9a6598b296d0b6ceb531253a4244a4451f356e6e47a80119c0a7362b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:270-274 | broker/src/main/java/org/apache/rocketmq/broker/processor/ChangeInvisibleTimeProcessor.java:191-195 \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:270\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"46863e79759ec110f42ffa2900e251ff65fff12a2b413637af5357a0f2c50784"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:124-128 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:246-250 \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/DefaultPullMessageResultHandler.java"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"a194b3073ad488eb4c4ab33aa7c68b238222832f8f5a6df479645c72b2ba344d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:639-643 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:679-683 \u2014 both copies are in the same file, so extract the block 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":639}}}],"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:292-296 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:575-579 \u2014 both copies are in the same file, so extract the block 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":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e878d1bc3a411ba61df4ec1104fff9e148bed07bb1b1202a7c981b34f76564a"}},{"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:1033-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 \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/consumer/DefaultMQPullConsumerImpl.java:632-636 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java:768-773 \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/DefaultMQPullConsumerImpl.java"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"280657749cc4c0006e17e45ceaf329a20438d0e02c8facb0cedcab446f375d7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1112-1116 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:247-251 \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":1112}}}],"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:2970-2976 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3012-3016 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:2970\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":2970}}}],"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): 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:187-191 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/producer/SendMessageActivity.java:353-357 \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: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":"proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/AckMessageActivity.java"},"region":{"startLine":187}}}],"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:388-392 | store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAService.java:227-231 \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:388\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":388}}}],"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:776-780 | store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:805-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/logfile/DefaultMappedFile.java:776\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fb41fecf58c2a114f565ca1101d3560a5569e09c7ec9ff02602ec1e7568627c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:1609-1613 | store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:1644-1648 \u2014 both copies are in the same file, so extract the block 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":1609}}}],"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:173-177 | store/src/main/java/org/apache/rocketmq/store/timer/TimerWheel.java:197-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 \u0060store/src/main/java/org/apache/rocketmq/store/timer/TimerWheel.java:173\u0060 it does not close everything it opens, so those exact 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":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee91a411dc85d90d6322e2346924cc99b2738acd75cbb578df8e7dee2bc135bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1395-1399 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1486-1490 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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:1395\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":1395}}}],"partialFingerprints":{"codehealthFindingId/v1":"db92d74a64f501a305694d94d567ed890cd20ec07e3b7d46538366144b582412"}},{"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":"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":"009f6002a122f0081b0cd87893714fd8035600cb68582365a69a15a004740977"},"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":"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":"47bd2bb16b6ace1c849e94ec8bc7f595cf4044ca3e3862299b2c419b1db32767"},"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":"3744ebc09d8e5f82bb4d5f2a79781bd39dc05f6142f83eeb18b69550528159f8"},"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":"94b9afae6df6e1a32790325d254e70a14da55ddc16c19630cc1065bea231b287"},"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":"939fcf68c6e057cdf5da15cf801a9c5cfa161a2a3f92922294a1dc4541589b20"},"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":"cec4d0f5332a11ec39844fcfbe7d2d9845a683993bb40e8376b801c8b49c2fb6"},"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":"da7ee5f7b02f126efe28cbac93dc1c87d791aaab4b7f908cb0b23c8cef8278d4"},"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":"e8dc462db1e68dbbde80435186f399bca072dfbabe5883062abc51ab5bd6c228"},"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":"f496f1a0a8df467ded523de7e66b35ffd19d25b97e29bf9b33d2a53152b12b51"},"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":"8b1b96f68ecfa32dd5f658ebcbd49f8a56c8831ddb1064c8da4935ac84d0829c"},"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":"88ee728bab46fd0fa565cf36a6d266ada5076c5b8eb8e444bc8a08b66632a5eb"},"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":"a163c4744dc0573ff3c7f9088df695a855549fe5cd0f1f0378024b255b3e4aee"},"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":"b1c15c8f6d64ba3483e3418b4799894fd2512f3e156175c295f85ae8bff1024e"},"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":"44b47e797e4861bfe46573a3666279cc066a3ba7c4ab99a776db48177a8f50d7"},"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":"04f5549ffb2d4bf7b28573a148d27ffb71e99e27d54476ce96e1fd843165c023"},"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":"77ebeb58e58af459a982dd2a93720237baaf4a7e72a5930a8f2e67a5b194fe4d"},"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":"4d2083ab6d2accf6819531addfd087793c007c7c08970d7f49ac933913445833"},"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":"83481684ee746bd9b0be330ffa506101a478d046ce6147380c8afaca1e807b88"},"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":"01281558595d2389c240aaf631168bd05ab911b6d3f2ce5d4eacd537ece14fbc"},"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":"d450bae7fe1cbe3ed0838d0db546f95d10525b308ab43c346fb541896aa497d8"},"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":"D34","level":"note","message":{"text":"Dormant codebase: 698 of 700 significant files have no living knowledge \u2014 the codebase as a whole is dormant, not 698 separate risks. Re-engage owners or document before change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"4c69f1e54b7dd6fe9029dd02df6ba8f8145b789f2f18dbdaa086c40ded49dba6"}},{"ruleId":"D34","level":"note","message":{"text":"Largest orphaned file: One of the largest files with no living knowledge remaining \u2014 a reasonable place to start a read-through before the aggregate risk above bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"713060f2e420945c399cee188700b4e0405c60ec0ce398a8a6d2d5ffa03a883a"}},{"ruleId":"D34","level":"note","message":{"text":"Largest orphaned file: One of the largest files with no living knowledge remaining \u2014 a reasonable place to start a read-through before the aggregate risk above bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4af203d1e37893467c2a4b5588299500040b48b7fe07f7c44d6f7b91650cda8b"}},{"ruleId":"D34","level":"note","message":{"text":"Largest orphaned file: One of the largest files with no living knowledge remaining \u2014 a reasonable place to start a read-through before the aggregate risk above bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"store/src/main/java/org/apache/rocketmq/store/CommitLog.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d67692afbfe512cde33d56e9d23c599f28a29367c61062328ed0d90272d61f74"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: Controller.java \u2194 ReplicasInfoManager.java: \u0060controller/src/main/java/org/apache/rocketmq/controller/Controller.java\u0060 and \u0060controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.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) 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":"controller/src/main/java/org/apache/rocketmq/controller/Controller.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4032a63811e424a1890827ac336de3ae82120ec11dc47d352b72cd58f7fb89c"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: MessagingProcessor.java \u2194 MessageService.java: \u0060proxy/src/main/java/org/apache/rocketmq/proxy/processor/MessagingProcessor.java\u0060 and \u0060proxy/src/main/java/org/apache/rocketmq/proxy/service/message/MessageService.java\u0060 change together 67% of the time (8 of the 12 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":"proxy/src/main/java/org/apache/rocketmq/proxy/processor/MessagingProcessor.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"253a0aed54c89b016adbe8ad75e0a4fff11e3f05cfafa1023a0a64fa5e704d03"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: DefaultMessagingProcessor.java \u2194 MessageService.java: \u0060proxy/src/main/java/org/apache/rocketmq/proxy/processor/DefaultMessagingProcessor.java\u0060 and \u0060proxy/src/main/java/org/apache/rocketmq/proxy/service/message/MessageService.java\u0060 change together 67% of the time (8 of the 12 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":"proxy/src/main/java/org/apache/rocketmq/proxy/processor/DefaultMessagingProcessor.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0558ec1f477ea670ef271410bf9fbc267d39921ba76ea50131c4294810673637"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: BrokerHeartbeatManager.java \u2194 ReplicasInfoManager.java: \u0060controller/src/main/java/org/apache/rocketmq/controller/BrokerHeartbeatManager.java\u0060 and \u0060controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.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":"controller/src/main/java/org/apache/rocketmq/controller/BrokerHeartbeatManager.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"76a347e6c729161edcb0778c157395171ddef0f3473a6ab658d085743269baae"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: DLedgerController.java \u2194 BrokerReplicaInfo.java: \u0060controller/src/main/java/org/apache/rocketmq/controller/impl/DLedgerController.java\u0060 and \u0060controller/src/main/java/org/apache/rocketmq/controller/impl/manager/BrokerReplicaInfo.java\u0060 change together 62% of the time (8 of the 13 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":"controller/src/main/java/org/apache/rocketmq/controller/impl/DLedgerController.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9a757838e0f4ff7b195722f5e7a882bacf0328ed075a86020f1b08ed65e2e5b"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: Controller.java \u2194 ControllerRequestProcessor.java: \u0060controller/src/main/java/org/apache/rocketmq/controller/Controller.java\u0060 and \u0060controller/src/main/java/org/apache/rocketmq/controller/processor/ControllerRequestProcessor.java\u0060 change together 56% of the time (10 of the 18 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":"controller/src/main/java/org/apache/rocketmq/controller/Controller.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b67d86b6c02b9976b2eb697eb0f7d31149ad3280223f913c9d73349e11eeb6c"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: PeekMessageProcessor.java \u2194 PopMessageProcessor.java: \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java\u0060 and \u0060broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java\u0060 change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). 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":"broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfd813060741942eca8c0faa4b43a426896b6c20c6ceb858d99cb6a941bbeaab"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: ControllerManager.java \u2194 BrokerReplicaInfo.java: \u0060controller/src/main/java/org/apache/rocketmq/controller/ControllerManager.java\u0060 and \u0060controller/src/main/java/org/apache/rocketmq/controller/impl/manager/BrokerReplicaInfo.java\u0060 change together 54% of the time (7 of the 13 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":"controller/src/main/java/org/apache/rocketmq/controller/ControllerManager.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d59e2698c9d0473a825f0eecd745b915f6a4d6549f2ffa071c9ea6c9472c9908"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: Controller.java \u2194 BrokerReplicaInfo.java: \u0060controller/src/main/java/org/apache/rocketmq/controller/Controller.java\u0060 and \u0060controller/src/main/java/org/apache/rocketmq/controller/impl/manager/BrokerReplicaInfo.java\u0060 change together 54% of the time (7 of the 13 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":"controller/src/main/java/org/apache/rocketmq/controller/Controller.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"78d2327eb16a12d056333995138508bc69b749e2c928026a6981a1eaded8fb1f"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: ReplicasInfoManager.java \u2194 ControllerRequestProcessor.java: \u0060controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java\u0060 and \u0060controller/src/main/java/org/apache/rocketmq/controller/processor/ControllerRequestProcessor.java\u0060 change together 52% of the time (15 of the 29 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":"controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"409b17a85268777e5b0017a205b4374ea8fa933917103c4add25d7dc02f7cdeb"}},{"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-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":56,"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."]}]}