Design patterns implemented in Java
This report summarizes scanner evidence for iluwatar/java-design-patterns, a Java project with 94,831 GitHub stars. SynthScan examined 245,888 lines of code across 2840 source files, recording 59 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 0.7 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 27 finding(s).
Are imports declared and package/API names verified? 29 finding(s).
Are wrappers, guards, and repeated structures necessary? 6 finding(s).
Which changes need focused human review? 59 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 59 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | …main/java/com/iluwatar/servicetoworker/GiantModel.java | 48 | this.model = new com.iluwatar.model.view.controller.GiantModel(health, fatigue, nourishment); | CODE |
| CRITICAL⚡ | …va/com/iluwatar/messaging/NotificationServiceTest.java | 124 | org.junit.jupiter.api.Assertions.assertTrue(Thread.interrupted()); | CODE |
| CRITICAL⚡ | …va/com/iluwatar/messaging/NotificationServiceTest.java | 128 | org.junit.jupiter.api.Assertions.assertTrue(Thread.interrupted()); | CODE |
| CRITICAL⚡ | …va/com/iluwatar/messaging/NotificationServiceTest.java | 132 | org.junit.jupiter.api.Assertions.assertTrue(Thread.interrupted()); | CODE |
| CRITICAL | …/java/com/iluwatar/messaging/InventoryServiceTest.java | 112 | org.junit.jupiter.api.Assertions.assertTrue(Thread.interrupted()); | CODE |
| CRITICAL | …/java/com/iluwatar/messaging/InventoryServiceTest.java | 116 | org.junit.jupiter.api.Assertions.assertTrue(Thread.interrupted()); | CODE |
| CRITICAL | …st/java/com/iluwatar/messaging/PaymentServiceTest.java | 110 | org.junit.jupiter.api.Assertions.assertTrue(Thread.interrupted()); | CODE |
| CRITICAL | …st/java/com/iluwatar/messaging/PaymentServiceTest.java | 114 | org.junit.jupiter.api.Assertions.assertTrue(Thread.interrupted()); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …com/iluwatar/transactionaloutbox/OrderServiceTest.java | 54 | Order order = orderService.createOrder("John Doe", "Smartphone", 799.99); | CODE |
| LOW | …com/iluwatar/transactionaloutbox/OrderServiceTest.java | 57 | assertEquals("John Doe", order.getCustomerName()); | CODE |
| LOW | notification/README.md | 81 | var form = new RegisterWorkerForm("John Doe", "Engineer", LocalDate.of(1990, 1, 1)); | CODE |
| LOW | …src/test/java/com/iluwatar/RegisterWorkerFormTest.java | 41 | registerWorkerForm = new RegisterWorkerForm("John Doe", "Engineer", LocalDate.of(1990, 1, 1)); | CODE |
| LOW | …src/test/java/com/iluwatar/RegisterWorkerFormTest.java | 52 | assertEquals("John Doe", registerWorkerForm.worker.getName()); | CODE |
| LOW | …atar/hexagonal/database/MongoTicketRepositoryTest.java | 78 | var details = new PlayerDetails("foo@bar.com", "123-123", "07001234"); | CODE |
| LOW | …atar/hexagonal/database/MongoTicketRepositoryTest.java | 88 | assertEquals("foo@bar.com", ticket.playerDetails().email()); | CODE |
| LOW | …java/com/iluwatar/hexagonal/test/LotteryTestUtils.java | 40 | return createLotteryTicket("foo@bar.com", "12231-213132", "+99324554", Set.of(1, 2, 3, 4)); | CODE |
| LOW | onion-architecture/README.md | 212 | "phoneNumber": "555-1234", | CODE |
| LOW | onion-architecture/README.md | 214 | "address": "123 Main St", | CODE |
| LOW | …r/onion/application/usecase/SavePersonUseCaseTest.java | 77 | "123 Main St", | CODE |
| LOW | …r/onion/application/usecase/SavePersonUseCaseTest.java | 165 | "123 Main St", | CODE |
| LOW | …r/onion/application/usecase/SavePersonUseCaseTest.java | 188 | "123 Main St", | CODE |
| LOW | …r/onion/application/usecase/SavePersonUseCaseTest.java | 210 | "123 Main St", | CODE |
| LOW | …r/onion/application/usecase/SavePersonUseCaseTest.java | 238 | "123 Main St", | CODE |
| LOW | …tar/onion/infrastructure/web/PersonControllerTest.java | 199 | "123 Main St", | CODE |
| LOW | …tar/onion/infrastructure/web/PersonControllerTest.java | 240 | "123 Main St", | CODE |
| LOW | …st/java/com/iluwatar/monolithic/MonolithicAppTest.java | 109 | User mockUser = new User(1L, "John Doe", "john@example.com", "password123"); | CODE |
| LOW | …st/java/com/iluwatar/monolithic/MonolithicAppTest.java | 181 | User mockUser = new User(1L, "John Doe", "john@example.com", "password123"); | CODE |
| LOW | …st/java/com/iluwatar/monolithic/MonolithicAppTest.java | 241 | .thenReturn(new User(1L, "John Doe", "john@example.com", "password123")); | CODE |
| LOW | …st/java/com/iluwatar/monolithic/MonolithicAppTest.java | 248 | new User(1L, "John Doe", "john@example.com", "password123"), | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | thread-specific-storage/README.md | 103 | // Step 1: Parse token to get userId | COMMENT |
| LOW⚡ | thread-specific-storage/README.md | 106 | // Step 2: Save userId in ThreadLocal storage | COMMENT |
| LOW⚡ | thread-specific-storage/README.md | 112 | // Step 3: Retrieve userId later in the request flow | COMMENT |
| LOW⚡ | thread-specific-storage/README.md | 121 | // Step 4: Clear ThreadLocal to avoid potential memory leaks | COMMENT |
| LOW⚡ | …com/iluwatar/threadspecificstorage/RequestHandler.java | 29 | // Step 1: Parse token to get userId | COMMENT |
| LOW⚡ | …com/iluwatar/threadspecificstorage/RequestHandler.java | 32 | // Step 2: Save userId in ThreadLocal storage | COMMENT |
| LOW⚡ | …com/iluwatar/threadspecificstorage/RequestHandler.java | 38 | // Step 3: Retrieve userId later in the request flow | COMMENT |
| LOW⚡ | …com/iluwatar/threadspecificstorage/RequestHandler.java | 47 | // Step 4: Clear ThreadLocal to avoid potential memory leaks | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | combinator/README.md | 0 | it was many and many a year ago, in a kingdom by the sea, that a maiden there lived whom you may know by the name of ann | STRING |
| HIGH | …src/test/java/com/iluwatar/combinator/FindersTest.java | 0 | it was many and many a year ago, in a kingdom by the sea, that a maiden there lived whom you may know by the name of ann | STRING |
| HIGH | …c/main/java/com/iluwatar/combinator/CombinatorApp.java | 0 | it was many and many a year ago, in a kingdom by the sea, that a maiden there lived whom you may know by the name of ann | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | microservices-messaging/run-app.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | microservices-messaging/docker-compose.yml | 1 | # | COMMENT |
| LOW | caching/docker-compose.yml | 1 | # | COMMENT |
| LOW | …/subscriber-service/src/main/resources/application.yml | 1 | # | COMMENT |
| LOW | …her/polling-service/src/main/resources/application.yml | 1 | # | COMMENT |
| LOW | localization/pt/facade/README.md | 181 | // Dwarf cart operator goes to the mine. | COMMENT |
| LOW | localization/zh/bridge/README.md | 161 | enchantedSword.unwield(); | COMMENT |
| LOW | localization/zh/facade/README.md | 161 | // Dwarf cart operator wakes up. | COMMENT |
| LOW | localization/ar/facade/README.md | 181 | // Dwarven tunnel digger goes to the mine. | COMMENT |
| LOW | localization/ko/facade/README.md | 181 | // Dwarven tunnel digger wakes up. | COMMENT |
| LOW | localization/es/facade/README.md | 181 | // Dwarven tunnel digger goes to the mine. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …com/iluwatar/threadspecificstorage/RequestHandler.java | 29 | // Step 1: Parse token to get userId | COMMENT |
| LOW⚡ | …com/iluwatar/threadspecificstorage/RequestHandler.java | 32 | // Step 2: Save userId in ThreadLocal storage | COMMENT |
| LOW⚡ | …com/iluwatar/threadspecificstorage/RequestHandler.java | 38 | // Step 3: Retrieve userId later in the request flow | COMMENT |
| LOW⚡ | …com/iluwatar/threadspecificstorage/RequestHandler.java | 47 | // Step 4: Clear ThreadLocal to avoid potential memory leaks | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | thread-specific-storage/README.md | 92 | public class RequestHandler { | CODE |
| LOW | …com/iluwatar/threadspecificstorage/RequestHandler.java | 13 | public class RequestHandler { | CODE |
| LOW | localization/zh/chain/README.md | 64 | public abstract class RequestHandler { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …t/src/main/java/com/iluwatar/component/GameObject.java | 77 | * simply a duplicate of update() without the key event for demonstration purposes. | COMMENT |