{"$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":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"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":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"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":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AXB2","name":"Runtime readiness","shortDescription":{"text":"Runtime readiness"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB2"},{"id":"DM1","name":"Aggregate boundaries","shortDescription":{"text":"Aggregate boundaries"},"helpUri":"https://codehealth.canine.dev/dimensions/DM1"},{"id":"DM11","name":"Constructible invalid state","shortDescription":{"text":"Constructible invalid state"},"helpUri":"https://codehealth.canine.dev/dimensions/DM11"},{"id":"DM12","name":"Ambient inputs in the domain","shortDescription":{"text":"Ambient inputs in the domain"},"helpUri":"https://codehealth.canine.dev/dimensions/DM12"},{"id":"DM4","name":"Rich vs anemic model","shortDescription":{"text":"Rich vs anemic model"},"helpUri":"https://codehealth.canine.dev/dimensions/DM4"},{"id":"DM5","name":"Encapsulated state","shortDescription":{"text":"Encapsulated state"},"helpUri":"https://codehealth.canine.dev/dimensions/DM5"},{"id":"DM6","name":"Domain \u2194 infrastructure boundary","shortDescription":{"text":"Domain \u2194 infrastructure boundary"},"helpUri":"https://codehealth.canine.dev/dimensions/DM6"},{"id":"DM8","name":"Value-object opportunities","shortDescription":{"text":"Value-object opportunities"},"helpUri":"https://codehealth.canine.dev/dimensions/DM8"},{"id":"DM9","name":"Scattered domain decisions","shortDescription":{"text":"Scattered domain decisions"},"helpUri":"https://codehealth.canine.dev/dimensions/DM9"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D2","level":"warning","message":{"text":"AggregateConflictRetryUtils.invoke (cognitive 32): AggregateConflictRetryUtils.invoke has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (29 pts), error handling 1 (2 pts), loops 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/utils/AggregateConflictRetryUtils.java"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"d57e8f8139a2faf46ec4b22ada71966fc573877f07d15c5ecfab25fe7124ddb7"}},{"ruleId":"D2","level":"warning","message":{"text":"Sequence.getLocalAddress0 (cognitive 20): Sequence.getLocalAddress0 has cognitive complexity 20 (threshold 15). Drivers by points: error handling 4 (9 pts), if/else 3 (6 pts), loops 2 (5 pts) (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":"cqrs-api/src/main/java/com/damon/cqrs/utils/IdWorker.java"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb1869bd9b3dcc7f8d9e5378916c0ba0c928b5068b8cfdf1e96fcfda698f46c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201330 lines \u00D7 2): cqrs-message-kafka/src/main/java/com/damon/cqrs/kafka/config/KafkaConsumerConfig.java:17-46 | cqrs-message-kafka/src/main/java/com/damon/cqrs/kafka/config/KafkaProducerConfig.java:15-23 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-message-kafka/src/main/java/com/damon/cqrs/kafka/config/KafkaConsumerConfig.java"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8d4d0ef52dbd60baec99c496525ddef21b5620be266c324c00c7465e0b2d011"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cqrs-event-mysql/src/main/java/com/damon/cqrs/event_store/MysqlEventStore.java:72-79 | cqrs-event-mysql/src/main/java/com/damon/cqrs/event_store/MysqlEventStore.java:131-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-event-mysql/src/main/java/com/damon/cqrs/event_store/MysqlEventStore.java"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"6db212f20c4c81778543750eafcf9cedfdf1cf9c1752bc40cc5107d8daa09c98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cqrs-message-kafka/src/main/java/com/damon/cqrs/kafka/KafkaMessageHandler.java:88-94 | cqrs-message-rocketmq/src/main/java/com/damon/cqrs/rocketmq/RocketMQOrderlyEventListener.java:50-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 \u0060cqrs-message-kafka/src/main/java/com/damon/cqrs/kafka/KafkaMessageHandler.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":"cqrs-message-kafka/src/main/java/com/damon/cqrs/kafka/KafkaMessageHandler.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fbce2cad1687b40373fea43bbc9224710885711d2ad0ce9fdd510eff7a6d307"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): cqrs-core/src/main/java/com/damon/cqrs/event/EventCommittingService.java:101-107 | cqrs-core/src/main/java/com/damon/cqrs/event/EventCommittingService.java:110-116 | cqrs-core/src/main/java/com/damon/cqrs/event/EventCommittingService.java:119-125 \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 \u0060cqrs-core/src/main/java/com/damon/cqrs/event/EventCommittingService.java:101\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-core/src/main/java/com/damon/cqrs/event/EventCommittingService.java"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"d06c39f20c44e285695c5ddf39c02cc2dcfef3719b799c8222a5ecff1d2b663b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/RedPacketServiceBootstrap.java:39-66 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/RedPacketServiceVirtualThreadBootstrap.java:39-66 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/RedPacketServiceBootstrap.java:39\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/RedPacketServiceBootstrap.java"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"392d1f45d7c69d3ff787355732d9b49f59b7f0cacaef87f57dc0965d670bd3f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 5): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:88-105 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:109-126 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:130-147 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:151-168 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:172-189 \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 \u0060cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.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":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8149ef3751ec21f893232e84decdb6ac54218d426342b1df4b5ff31fe7d7c0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/RedPacketServiceBootstrap.java:22-37 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/RedPacketServiceVirtualThreadBootstrap.java:22-37 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/RedPacketServiceBootstrap.java"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"e06338002bf49d46250eead659dede7a7211c37848db897dcb3790c5a8f1941c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:88-97 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:109-118 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:130-139 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:151-160 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:172-181 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:193-202 \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 \u0060cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.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":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9db0c0ad116d2f3227b882890cad2e0f523ca7f12eea96d1deafdf3291aaf48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201310 lines \u00D7 2): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/TestConfig.java:58-67 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/RedPacketConfig.java:55-61 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/TestConfig.java:58\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/TestConfig.java"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a993e09c3659b3ddffee2f28c24215bd725d956c0f0fe8237a29faec186b17e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/TrainStock.java:153-161 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/TrainStock.java:214-222 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/TrainStock.java:344-352 \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 first that the copies are not typed on the same thing: the declarations holding them bind \u0060command\u0060 to \u0060TicketProtectCommand\u0060 in one and \u0060TicketBuyCommand\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/TrainStock.java"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8ee10f94c5cd9ad3447d69c85d1e0fada92bac3477588c78c46d467bee1b916"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/TestConfig.java:32-40 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/RedPacketConfig.java:29-37 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/TestConfig.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc642a63a682feaff7dcc431455127f170abe106df83c9b0635881070ae1e9a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/TrainStock.java:282-290 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/TrainStock.java:334-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 \u0060cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/TrainStock.java:282\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/TrainStock.java"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c38287ce03be697778a5d7e8c4bbfd9baeda004e00db3238ee9e7ff3f279615"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:80-85 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:101-106 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:122-127 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:143-148 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:164-169 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java:185-190 \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 \u0060cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.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":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/TrainStockMultiSceneTestBootstrap.java"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa60d5da0a9e43319c61bd2b02ac4752301ba0fa2e86b3e11bae8402423ad9c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 2): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/TestConfig.java:43-48 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/RedPacketConfig.java:46-50 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/TestConfig.java:49\u0060 calls \u0060MysqlEventOffset\u0060 and \u0060cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/RedPacketConfig.java:51\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/TestConfig.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"95d6ef08c29935df50cb173944fc1bdb0e76af552aff54f75a2fb02e3e968932"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/query/event_handler/RedPacketEventListener.java:19-30 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/listener/TrainEventListener.java:19-30 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/query/event_handler/RedPacketEventListener.java"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c9730440efe2bc7936c7a6d276998f86851bca3dab0977520524d7498ab89ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (51 lines \u00D7 2): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/value_object/UserSeatInfo.java:1-59 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/event/TicketCanceledEvent.java:16-66 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/value_object/UserSeatInfo.java:1\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/value_object/UserSeatInfo.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f57737637e073ebdf32e1165b26a26ed2d1f78a11c2d434460361cccf933106a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/command/TicketProtectCancelCommand.java:16-50 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/command/TicketProtectCommand.java:26-76 \u2014 before extracting anything, compare \u0060cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/command/TicketProtectCancelCommand.java\u0060 and \u0060cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/command/TicketProtectCommand.java\u0060 as WHOLE FILES: 86% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/command/TicketProtectCancelCommand.java"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"92c46fd583ed76c6a246301f931014f91c6171424da6b938ddea5ce088f9ca52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 5): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/value_object/UserSeatInfo.java:1-59 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/event/TicketBoughtEvent.java:26-92 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/event/TicketCanceledEvent.java:16-66 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/event/TicketProtectCanceledEvent.java:12-37 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/event/TicketProtectSucceedEvent.java:20-69 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/value_object/UserSeatInfo.java:1\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/value_object/UserSeatInfo.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c5b823b2a89c791a4dd81871dc2a0e698628779d6012df9a78661299ef58b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/goods/GoodsApplication.java:56-60 | cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/goods/GoodsVirtualThreadApplication.java:64-68 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/goods/GoodsApplication.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":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/goods/GoodsApplication.java"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"03c32b7252439af5424f3502999bb6403e912b742c53d39eb88956606f119dfe"}},{"ruleId":"D16","level":"warning","message":{"text":"bus factor 1 \u2014 one contributor carries this repository: 2 contributor(s) have commits in this repository (automation and bot accounts excluded), but the commits of a single one of them cover most of its history \u2014 85% of the 178 commit(s) sampled \u2014 so the number of people who actually carry it is 1. This is not the ambient state of a solo project: there ARE other contributors, and if the one who carries the repository becomes unavailable, the knowledge behind most of its history goes with them. Spread the next changes deliberately \u2014 have a second contributor review or pair on them \u2014 and write down the parts only one person can currently change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"a99f114ab4dfee37ae0bf0665b44c7468d85b809d361949e2b6258101fa1e5a2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/EventStoreException.java"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"b63581683060ae2e28c9d231b4735f79ea4251a8c1566b208d91c9d9e007e9e6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/EventStoreException.java"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"1789c6503a58ba7064dc7ae38b2377c8afccb9e2a4a38ed00c22e63c38341715"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/EventStoreException.java"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d37ae85bca0ef2eb93e4e85ee4afdcc63f979fdde6baba9e381cc06420dd26e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/EventStoreException.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9c9c4c2ff0baaa692aadd962d64f516d48c9eaaeb50ff567074d95ef74e41f6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/EventStoreException.java"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"85edb67d058ad92cc7eb20a84c705d38dd9888657f46b9804c05a362cf0f2ab4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/EventSendingException.java"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"0349b8d31f2b5ab12673db13aa761ffbb07a5a656a221ac78d656333a19a08e7"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/EventSendingException.java"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"c65d0cfa13512ee38042d79b4a2c2bbe8827842a4ff44b7c65138cc17cc47636"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/EventSendingException.java"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e6fc4c27f1b65b513c141ed012fdb690af5e2f4434d4e469e0c2782f6c7610d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/EventSendingException.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"d17efe2db378732277f79b5456ecc3674694aa3b16c98cfa8eba90ad685ff590"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/EventSendingException.java"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"18da3c4318b331d36ab9fda20b17bce076772c3400e5f8df89ac877aae4a51a3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/DuplicateEventStreamException.java"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d7683adf444cc35ee23b4ba0743230b044aff6be31c6b35bd2661b902daad8c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/DuplicateEventStreamException.java"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc4922b3eb6a9cfb2bb9414f6531ebe49551ba3df847205c7777918bf8fcb24e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/DuplicateEventStreamException.java"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"d938e82c1b651f0139f288021f02600ca1b7828b24c15770142be9688da6cb7e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/DuplicateEventStreamException.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6a18db84d807501fb3e8b0946fbc2b360a863f1f17d89a20391700f95327901"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/DuplicateEventStreamException.java"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f2fe17f4a1ef3983b136807790e38fee1aa7761c0469af4da0e444fc0912baf"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/AggregateProcessingTimeoutException.java"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ac8fa7db1208d295e92adf0e25986e5e0b5cf55b5105c0bfd2e4b97276ce8d9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/AggregateProcessingTimeoutException.java"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"22d38d00ef13a22ec38545cd4ed18218a879d188769816a906582632b5cf2e78"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/AggregateProcessingTimeoutException.java"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"553d9c88bebbf2c3b8e257e0a32275e59b0c63e8402e618b3938710a7983f224"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/AggregateProcessingTimeoutException.java"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"e95c2970ed4d777a7c17fb4946d36b7d809f6f578245b98a7a5913b5fe130751"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/AggregateProcessingTimeoutException.java"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"1885a6eac8ac8aee861772df43a4eb8fde205bcb78cc5fd900429afd789c9d95"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/AggregateEventConflictException.java"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a6272cb238e33b5c0fc50cc20c93790dc27658f4ed7317fb23a398476d0457d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/AggregateEventConflictException.java"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c7beffae9808d670e37cb160867f79782a17df17254d8c3f6a1a7bf13deed4d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/AggregateEventConflictException.java"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"18f73a90e9b438918d6cd0ff495fc060273a674153f68269f9ba53577ba285ad"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/AggregateCommandConflictException.java"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"71c71f92990901141cce96b74e4dc287c40e12ca25eaff27e91452fe33ec7b73"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/AggregateCommandConflictException.java"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"6599c028a690dbb5b475328fdb051d9f07d60171e71a562a6198d053133fd9d1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/AggregateCommandConflictException.java"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc250adc2063b4bf3325354f2d6a32ce9ed317aeea5e0dbc953cfad0cea156bf"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/AggregateCommandConflictException.java"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"6010f6d27d72ef22a6bf70a7ecee65fcd013127b6c9534499aba59943039533c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO Auto-generated constructor stub \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-api/src/main/java/com/damon/cqrs/exception/AggregateCommandConflictException.java"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"df6d404b79434f31db49da033ab7298941c8bdc1d73f88b90e636314471bedf1"}},{"ruleId":"D19","level":"note","message":{"text":"Documentation: no installation or build instructions: No setup/build instructions for the CQRS library. Add a short install/dependency section, e.g. \u0027Maven dependency: \u003Cadd\u003E\u0027 and build/run commands."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fa6bfcd5c6ae231d1b8ee99bced50b832d1f61cde9da6cbb533467b879a57db"}},{"ruleId":"D19","level":"note","message":{"text":"Documentation: no usage examples: Usage is shown but there are no runnable code examples demonstrating the full CQRS workflow. Add a runnable usage example showing how to process a command, join results, and query the Q side after an event."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1355eb4e127a4bc9236772ce1c46f09510aa9286e7a06d1e47f308229df19049"}},{"ruleId":"D34","level":"note","message":{"text":"Dormant codebase: 36 of 36 significant files have no living knowledge \u2014 the codebase as a whole is dormant, not 36 separate risks. Counted over 36 of the 140 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"4c69f1e54b7dd6fe9029dd02df6ba8f8145b789f2f18dbdaa086c40ded49dba6"}},{"ruleId":"D34","level":"note","message":{"text":"Most significant orphaned file: One of the orphaned files carrying the most lost knowledge \u2014 ranked by size weighted by the file\u0027s role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/train/aggregate/TrainStock.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c0a5a0c8f09afb9e94992627e5d1799ac2914346a5e484247e773e72ea375a9"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: EventCommittingService.java \u2194 DefaultAggregateSnapshootService.java: \u0060cqrs-core/src/main/java/com/damon/cqrs/event/EventCommittingService.java\u0060 and \u0060cqrs-core/src/main/java/com/damon/cqrs/snapshot/DefaultAggregateSnapshootService.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 \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u006007f10e22\u0060 1.\u4F18\u5316\u4EE3\u7801\u3002 (at that commit the file was still \u0060cqrs-core/src/main/java/com/damon/cqrs/DefaultAggregateSnapshootService.java\u0060); \u0060a3f0ee8f\u0060 1.\u4F18\u5316\u76F8\u5173\u547D\u540D\u3002 (at that commit the file was still \u0060cqrs-core/src/main/java/com/damon/cqrs/DefaultAggregateSnapshootService.java\u0060); \u0060b624c399\u0060 1.\u4EE3\u7801\u4F18\u5316 (at that commit the file was still \u0060cqrs-core/src/main/java/com/damon/cqrs/DefaultAggregateSnapshootService.java\u0060) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-core/src/main/java/com/damon/cqrs/event/EventCommittingService.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a8377c7e162baea0717f2bb36eaad7dee1ef749fbf62427be4a3bc37d3d3bc2"}},{"ruleId":"DM11","level":"warning","message":{"text":"Constructible in an invalid state: Goods: \u0060Goods\u0060\u0027s public constructor takes \u0060id\u0060, \u0060name\u0060, \u0060number\u0060 as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for \u0060throw\u0060, \u0060Guard.\u0060, \u0060Ensure.\u0060, \u0060ArgumentNullException\u0060, \u0060ArgumentException\u0060, \u0060CheckRule\u0060 or \u0060Requires.\u0060 \u2014 a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type\u0027s OWN static members were read, and only names beginning \u0060Create\u0060, \u0060Of\u0060, \u0060From\u0060, \u0060New\u0060 or \u0060Build\u0060 \u2014 one inherited from a base type, one on a companion builder, or one called \u0060Parse\u0060, \u0060Make\u0060 or \u0060Rehydrate\u0060 is not seen. If either exists, this row is wrong. If neither does, a caller can build a \u0060Goods\u0060 that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a \u0060Create\u0060 that can refuse."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/goods/domain/aggregate/Goods.java"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f2a9c99766710afa029cb7df9fb3a73c7cfefa8cef38e8d54b48be71ec93d0"}},{"ruleId":"DM12","level":"warning","message":{"text":"Domain type reads a global random source: WeixinRedPacket: \u0060WeixinRedPacket\u0060 draws from \u0060new Random(\u0060 inside \u0060generateRedPacket\u0060. The outcome is not a function of the inputs, so no test can assert which result this produces, and the same inputs replay differently. Take the randomness as a parameter \u2014 an injected \u0060Random\u0060, a seeded generator, or the already-chosen value \u2014 so a caller (and a test) can decide it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cqrs-sample/cqrs-sample-generic-test/src/main/java/com/damon/cqrs/sample/red_packet/domain/aggregate/WeixinRedPacket.java"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b588ad3e557ebdad63c5f796e48b7e2ad3f6da5e5080bf3c7b8cafca95626d"}},{"ruleId":"M1","level":"note","message":{"text":"Thin README: The root README is 95 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise \u2014 or with no heading at all \u2014 is not seen and this row may understate what the document covers."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"5fc8f78bec0b6b3daab9d9139ba49b687f61b54f8310b64c159df9616f47e38e"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"M2","level":"note","message":{"text":"No architecture diagram/doc: No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named \u0060architecture\u0060 or \u0060design\u0060 in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape \u2014 no \u0060## Architecture\u0060 heading, no \u0022architecture overview\u0022/\u0022high-level design\u0022 phrasing, no \u0022the architecture is \u2026\u0022 introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document \u2014 not evidence that nobody wrote the shape down."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0c190e7c159d1850ee706c3ac4486e151e8a4fe169de4bf61436b9f399654f06"}},{"ruleId":"P1","level":"warning","message":{"text":"No CI pipeline: No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, \u2026) \u2014 changes aren\u0027t gated by an automated build/test."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"44f01af96e50474fba2df84d95ddf4f7e1d34c29c307830b9efc9057daa6b670"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add spotbugs with find-sec-bugs (or \u0060semgrep --config=auto\u0060, which runs on any language) \u2014 this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}}],"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-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-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":0,"secretScannerRunsExcluded":0}}}]}