Public report — jstarcraft-core, published 22 Sep 2026. Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches, dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase survey Measured under the Code Assurance Index · rubric rubric-2026.09.15 (frozen) · verify this survey Filed cd_1e06fc5a4deb4053aa6bbedb69328503 Filed 25 September 2026, 05:08 UTC Public

HongZhaoHua/jstarcraft-Core

Measured 22 September 2026, 03:22 UTC

48% Weak
CriticalWeakAdequateStrongExemplary

REDACTED · 68,533 LoC · rebuild ~0.7 person-years · weakest lens: Readiness (33%)

Findings by grade

5 critical 1219 serious 43 minor 48 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
22 September 2026, 03:22 UTC

A measurement, not a certificate. The Code Assurance Index does not certify, approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said here so the number is checked rather than believed.

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

21/24dimensions tool-verifieddeterministic · confidence 1.0 · 3 LLM-assisted, advisory
1261findings with an exact file:lineof 1267 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
24/114dimensions across the health lenses68533 LoC — wide & deep
Chapters

Executive summary

This system is a medium-sized asset with significant operational risk, currently rated as weak overall. While the underlying architecture is robust, the lack of production readiness creates a fragile foundation that threatens delivery speed and reliability. The business value tied up here is substantial, requiring roughly 0.7 person-years to rebuild, which underscores the importance of stabilizing operations before investing in new features.

The primary risk lies in production readiness, which is critically low. Without automated testing and continuous integration, every change carries a high probability of regression, leading to costly outages and delayed releases. This gap acts as a hidden tax on development, slowing down the team by an estimated five to twelve percent on every modification. The cost of inaction is high, with annual drag potentially exceeding the cost of remediation within months.

A secondary concern is code maturity and maintainability. The codebase lacks the structural discipline needed for new teams to onboard quickly or for existing teams to work efficiently. Complexity and duplication in key areas mean that simple changes require disproportionate effort, increasing the likelihood of defects. This drift reduces the system's ability to adapt to market changes, effectively locking the business into a slower, more expensive development cycle.

On the positive side, the architecture is sound, providing a stable backbone that can support future growth if properly maintained. The domain logic is well-contained, and the rebuild cost is manageable, indicating that the core value is preserved. This strength offers a solid platform for improvement, provided the operational gaps are addressed.

The immediate focus must be on establishing a continuous integration workflow. Adding automated builds and test runs to every pull request is the highest-leverage action, paying for itself within six months by preventing regression debt. This step secures the system against immediate operational risks and creates a foundation for further improvements. Until this is in place, other enhancements will yield diminishing returns due to the underlying instability.

Note that several areas, including security scanning and performance metrics, were not measured in this assessment. The current picture is partial, and a deeper dive may reveal additional risks or opportunities that are currently unknown.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Readiness 33% · 47% weightMaturity 48% · 26% weightSecurity 68% · 14% weightCode Health 77% · 8% weightArchitecture 99% · 4% weight

Raise Readiness 33 → 70 (the Healthy floor) ⇒ headline 48 → ~61.

Code composition — where the lines go
Tests 100%
New since the last scan (100+)

1088 finding(s) are new versus the previous scan (2026-08-04) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.

  • D1 · NumberIndexConverter.query (cyclomatic 31) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java
  • D1 · PropertyFormatAdapter.process (cyclomatic 28) jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java
  • D1 · MigrationReadTask.call (cyclomatic 22) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java
  • D1 · BerkeleyManager.queryIdentities (cyclomatic 22) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java
  • D1 · BerkeleyManager.queryInstances (cyclomatic 22) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java
  • D1 · ArrayIndexConverter.convert (cyclomatic 19) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java
  • D1 · FileMemorandum.checkOut (cyclomatic 16) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java
  • D1 · FileMemorandum.clean (cyclomatic 16) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java
  • D1 · XlsxProcessor.endElement (cyclomatic 16) REDACTED
  • D1 · XlsxProcessor.endElement (cyclomatic 16) REDACTED
  • D2 · PropertyFormatAdapter.process (cognitive 128) jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java
  • D2 · NumberIndexConverter.query (cognitive 49) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java
  • D2 · BerkeleyManager.queryIdentities (cognitive 37) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java
  • D2 · BerkeleyManager.queryInstances (cognitive 37) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java
  • D2 · ArrayIndexConverter.convert (cognitive 36) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java
  • D2 · EventThread.run (cognitive 34) jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java
  • D2 · FileMemorandum.clean (cognitive 32) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java
  • D2 · MigrationReadTask.call (cognitive 32) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java
  • D2 · FileMemorandum.checkOut (cognitive 28) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java
  • D2 · BerkeleyXmlParser.parseInternal (cognitive 26) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java
  • D2 · MyBatisXmlParser.parseInternal (cognitive 26) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java
  • D2 · XlsxProcessor.parseRow (cognitive 25) REDACTED
  • D2 · XlsxProcessor.parseRow (cognitive 25) REDACTED
  • D2 · MongoXmlParser.parseInternal (cognitive 24) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java
  • D2 · LuceneXmlParser.parseInternal (cognitive 24) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java
  • D2 · Migrator.migrate (cognitive 22) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java
  • D2 · BerkeleyAccessor.checkVersions (cognitive 22) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java
  • D2 · XlsxProcessor.startElement (cognitive 21) REDACTED
  • D2 · XlsxProcessor.startElement (cognitive 21) REDACTED
  • D2 · JsonType.getFieldName (cognitive 20) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java
  • D2 · ZipJsonType.getFieldName (cognitive 20) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java
  • D2 · EventHandler.consumeMessage (cognitive 20) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java
  • D2 · XlsxProcessor.endElement (cognitive 19) REDACTED
  • D2 · XlsxProcessor.endElement (cognitive 19) REDACTED
  • D2 · MigrationWriteTask.call (cognitive 18) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationWriteTask.java
  • D2 · EventHandler.handleDelivery (cognitive 18) jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java
  • D2 · ResourceXmlParser.parseInternal (cognitive 17) jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java
  • D2 · BerkeleyConverter.handleField (cognitive 16) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java
  • D2 · ResourceManager.load (cognitive 16) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java
  • D3 · MethodTooLong: PropertyFormatAdapter.process jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java
  • D3 · MethodTooLong: PropertyFormatAdapter.process jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java
  • D3 · ClassTooLong: HashUtility jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java
  • D3 · ClassTooLong: LunisolarDate jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarDate.java
  • D3 · ClassTooLong: TypeParser jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/TypeParser.java
  • D3 · TooManyMethods: BerkeleyAccessor jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java
  • D3 · ClassTooLong: HibernateAccessor jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java
  • D3 · MethodTooLong: LunisolarExpression.getPreviousDateTime jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java
  • D3 · ClassTooLong: HibernateAccessor jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java
  • D3 · MethodTooLong: TypeParser.array jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/TypeParser.java
  • D3 · ClassTooLong: SolarExpression jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java
  • D4 · Near-duplicate member family (12 members, 28 shared lines) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java
  • D4 · Near-duplicate member family (12 members, 25 shared lines) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java
  • D4 · Near-duplicate member family (6 members, 22 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java
  • D4 · Near-duplicate member family (4 members, 27 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java
  • D4 · Near-duplicate member family (4 members, 27 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java
  • D4 · Near-duplicate member family (4 members, 23 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java
  • D4 · Near-duplicate member family (4 members, 21 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java
  • D4 · Near-duplicate member family (4 members, 16 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java
  • D4 · Near-duplicate member family (4 members, 15 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java
  • D4 · Near-duplicate member family (4 members, 13 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java
  • D4 · Near-duplicate member family (4 members, 5 shared lines) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsExpression.java
  • D4 · Near-duplicate member family (4 members, 4 shared lines) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/python/PythonExpression.java
  • D4 · Near-duplicate member family (3 members, 29 shared lines) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java
  • D4 · Near-duplicate member pair (182 shared lines) jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java
  • D4 · Near-duplicate member pair (122 shared lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java
  • D4 · Near-duplicate member pair (84 shared lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java
  • D4 · Near-duplicate member pair (49 shared lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java
  • D4 · Near-duplicate member pair (37 shared lines) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java
  • D4 · Near-duplicate member pair (32 shared lines) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java
  • D4 · Edited copy of a member (58 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java
  • D4 · Edited copy of a member (41 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java
  • D4 · Edited copy of a member (39 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java
  • D4 · Edited copy of a member (43 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java
  • D4 · Edited copy of a member (40 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java
  • D4 · Edited copy of a member (38 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java
  • D4 · Edited copy of a member (24 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java
  • D4 · Edited copy of a member (14 corresponding lines) REDACTED
  • D4 · Edited copy of a member (15 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java
  • D4 · Edited copy of a member (11 corresponding lines) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyExpression.java
  • D4 · Edited copy of a member (16 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java
  • D4 · Edited copy of a member (10 corresponding lines) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/kotlin/KotlinExpression.java
  • D4 · Members sharing a duplicated core (12 members, 50+ identical tokens) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java
  • D4 · Members sharing a duplicated core (12 members, 50+ identical tokens) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java
  • D4 · Members sharing a duplicated core (12 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java
  • D4 · Members sharing a duplicated core (12 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java
  • D4 · Members sharing a duplicated core (12 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java
  • D4 · Members sharing a duplicated core (10 members, 50+ identical tokens) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java
  • D4 · Members sharing a duplicated core (8 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java
  • D4 · Members sharing a duplicated core (8 members, 50+ identical tokens) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/ArrayConverter.java
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java
  • D4 · Members sharing a duplicated core (5 members, 50+ identical tokens) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java
  • D4 · Members sharing a duplicated core (5 members, 50+ identical tokens) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java
  • D4 · Members sharing a duplicated core (5 members, 50+ identical tokens) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €34,000–€170,000
Cost to rebuild€34,000–€170,000 (0.3–1.1 person-years (567–1,798 h), ~1–2 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.7× (at 48% quality) — the last 20% of quality is most of the work
Size & shapeREDACTED · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

This codebase represents roughly ~0.7 person-years of build effort (about ~€100,000 to rebuild). Its weakest lens is Readiness at 33% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.2) — CQRS × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Add a CI workflow that builds and runs the test suite on every push/PR.
+15.4 pts · REDACTED effort · CI/CD gates
2
Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
+15.4 pts · REDACTED effort · Security & performance tooling
3
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with HashUtility.java, LunisolarDate.java, HibernateAccessor.java.
+7.3 pts · REDACTED effort · Knowledge Freshness

Diagnosis — what's actually going on

Value concentrated against a weak lens · REDACTED · Value at risk
This is a REDACTED asset (~0.7 person-years to rebuild), and its weakest lens is Readiness at 33%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: REDACTED, ~0.7 person-years rebuild (68,533 LoC) · weakest lens: Readiness 33%
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
The top fix pays for itself · REDACTED · Economics
The top-ranked fix costs roughly 3–10 engineer-days once. Not doing it costs about 18.9–113.6 engineer-days every year, paid as drag on the ~144,435 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–6 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 5–12% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 35,614 line(s) changed over a 90-day window ⇒ ~144,435/year · D1/D2/D4 code quality: averaging 5.9/10 ⇒ a 5–12% drag on each change · top-ranked remediation: REDACTED effort ⇒ about 3–10 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 6 months.
Highest-leverage move · REDACTED · Leverage
Of everything flagged, the best return on effort is: Add a CI workflow that builds and runs the test suite on every push/PR. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Add a CI workflow that builds and runs the test suite on every push/PR.
A velocity tax on every change · REDACTED · Economics
The code-quality signals (complexity, duplication, cohesion) average 5.9/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 5–12% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 5.9/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.

Architecture — module dependency matrix

Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

148 modules, 189 dependencies. 5 dependency cycles across 12 modules, marked above the diagonal.

Showing the 40 most-connected modules; 108 more are not drawn.

Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
depends on →1 codec2 common.identification3 common.lifecycle4 common.reflection5 common.selection6 communication.message7 event8 io9 resource.format10 script11 storage12 transaction13 utility14 cache.persistence15 cache.proxy16 codec.specification17 communication.annotation18 communication.session19 resource.path20 storage.berkeley21 storage.lucene.annotation22 cache.transience23 codec.avro.converter24 codec.csv.converter25 codec.standard.converter26 communication.command27 communication.netty28 resource29 storage.lucene.converter30 cache31 codec.avro32 codec.csv33 codec.standard34 communication.netty.tcp35 communication.netty.udp36 communication.schema37 resource.schema38 storage.lucene39 storage.lucene.converter.index40 cache.schema
1 codec
2 common.identification
3 common.lifecycle
4 common.reflection
5 common.selection
6 communication.message
7 event
8 io
9 resource.format
10 script
11 storage
12 transaction
13 utility
14 cache.persistence6677
15 cache.proxy13
16 codec.specification2
17 communication.annotation1
18 communication.session1
19 resource.path1
20 storage.berkeley192
21 storage.lucene.annotation3
22 cache.transience1321
23 codec.avro.converter2222
24 codec.csv.converter1222
25 codec.standard.converter11425
26 communication.command3182510
27 communication.netty125
28 resource22
29 storage.lucene.converter1123
30 cache211547
31 codec.avro132
32 codec.csv132
33 codec.standard132
34 communication.netty.tcp23465
35 communication.netty.udp22464
36 communication.schema123
37 resource.schema112
38 storage.lucene726
39 storage.lucene.converter.index3918
40 cache.schema11112
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
…jstarcraft.core.codec…common.identification…core.common.lifecycle…ore.common.reflection…core.common.selection…communication.message…jstarcraft.core.eventcom.jstarcraft.core.io….core.resource.format…starcraft.core.script…tarcraft.core.storage…raft.core.transaction…tarcraft.core.utility…ore.cache.persistence…raft.core.cache.proxy…e.codec.specification…munication.annotation…communication.session…ft.core.resource.path…core.storage.berkeley…age.lucene.annotation…core.cache.transience….codec.avro.converter…e.codec.csv.converter…ec.standard.converter…communication.command…e.communication.netty…arcraft.core.resource…rage.lucene.converter…jstarcraft.core.cache…craft.core.codec.avro…rcraft.core.codec.csv…t.core.codec.standard…mmunication.netty.tcp…mmunication.netty.udp….communication.schema….core.resource.schema…t.core.storage.lucene…ucene.converter.index…aft.core.cache.schema…jstarcraft.core.codec1…common.identification2…core.common.lifecycle3…ore.common.reflection4…core.common.selection5…communication.message6…jstarcraft.core.event7com.jstarcraft.core.io8….core.resource.format9…starcraft.core.script10…tarcraft.core.storage11…raft.core.transaction12…tarcraft.core.utility13…ore.cache.persistence14…raft.core.cache.proxy15…e.codec.specification16…munication.annotation17…communication.session18…ft.core.resource.path19…core.storage.berkeley20…age.lucene.annotation21…core.cache.transience22….codec.avro.converter23…e.codec.csv.converter24…ec.standard.converter25…communication.command26…e.communication.netty27…arcraft.core.resource28…rage.lucene.converter29…jstarcraft.core.cache30…craft.core.codec.avro31…rcraft.core.codec.csv32…t.core.codec.standard33…mmunication.netty.tcp34…mmunication.netty.udp35….communication.schema36….core.resource.schema37…t.core.storage.lucene38…ucene.converter.index39…aft.core.cache.schema40667713211119231321222212221142531825101252211232115471321321322346522464123112726391811112+108 more modules (most-connected shown)

At a glance — Code Health · 77% · Strong ·

At a glance — Architecture · 99% · Exemplary ·

At a glance — Maturity · 48% · Weak · gated by D34, M2 ·

At a glance — Readiness · 33% · Weak · gated by P1, P3 ·

At a glance — Security · 68% · Adequate · gated by D29 ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A03:2021 — Injection14REDACTED / Critical

Roadmap

Establish a CI pipeline that builds the code and runs the test suite on every push to ensure immediate feedback. Integrate security scanning into this workflow so that regressions fail the build, while also maintaining a changelog to track release history. Finally, document key architectural decisions and add a quick-start guide to the README to help new contributors get started.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Add a CI workflow that builds and runs the test suite on every push/PR.+15.4 ptsREDACTEDCI/CD gates
Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.+15.4 ptsREDACTEDSecurity & performance tooling
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with HashUtility.java, LunisolarDate.java, HibernateAccessor.java.+7.3 ptsREDACTEDKnowledge Freshness
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+14.1 ptsREDACTEDRelease Hygiene
Resolve the 2 No assertions (empty test) finding(s) in Test Quality — start with SecurityManagerTracerTestCase.java, LuceneQueryTestCase.java.+4.7 ptsREDACTEDTest Quality
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).+8.4 ptsREDACTEDArchitecture documentation
Resolve the 2 Documentation finding(s) in Documentation Quality — start with README.md (2).+3.9 ptsREDACTEDDocumentation Quality
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.+7.5 ptsREDACTEDDocumentation (README)

File quality

Per-file score 0–10 — a quality signature. Of 298 files carrying findings, judged against the Production bar: 1% slop · 60% mixed · 39% near-clean.

FileScoreBandWorst signal
REDACTED2.4SlopStatic Analysis (SAST): REDACTED: REDACTED
REDACTED2.6SlopStatic Analysis (SAST): REDACTED: REDACTED
REDACTED2.6SlopStatic Analysis (SAST): REDACTED: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): REDACTED: REDACTED
jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/InputDefinition.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/lockable/ChainLockableStrategy.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/CommandDispatcher.java6.0MixedExplicit Debt: TodoComment
jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java6.0MixedExplicit Debt: TodoComment

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 5

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 1219

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 43

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 48

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 21 of 24 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.8 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 24 dimensions across the health lenses
D1D2D3D4D9D10D13D15D17D19D21D28D29D34D35AX10AX5M1M2M3M4P1P3P6

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1261 of 1267 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a0c722-7868-7400-9789-d2e9dc85e25d.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.java) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.java) and this repository declares a JVM test suite (repository root, Maven), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — this repository's dependency manifest (a Maven POM) is not parsed for hygiene yet, so nothing was assessed. A gap in the analyzer's language coverage, NOT a finding that the repository has no dependencies or that they are healthy.
  • D14 License Compliance — evaluation did not complete — License Compliance not included (check did not complete) — excluded from the score.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (8 contributor(s) across 1581 commit(s) sampled, automation and bot accounts excluded). One of them holds 96% of the history; the other 7 hold 0.6% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D20 ADR Quality — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The ADR expectation is gated on whether a repository ships a deployable product. Our repo-kind classifier reads .NET project files and the host and package markers of the other ecosystems it knows (a Go `package main`, a Cargo binary, a package.json `bin` or `start` script, Python console scripts or a Django/WSGI entry point, a Spring Boot / WAR / Gradle application build, a Rack or Rails app, a Composer project, an OTP release or escript, a Dockerfile, a Procfile, and the corresponding published-package manifests, including an OTP `*.app.src`), and found none here, so we could not tell what kind of repository this is and did not assess its ADR log. This is a gap in our analyzer, not a finding about this repository.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: D22 has no public-API collector for any other ecosystem, and the remedy is to write one — no change to the scan image can close it.
  • D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (go.mod, a Gemfile's ruby directive, a Dockerfile) is simply not read here yet.
  • AX3 Project dependency cycles — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which project references which — facts that live in .csproj references. This repository either commits no MSBuild project at all (its C# may still have been parsed as syntax-only projects, which carry no references between them) or its projects failed to load, so there was no graph to read. That is a gap in this analyzer's reach — not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX8 Test isolation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which projects are test projects, and what they reference — facts that live in .csproj references. This repository either commits no MSBuild project at all (its C# may still have been parsed as syntax-only projects, which carry no references between them) or its projects failed to load, so there was no graph to read. That is a gap in this analyzer's reach — not a finding that the repository is free of what this check looks for.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity7.2 / 10Strong✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 7.2 / 10 · rule-coverage 100% · ceiling Prevented

41 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was NumberIndexConverter.query at 31.

XlsxProcessor.endElement (cyclomatic 16) · ×3REDACTED:278
NumberIndexConverter.query (cyclomatic 31) · ×2jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:71
PropertyFormatAdapter.process (cyclomatic 28) · ×2jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:46
MigrationReadTask.call (cyclomatic 22) · ×2jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:61
BerkeleyManager.queryIdentities (cyclomatic 22) · ×2jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:160

+ 25 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 3 XlsxProcessor.endElement (cyclomatic 16) finding(s) in Cyclomatic Complexity — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 2 NumberIndexConverter.query (cyclomatic 31) finding(s) in Cyclomatic Complexity — start with NumberIndexConverter.java (2). — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 2 PropertyFormatAdapter.process (cyclomatic 28) finding(s) in Cyclomatic Complexity — start with PropertyFormatAdapter.java (2). — One of this dimension's main actionable groups (2 warning-level).
  4. Stand up a CI pipeline, then gate Cyclomatic Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity5.4 / 10Adequate✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.4 / 10 · rule-coverage 100% · ceiling Prevented

122 method(s) exceeded the cognitive complexity threshold of 15; the worst was PropertyFormatAdapter.process at 128.

XlsxProcessor.parseRow (cognitive 25) · ×3REDACTED:171
XlsxProcessor.startElement (cognitive 21) · ×3REDACTED:233
XlsxProcessor.endElement (cognitive 19) · ×3REDACTED:278
PropertyFormatAdapter.process (cognitive 128) · ×2jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:46
NumberIndexConverter.query (cognitive 49) · ×2jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:71

+ 85 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 3 XlsxProcessor.parseRow (cognitive 25) finding(s) in Cognitive Complexity — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 3 XlsxProcessor.startElement (cognitive 21) finding(s) in Cognitive Complexity — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 3 XlsxProcessor.endElement (cognitive 19) finding(s) in Cognitive Complexity — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
  4. Stand up a CI pipeline, then gate Cognitive Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes9.2 / 10Stronggated by 14 serious findings✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.2 / 10 · rule-coverage 100% · ceiling Prevented

14 god class(es) detected.

ClassTooLong: HashUtility · ×6jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:17
MethodTooLong: PropertyFormatAdapter.process · ×4jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:46
TooManyMethods: HashUtility · ×3jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:17
FileTooLong: hash/HashUtility.javajstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java

What to do

  1. Resolve the 6 ClassTooLong finding(s) in God Classes — start with HibernateAccessor.java (2), HashUtility.java, LunisolarDate.java. — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 4 MethodTooLong finding(s) in God Classes — start with PropertyFormatAdapter.java (2), LunisolarExpression.java, TypeParser.java. — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 3 TooManyMethods finding(s) in God Classes — start with BerkeleyAccessor.java (2), HashUtility.java. — One of this dimension's main actionable groups (3 warning-level).
  4. Stand up a CI pipeline, then gate God Classes in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication5.1 / 10Adequate✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.1 / 10 · rule-coverage 100% · ceiling Verified

697 duplicated block group(s) detected. A further 79 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (5 lines × 2) · ×63jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:72
Duplicated block (8 lines × 2) · ×49jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/cassandra/CassandraTransactionManager.java:103
Duplicated block (7 lines × 2) · ×41jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/hibernate/HibernateTransactionManager.java:66
Duplicated block (9 lines × 2) · ×40jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/elasticsearch/ElasticsearchTransactionManager.java:94
Duplicated block (6 lines × 2) · ×40jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:89

+ 176 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 63 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with BerkeleyAccessor.java (16), MyBatisAccessor.java (8), MongoAccessor.java (6). — One of this dimension's main actionable groups (63 warning-level).
  2. Resolve the 49 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with ElasticsearchAccessor.java (5), Neo4jAccessor.java (4), NumberIndexConverter.java (3). — One of this dimension's main actionable groups (49 warning-level).
  3. Resolve the 41 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with MongoAccessor.java (4), MigrationContext.java (3), MyBatisAccessor.java (2). — One of this dimension's main actionable groups (41 warning-level).
  4. Stand up a CI pipeline, then gate Code Duplication in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

272 test methods: 272 unit, 0 integration, 0 BDD, 0 e2e.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality9.0 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Prevented

0 skipped, 47 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 272 tests (1 harness-style project(s) excluded from the assertion penalty).

No assertions (empty test): testMethod · ×2jstarcraft-core-monitor/src/test/java/com/jstarcraft/core/monitor/trace/SecurityManagerTracerTestCase.java:13
No assertions: testPerformance · ×14jstarcraft-core-common/src/test/java/com/jstarcraft/core/common/conversion/csv/CsvUtilityTestCase.java:65
No direct assertions: testArray · ×31jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroContentCodecTestCase.java:35

What to do

  1. Resolve the 2 No assertions (empty test) finding(s) in Test Quality — start with SecurityManagerTracerTestCase.java, LuceneQueryTestCase.java. — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 31 No direct assertions finding(s) in Test Quality — start with AvroContentCodecTestCase.java (11), AvroTestCase.java (10), ContentCodecTestCase.java (10). — One of this dimension's main actionable groups (31 recommendation-level).
  3. Resolve the 14 No assertions finding(s) in Test Quality — start with TypeUtilityTestCase.java (2), RockMqTestCase.java (2), CsvUtilityTestCase.java. — One of this dimension's main actionable groups (14 warning-level).
  4. Stand up a CI pipeline, then gate Test Quality in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D15 · Churn × Complexity Hotspots10.0 / 10Exemplary✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D17 · Explicit Debt9.1 / 10Stronggated by 242 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.1 / 10 · rule-coverage 100% · ceiling Prevented

334 deducted task-comment markers across 68533 LoC (0.5/KLoC) → score 9.1. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×239jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:267
TodoComment repeated across 17 filesjstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/kryo/KryoContentCodec.java:47
TodoComment repeated across 18 filesjstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:123
TodoComment repeated across 14 filesjstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java:34

What to do

  1. Resolve the 239 TodoComment finding(s) in Explicit Debt — start with TypesafeConfigArray.java (32), TypesafeConfigObject.java (25), MongoAccessor.java (10). — One of this dimension's main actionable groups (239 warning-level).
  2. Resolve the 1 TodoComment repeated across 17 files finding(s) in Explicit Debt — start with KryoContentCodec.java. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 TodoComment repeated across 18 files finding(s) in Explicit Debt — start with AmqpEventChannel.java. — One of this dimension's main actionable groups (1 warning-level).
  4. Stand up a CI pipeline, then gate Explicit Debt in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation QualityStrong◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Strong / 10 · rule-coverage 100% · ceiling Documented

JStarCraft Core's README is a well-structured document with an explicit table of contents listing every section (introduction, architecture, modules, installation, usage, concepts, features, example, comparison, version, reference, protocol, author, thanks, donation) and includes license badges. It begins with a warm welcome line ('希望路过的同学...') before diving into the content, which is mostly descriptive rather than showing how to install or run it. The architecture table maps modules to their dependencies; usage examples are not yet shown in the visible portion of the document (clipped mid-table).

Documentation: no installation or build instructions · ×2README.md

What to do

  1. Resolve the 2 Documentation finding(s) in Documentation Quality — start with README.md (2). — One of this dimension's main actionable groups (2 recommendation-level).

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged REDACTED. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)3.6 / 10Weak✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 3.6 / 10 · rule-coverage 100% · ceiling Documented

14 finding(s): 0 critical, 3 high, 9 medium, 2 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (9). — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
  3. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 recommendation-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness0.0 / 10Critical✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

312 of 312 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java. Counted over 312 of the 794 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Most significant orphaned file · ×3jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java
Dormant codebase

What to do

  1. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with HashUtility.java, LunisolarDate.java, HibernateAccessor.java. — One of this dimension's main actionable groups (3 recommendation-level).
  2. Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition9.7 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

M1 · Documentation (README)6.0 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 28 of 28 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` 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.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" 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 — not evidence that nobody wrote the shape down.

What to do

  • Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

  • No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.

What to do

  • Add a CI workflow that builds and runs the test suite on every push/PR.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) — 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's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health77%StrongSolid.
Architecture99%ExemplaryStrongest area.
Maturity48%Weak — gated by D34, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness33%Weak — gated by P1, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security68%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not evidenced — 5 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 85 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — no .java test runner
  • D12 Dependency Hygiene — Not scored — this repository's dependency manifest (a Maven POM) is not parsed for hygiene yet, so nothing was assessed. A gap in the analyzer's language coverage, NOT a finding that the repository has no dependencies or that they are healthy.
  • D14 License Compliance — License Compliance not included (check did not complete)
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — Repository kind not determined
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — Production source is present (.java) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D30 Dependency Vulnerabilities — osv: the scanner produced no output at all, so no dependency was actually scanned
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D43 Malicious Dependencies — osv: the scanner produced no output at all, so no dependency was actually scanned
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
  • D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a CS/VB/GO/SCALA/SWIFT/DART class graph, and this repository's production source is .java, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 29 value object(s); a JPA/Axon/DDD domain-annotation stack (@Entity/@Aggregate/@Embeddable)
  • ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (6 CQRS handler(s))
  • ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — no CI workflow found
  • P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
  • P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
  • P8 Schema migrations — not assessed — schema-migration practice is read from a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 5 finding(s)
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D10 · Test Quality · No assertions (empty test) · ×2
  • No assertions (empty test): testMethod jstarcraft-core-monitor/src/test/java/com/jstarcraft/core/monitor/trace/SecurityManagerTracerTestCase.java:13 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): testQueryParser jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/test/java/com/jstarcraft/core/storage/lucene/LuceneQueryTestCase.java:369 — Test method has an empty body — it asserts nothing and exercises no code.
Serious — 1219 finding(s)
D17 · Explicit Debt · TodoComment · ×239
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:267 — // TODO 应该记录日志,防止丢失数据 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:298 — // TODO 此处保证单元测试 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:341 — // TODO 考虑中断策略不需要处理? 现在是由state维护. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:343 — // TODO 考虑是否再次把元素提交到队列?以及影响. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistRegionProxy.java:31 — // TODO 索引变更部分 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistRegionProxy.java:82 — // TODO 索引变更部分 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java:31 — // TODO 索引变更部分 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java:93 — // TODO 索引变更部分 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistRegionProxy.java:55 — // TODO 数据变更部分 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistRegionProxy.java:114 — // TODO 数据变更部分 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java:66 — // TODO 数据变更部分 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java:140 — // TODO 数据变更部分 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistRegionProxy.java:66 — // TODO 返回值部分 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistRegionProxy.java:143 — // TODO 返回值部分 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java:77 — // TODO 返回值部分 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java:173 — // TODO 返回值部分 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/transience/DelayedHashMap.java:94 — // TODO 考虑此处可能会阻塞清理线程 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/transience/DelayedHashMap.java:97 — // TODO 异常需要记录 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/avro/AvroDatumWriter.java:17 — // TODO 此处重写是为了修复官方JsonEncoder无法处理数组的Bug — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/avro/AvroDatumReader.java:21 — // TODO 此处重写是为了修复官方JsonDecoder无法处理数组的Bug — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/avro/converter/AvroConverter.java:88 — // TODO 考虑使用ReflectData.getSchema替代 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ObjectConverter.java:25 — // TODO 处理null — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ObjectConverter.java:46 — // TODO 处理null — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/NumberConverter.java:24 — // TODO 处理null — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/NumberConverter.java:36 — // TODO 处理null — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 214 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×63
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:72 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:72-76 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:72-76 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 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.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:51 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:51-55 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:51-55 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java` as WHOLE FILES: 100% of the shorter file's 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 4 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:51` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:119 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:119-123 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:119-123 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 119 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:119` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:125 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:125-129 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:125-129 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 119 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:204 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:204-208 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:207-211 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:325 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:325-329 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:328-332 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:325` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:341 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:341-345 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:344-348 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:341` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:104 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:104-108 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:104-108 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 148 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 `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:104` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:114 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:114-118 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:114-118 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 148 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 `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:114` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:143 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:143-147 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:143-147 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 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 `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:143` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:154 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:154-158 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:154-158 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 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 `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:154` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:332 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:332-336 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:332-336 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 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 `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:332` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:147 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:147-151 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:147-151 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:147` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:146 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:146-150 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:146-150 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:146` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:154 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:154-158 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:154-158 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:154` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:402 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:402-406 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:402-406 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:402` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/mvel/MvelExpression.java:30 — jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/mvel/MvelExpression.java:30-34 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/mvel/MvelFunction.java:41-45 — 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 — a file they already depend on, or a new one alongside them — 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 `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/mvel/MvelExpression.java:30` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bit/GlobalBitSetMap.java:59 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bit/GlobalBitSetMap.java:59-63 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bit/LocalBitSetMap.java:64-68 — 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 — a file they already depend on, or a new one alongside them — 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 `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bit/GlobalBitSetMap.java:59` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:85 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:85-89 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:85-89 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 129 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:85` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/TypeUtility.java:299 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/TypeUtility.java:299-303 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/TypeUtility.java:311-315 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/CollectionConverter.java:49 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/CollectionConverter.java:49-53 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/CollectionConverter.java:112-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/CollectionConverter.java:53 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/CollectionConverter.java:53-57 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/CollectionConverter.java:47-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/MapConverter.java:59 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/MapConverter.java:59-63 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/MapConverter.java:50-54 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `context` to `StandardReader` in one and `ThriftContext` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — 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.
  • Duplicated block (5 lines × 2) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java:86 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java:86-90 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistRegionProxy.java:75-79 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistRegionProxy.java` as WHOLE FILES: 96% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — 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 — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:344 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:344-348 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:344-348 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 297 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. 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.
  • + 38 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×49
  • Duplicated block (8 lines × 2) jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/cassandra/CassandraTransactionManager.java:103 — jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/cassandra/CassandraTransactionManager.java:103-110 | jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/cassandra/CassandraTransactionManager.java:123-130 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/cassandra/CassandraTransactionManager.java:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:218 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:218-225 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:218-225 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 202 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:218` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:239 — jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:239-246 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:230-237 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 110 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:256 — jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:256-263 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:247-254 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 110 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 `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:256` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:272 — jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:272-279 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:263-270 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 110 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 `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:272` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:290 — jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:290-297 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:281-288 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 110 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 `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:290` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:302 — jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:302-309 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:293-300 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 110 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 `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:302` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:89 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:89-96 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:89-96 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 119 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:89` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:111 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:111-118 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:111-118 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 119 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:111` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:149 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:149-156 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:149-156 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 119 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:149` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:274 — jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:274-281 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:274-281 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 221 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 `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:274` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:30 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:30-37 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:30-37 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 34 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:30` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:156 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:156-163 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:156-163 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:156` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:333 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:333-340 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:333-340 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:333` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-excel/src/main/java/com/jstarcraft/core/resource/format/XlsFormatAdapter.java:83 — jstarcraft-core-resource/jstarcraft-core-resource-excel/src/main/java/com/jstarcraft/core/resource/format/XlsFormatAdapter.java:83-90 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/ExcelFormatAdapter.java:83-90 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-excel/src/main/java/com/jstarcraft/core/resource/format/XlsFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/ExcelFormatAdapter.java` as WHOLE FILES: 91% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:88 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:88-95 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:88-95 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java` 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. 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 `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:88` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bit/GlobalByteArrayMap.java:78 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bit/GlobalByteArrayMap.java:78-85 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bit/GlobalByteArrayMap.java:92-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bloomfilter/BitMapBloomFilter.java:24 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bloomfilter/BitMapBloomFilter.java:24-31 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bloomfilter/BitMapBloomFilter.java:53-60 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:291 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:291-298 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:313-320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:180 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:180-187 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:317-324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:180` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/lockable/ChainLockableStrategy.java:62 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/lockable/ChainLockableStrategy.java:62-69 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/lockable/HashLockableStrategy.java:69-76 — 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 — a file they already depend on, or a new one alongside them — 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 `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/lockable/ChainLockableStrategy.java:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (8 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/InstantSerializer.java:21 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/InstantSerializer.java:21-28 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalDateTimeSerializer.java:22-29 — 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 — a file they already depend on, or a new one alongside them — 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 `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/InstantSerializer.java:21` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/StandardContentCodec.java:53 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/StandardContentCodec.java:53-60 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/ThriftContentCodec.java:66-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/StandardContentCodec.java:53` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/StandardContentCodec.java:79 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/StandardContentCodec.java:79-86 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/ThriftContentCodec.java:98-105 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/StandardContentCodec.java:79` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-api/src/main/java/com/jstarcraft/core/storage/ConditionType.java:35 — jstarcraft-core-storage/jstarcraft-core-storage-api/src/main/java/com/jstarcraft/core/storage/ConditionType.java:35-42 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/ConditionType.java:32-39 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-api/src/main/java/com/jstarcraft/core/storage/ConditionType.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/ConditionType.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
  • + 24 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×41
  • Duplicated block (7 lines × 2) jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/hibernate/HibernateTransactionManager.java:66 — jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/hibernate/HibernateTransactionManager.java:66-72 | jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/hibernate/HibernateTransactionManager.java:81-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:78 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:78-84 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:78-84 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:78` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:119 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:119-125 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:119-125 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:126 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:126-132 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:126-132 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:126` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:84 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:84-90 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:84-90 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 202 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:84` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:156 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:156-162 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:156-162 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 148 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 `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:156` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:203 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:203-209 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:203-209 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 148 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 `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:203` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:227 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:227-233 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:227-233 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 148 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 `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:227` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:251 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:251-257 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:251-257 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 148 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 `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:251` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:306 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:306-312 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:306-312 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 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 `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:306` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:319 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:319-325 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:319-325 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 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 `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:319` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:74 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:74-80 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:74-80 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:74` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:408 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:408-414 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:406-412 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:408` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:458 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:458-464 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:458-464 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:458` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/path/HttpPathAdapter.java:44 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/path/HttpPathAdapter.java:44-50 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/path/HttpPathAdapter.java:44-50 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/path/HttpPathAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/path/HttpPathAdapter.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:145 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:145-151 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:165-171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:300 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:300-306 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:323-329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:300` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:162 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:162-168 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:184-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:162` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:1027 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:1027-1033 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:1053-1059 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:1027` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:181 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:181-187 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:289-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:181` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:279 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:279-285 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:387-393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:279` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (7 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:307 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:307-313 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:438-444 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:307` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (7 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:363 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:363-369 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:471-477 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:363` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:461 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:461-467 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:569-575 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:461` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (7 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/MapConverter.java:41 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/MapConverter.java:41-47 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/MapConverter.java:74-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 16 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×40
  • Duplicated block (9 lines × 2) jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/elasticsearch/ElasticsearchTransactionManager.java:94 — jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/elasticsearch/ElasticsearchTransactionManager.java:94-102 | jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/elasticsearch/ElasticsearchTransactionManager.java:123-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:75 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:75-83 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:75-83 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 152 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:279 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:279-287 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:279-287 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 160 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:279` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:53 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:53-61 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:53-61 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:61 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:61-69 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:61-69 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 116 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:61` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:100 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:100-108 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:98-106 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-api/src/main/java/com/jstarcraft/core/storage/StorageCondition.java:41 — jstarcraft-core-storage/jstarcraft-core-storage-api/src/main/java/com/jstarcraft/core/storage/StorageCondition.java:41-49 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/StorageCondition.java:41-49 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-api/src/main/java/com/jstarcraft/core/storage/StorageCondition.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/StorageCondition.java` as WHOLE FILES: 100% of the shorter file's 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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceStorage.java:51 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceStorage.java:51-59 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceStorage.java:51-59 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceStorage.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceStorage.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) jstarcraft-core-io/src/main/java/com/jstarcraft/core/io/disk/DiskStreamManager.java:44 — jstarcraft-core-io/src/main/java/com/jstarcraft/core/io/disk/DiskStreamManager.java:44-52 | jstarcraft-core-io/src/main/java/com/jstarcraft/core/io/hdfs/HdfsStreamManager.java:34-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `jstarcraft-core-io/src/main/java/com/jstarcraft/core/io/disk/DiskStreamManager.java:44` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:102 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:102-110 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:102-110 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:124 — jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:124-132 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:124-132 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:182 — jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:182-190 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:182-190 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 200 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 `jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:182` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:73 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:73-81 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:73-81 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java` 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. 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 `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:73` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:537 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:537-545 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:560-568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:537` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:40 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:40-48 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:40-48 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 129 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 — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:229 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:229-237 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:411-419 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 185 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:229` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:337 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:337-345 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:519-527 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 185 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:337` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicDoubleArray.java:176 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicDoubleArray.java:176-184 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicFloatArray.java:176-184 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicDoubleArray.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicFloatArray.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicDoubleArray.java:176` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PressUtility.java:179 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PressUtility.java:179-187 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PressUtility.java:217-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PressUtility.java:179` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PressUtility.java:188` calls `flush` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PressUtility.java:226` does not — 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.
  • Duplicated block (9 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/InstantDeserializer.java:18 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/InstantDeserializer.java:18-26 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalDateTimeDeserializer.java:20-28 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/MonthDaySerializer.java:22 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/MonthDaySerializer.java:22-30 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/YearMonthSerializer.java:22-30 — 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 — a file they already depend on, or a new one alongside them — 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 `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/MonthDaySerializer.java:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/ThriftContentCodec.java:80 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/ThriftContentCodec.java:80-88 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/xml/XmlContentCodec.java:71-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/ThriftContentCodec.java:80` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionContext.java:54 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionContext.java:54-62 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionContext.java:54-62 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionContext.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionContext.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:400 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:400-408 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:400-408 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 297 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. 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.
  • Duplicated block (9 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java:32 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java:32-40 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java:32-40 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 149 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. 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.
  • + 15 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×40
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:89 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:89-94 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:92-97 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:89` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:242 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:242-247 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:245-250 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:242` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:54 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:54-59 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:54-59 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:54` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:348 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:348-353 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:346-351 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:348` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:465 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:465-470 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:463-468 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:465` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:159 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:159-164 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:159-164 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 133 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.
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:362 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:362-367 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:362-367 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:362` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:394 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:394-399 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:394-399 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:394` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:407 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:407-412 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:407-412 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:407` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-excel/src/main/java/com/jstarcraft/core/resource/format/XlsFormatAdapter.java:43 — jstarcraft-core-resource/jstarcraft-core-resource-excel/src/main/java/com/jstarcraft/core/resource/format/XlsFormatAdapter.java:43-48 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/ExcelFormatAdapter.java:43-48 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-excel/src/main/java/com/jstarcraft/core/resource/format/XlsFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/ExcelFormatAdapter.java` as WHOLE FILES: 91% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-resource/jstarcraft-core-resource-excel/src/main/java/com/jstarcraft/core/resource/format/XlsFormatAdapter.java:43` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-xml/src/main/java/com/jstarcraft/core/resource/format/XmlFormatAdapter.java:28 — jstarcraft-core-resource/jstarcraft-core-resource-xml/src/main/java/com/jstarcraft/core/resource/format/XmlFormatAdapter.java:28-33 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/XmlFormatAdapter.java:28-33 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-xml/src/main/java/com/jstarcraft/core/resource/format/XmlFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/XmlFormatAdapter.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-resource/jstarcraft-core-resource-xml/src/main/java/com/jstarcraft/core/resource/format/XmlFormatAdapter.java:28` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java1Storage.java:170 — jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java1Storage.java:170-176 | jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java2Storage.java:266-271 — before extracting anything, compare `jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java1Storage.java` and `jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java2Storage.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java1Storage.java:178` calls `isBlank`, `getClass`, `getSimpleName` and `jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java2Storage.java:273` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpMessageDecoder.java:40 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpMessageDecoder.java:40-45 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpMessageEncoder.java:35-40 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:242 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:242-247 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java:280-285 — before extracting anything, compare `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 125 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:242` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:210 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:210-215 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:360-365 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:210` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/TermExpression.java:165 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/TermExpression.java:165-170 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/TermExpression.java:228-233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/TermExpression.java:165` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/TermExpression.java:201 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/TermExpression.java:201-206 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/TermExpression.java:264-269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/TermExpression.java:201` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (6 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/MapConverter.java:51 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/MapConverter.java:51-56 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/MapConverter.java:131-136 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `context` to `StandardReader` in one and `StandardWriter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — 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.
  • Duplicated block (6 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/CollectionConverter.java:42 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/CollectionConverter.java:42-47 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/CollectionConverter.java:71-76 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PersistenceElement.java:75 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PersistenceElement.java:75-80 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PersistenceElement.java:95-100 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PersistenceElement.java:75` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:274 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:274-279 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:274-279 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 297 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. 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.
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:57 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:57-62 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:57-62 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java` as WHOLE FILES: 100% of the shorter file's 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 4 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:107 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:107-112 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:110-115 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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. 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.
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:294 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:294-299 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:294-299 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 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. 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.
  • Duplicated block (6 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:463 — jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:463-468 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:463-468 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 221 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.
  • + 15 more in this group — see findings.md.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×33
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:149 — jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:149-195 | jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:198-235 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:140-186 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:189-226 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:250 — jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:250-263 | jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:266-279 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:241-254 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:257-270 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:44 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:44-55 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:153-161 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:44-55 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:153-161 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java:28 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java:28-44 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/BooleanSortConverter.java:28-44 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java:28-44 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/BooleanSortConverter.java:28-44 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:36 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:36-68 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:31-63 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:36-68 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:31-63 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:194 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:194-229 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:232-247 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:197-232 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:235-250 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:214 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:214-247 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:258-287 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:214-247 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:258-287 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:102 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:102-149 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:176-215 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:102-149 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:176-215 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:104 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:104-127 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:129-151 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:104-127 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:129-151 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:121 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:121-162 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:165-198 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:121-162 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:165-198 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:161 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:161-208 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:211-242 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:161-208 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:211-242 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java:26 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java:26-50 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/ObjectSortConverter.java:26-50 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java:26-50 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/ObjectSortConverter.java:26-50 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:146 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:146-168 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:176-220 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:146-168 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:176-220 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:161 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:161-173 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:173-185 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:158-170 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:173-185 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:122 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:122-159 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:134-171 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:119-156 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:134-171 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:64 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:64-82 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:69-91 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:64-79 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:69-91 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:160 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:160-229 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:231-300 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:160-229 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:231-300 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-resource/jstarcraft-core-resource-json/src/main/java/com/jstarcraft/core/resource/format/JsonFormatAdapter.java:34 — jstarcraft-core-resource/jstarcraft-core-resource-json/src/main/java/com/jstarcraft/core/resource/format/JsonFormatAdapter.java:34-42 | jstarcraft-core-resource/jstarcraft-core-resource-yaml/src/main/java/com/jstarcraft/core/resource/format/YamlFormatAdapter.java:34-42 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/JsonFormatAdapter.java:34-42 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/YamlFormatAdapter.java:34-42 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:113 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:113-143 | jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:165-200 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:113-143 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:165-200 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:112 — jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:112-140 | jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:158-187 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:112-140 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:158-187 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:103 — jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:103-115 | jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:104-116 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:103-115 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:104-116 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:38 — jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:38-63 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:61-87 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:38-63 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:61-87 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:119 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:119-156 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:110-141 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:119-156 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:110-141 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:159 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:159-171 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:144-156 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:159-171 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:144-156 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:70 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:70-81 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:83-95 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:70-81 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:83-95 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • + 8 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×32
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:283 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:283-292 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:283-292 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 297 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:54 — jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:54-63 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:50-59 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:160 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:160-169 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:160-169 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 119 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:160` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/LuceneContext.java:161 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/LuceneContext.java:161-170 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/LuceneContext.java:161-170 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/LuceneContext.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/LuceneContext.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:65 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:65-74 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:68-77 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:238 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:238-247 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:238-247 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 160 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:238` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:246 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:246-255 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:246-255 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:101 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:101-110 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:101-110 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 116 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:101` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:54 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:54-63 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:54-63 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 108 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:54` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:73 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:73-82 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:70-79 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:73` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:68` calls `getString` and `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:71` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:86 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:86-95 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:83-92 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:165 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:165-174 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:163-172 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:165` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-csv/src/main/java/com/jstarcraft/core/resource/format/CsvFormatAdapter.java:33 — jstarcraft-core-resource/jstarcraft-core-resource-csv/src/main/java/com/jstarcraft/core/resource/format/CsvFormatAdapter.java:33-42 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/CsvFormatAdapter.java:33-42 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-csv/src/main/java/com/jstarcraft/core/resource/format/CsvFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/CsvFormatAdapter.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-resource/jstarcraft-core-resource-csv/src/main/java/com/jstarcraft/core/resource/format/CsvFormatAdapter.java:33` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceStorage.java:30 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceStorage.java:30-39 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceStorage.java:30-39 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceStorage.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceStorage.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) jstarcraft-core-io/src/main/java/com/jstarcraft/core/io/disk/DiskStreamManager.java:39 — jstarcraft-core-io/src/main/java/com/jstarcraft/core/io/disk/DiskStreamManager.java:39-48 | jstarcraft-core-io/src/main/java/com/jstarcraft/core/io/git/GitLocalStreamManager.java:41-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `jstarcraft-core-io/src/main/java/com/jstarcraft/core/io/disk/DiskStreamManager.java:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jstarcraft-core-io/src/main/java/com/jstarcraft/core/io/git/GitLocalStreamManager.java:51` calls `getFileName`, `add`, `addFilepattern` and `jstarcraft-core-io/src/main/java/com/jstarcraft/core/io/disk/DiskStreamManager.java:49` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:259 — jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:259-268 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:259-268 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:113 — jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:113-122 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:113-122 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:267 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:267-276 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java:309-318 — before extracting anything, compare `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 97 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:267` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:120 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:120-129 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:266-275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PressUtility.java:126 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PressUtility.java:126-135 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PressUtility.java:146-155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PressUtility.java:126` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/path/IoPathAdapter.java:13 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/path/IoPathAdapter.java:13-22 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/path/IoPathAdapter.java:13-22 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/path/IoPathAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/path/IoPathAdapter.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:101 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:101-110 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:101-110 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 297 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.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:165 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:165-174 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:165-174 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 97 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.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:257 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:257-266 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:257-266 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 97 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.
  • Duplicated block (10 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:182 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:182-191 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:182-191 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 97 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.
  • + 7 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×24
  • Duplicated block (12 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:53 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:53-64 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:53-64 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:72 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:72-83 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:72-83 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 119 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (12 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:81 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:81-92 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:81-92 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 57 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 `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:323 — jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:323-334 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:323-334 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 221 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 `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:323` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:622 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:622-633 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:620-631 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:622` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyAccessorFactory.java:72 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyAccessorFactory.java:72-83 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyAccessorFactory.java:72-83 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyAccessorFactory.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyAccessorFactory.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:62 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:62-73 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:62-73 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:62` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:145 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:145-156 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:145-156 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 133 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:145` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyVersion.java:45 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyVersion.java:45-56 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyVersion.java:45-56 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyVersion.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyVersion.java` as WHOLE FILES: 100% of the shorter file's 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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyIdentification.java:31 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyIdentification.java:31-42 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyIdentification.java:31-42 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyIdentification.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyIdentification.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:239 — jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:239-250 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:239-250 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 232 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 `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:239` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:122 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:122-133 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:122-133 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 213 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:256 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:256-267 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:256-267 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 213 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:106 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:106-117 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:106-117 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 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 `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:144 — jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:144-155 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:144-155 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 181 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:136 — jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:136-147 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:136-147 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:96 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:96-107 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:96-107 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ArrayConverter.java:28 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ArrayConverter.java:28-39 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:261-272 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ArrayConverter.java:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ArrayConverter.java:40` calls `getRawType` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:273` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/MonthDayDeserializer.java:17 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/MonthDayDeserializer.java:17-28 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/YearMonthDeserializer.java:17-28 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheAccessorProcessor.java:43 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheAccessorProcessor.java:43-54 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheAccessorProcessor.java:64-75 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheAccessorProcessor.java:43` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyExpression.java:61 — jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyExpression.java:61-72 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/ruby/RubyExpression.java:75-86 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12 lines × 2) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsExpression.java:60 — jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsExpression.java:60-71 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/lua/LuaExpression.java:60-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicDoubleArray.java:215 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicDoubleArray.java:215-226 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicFloatArray.java:215-226 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicDoubleArray.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicFloatArray.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicDoubleArray.java:199 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicDoubleArray.java:199-210 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicFloatArray.java:199-210 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicDoubleArray.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/AtomicFloatArray.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×21
  • Duplicated block (11 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:233 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:233-243 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:233-243 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:81 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:81-91 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:81-91 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 99 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.
  • Duplicated block (11 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:125 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:125-135 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:128-138 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:200 — jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:200-210 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:200-210 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:214 — jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:214-224 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:214-224 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:112 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:112-122 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:110-120 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:214 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:214-224 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:212-222 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:214` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:230 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:230-240 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:228-238 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:230` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:655 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:655-665 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:653-663 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:655` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:114 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:114-124 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:114-124 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 133 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:114` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:196 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:196-206 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:196-206 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 133 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:196` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:98 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:98-108 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:98-108 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:111 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:111-121 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:111-121 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/FormatDefinition.java:52 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/FormatDefinition.java:52-62 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/FormatDefinition.java:52-62 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/FormatDefinition.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/FormatDefinition.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:182 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:182-192 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java:207-217 — before extracting anything, compare `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 125 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 — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ArrayConverter.java:58 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ArrayConverter.java:58-68 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:116-126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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 `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ArrayConverter.java:58` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ArrayConverter.java:69` calls `getRawType` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:127` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:158 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:158-168 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:173-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:158` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:156` calls `getResources` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:172` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java:117 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java:117-127 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:119-129 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 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 — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java:141 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java:141-151 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:143-153 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 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 — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:194 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:194-204 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:194-204 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 184 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.
  • Duplicated block (11 lines × 2) jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/hibernate/HibernateTransactionManager.java:52 — jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/hibernate/HibernateTransactionManager.java:52-62 | jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/mongo/MongoTransactionManager.java:56-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×19
  • Duplicated block (17 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:100 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:100-116 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:100-116 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:414 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:414-430 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:414-430 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 297 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:213 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:213-229 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:213-229 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:70 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:70-86 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:70-86 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:70` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:120 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:120-136 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:120-136 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 99 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:120` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (17 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:297 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:297-313 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:297-313 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:111 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:111-127 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:111-127 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:111` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:117 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:117-133 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:117-133 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 94 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 `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:117` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (17 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:111 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:111-127 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:111-127 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 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 `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:111` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (17 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:59 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:59-75 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:59-75 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:83 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:83-99 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:83-99 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 116 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:61 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:61-77 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:61-77 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:165 — jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:165-181 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:165-181 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java:42 — jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java:42-58 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java:42-58 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:175 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:175-191 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:175-191 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:89 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:89-105 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java:91-107 — before extracting anything, compare `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 97 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:276 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:276-292 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java:314-330 — before extracting anything, compare `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 125 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 — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:122 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:122-138 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:143-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:122` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:120` calls `getResources` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:142` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/kryo/KryoContentCodec.java:75 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/kryo/KryoContentCodec.java:75-91 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/kryo/KryoContentCodec.java:99-115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/kryo/KryoContentCodec.java:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/kryo/KryoContentCodec.java:74` calls `try`, `Input` and `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/kryo/KryoContentCodec.java:98` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×17
  • Duplicated block (13 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:136 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:136-148 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:136-148 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 152 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:195 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:195-207 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:195-207 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 202 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:195` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:143 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:143-155 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:143-155 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 115 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:143` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:211 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:211-223 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:214-226 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:211` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:82 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:82-94 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:82-94 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 107 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:82` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:160 — jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:160-172 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:160-172 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:95 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:95-107 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:95-107 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:638 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:638-650 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:636-648 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:638` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:134 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:134-146 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:134-146 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:134` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:124 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:124-136 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:124-136 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:48 — jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:48-60 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:48-60 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 232 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 `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:88 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:88-100 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:88-100 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 110 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.
  • Duplicated block (13 lines × 2) jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:88 — jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:88-100 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:88-100 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:71 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:71-83 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:71-83 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 129 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:71` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:256 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:256-268 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:438-450 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 185 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:256` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:99 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:99-111 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java:105-117 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 102 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:99` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:173 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:173-185 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:173-185 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 213 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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×15
  • Duplicated block (16 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:130 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:130-145 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:130-145 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 119 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:130` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (16 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:56 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:56-71 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:56-71 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:136 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:136-151 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:136-151 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:136` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:73 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:73-88 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:73-88 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:73` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (16 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyAccessorFactory.java:53 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyAccessorFactory.java:53-68 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyAccessorFactory.java:53-68 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyAccessorFactory.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyAccessorFactory.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:129 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:129-144 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:129-144 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 133 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:129` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:466 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:466-481 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:466-481 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:466` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:195 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:195-210 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:195-210 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 213 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:147 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:147-162 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:147-162 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:211 — jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:211-226 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:211-226 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:185 — jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:185-200 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:185-200 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:216 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:216-231 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:263-278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:216` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:324 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:324-339 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:371-386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:324` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:398 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:398-413 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:445-460 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:398` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:506 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:506-521 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:553-568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:506` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×15
  • Duplicated block (15 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java:30 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java:30-44 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java:30-44 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java:30` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:154 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:154-168 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:154-168 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:308 — jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:308-322 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:308-322 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 221 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 `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:308` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/BooleanSortConverter.java:30 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/BooleanSortConverter.java:30-44 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/BooleanSortConverter.java:30-44 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/BooleanSortConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/BooleanSortConverter.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/BooleanSortConverter.java:30` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:69 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:69-83 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:69-83 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 133 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:69` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:369 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:369-383 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:369-383 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:369` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (15 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:67 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:67-81 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:67-81 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 213 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java:139 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java:139-153 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java:139-153 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:193 — jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:193-207 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:193-207 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryTopicEventChannel.java:36 — jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryTopicEventChannel.java:36-50 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/memory/MemoryTopicEventChannel.java:36-50 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryTopicEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/memory/MemoryTopicEventChannel.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:39 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:39-53 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:39-53 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:146 — jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:146-160 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:146-160 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/configuration/string/JsonConfigurator.java:35 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/configuration/string/JsonConfigurator.java:35-49 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/configuration/string/YamlConfigurator.java:35-49 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/configuration/string/JsonConfigurator.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/configuration/string/YamlConfigurator.java` as WHOLE FILES: 86% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/configuration/string/JsonConfigurator.java:35` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:316 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:316-330 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:498-512 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 185 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:316` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/lockable/ChainLockableStrategy.java:29 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/lockable/ChainLockableStrategy.java:29-43 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/lockable/HashLockableStrategy.java:32-46 — 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 — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×15
  • Duplicated block (14 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:224 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:224-237 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:224-237 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:251 — jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:251-264 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:251-264 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 221 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 `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:251` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:281 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:281-294 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:279-292 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:281` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:604 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:604-617 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:602-615 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:604` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:100 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:100-113 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:100-113 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 213 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:118 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:118-131 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:118-131 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 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 `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:132 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:132-145 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:132-145 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 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 `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:132` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (14 lines × 2) jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java1Storage.java:182 — jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java1Storage.java:182-195 | jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java2Storage.java:273-286 — before extracting anything, compare `jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java1Storage.java` and `jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java2Storage.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java1Storage.java:178` calls `isBlank`, `getClass`, `getSimpleName` and `jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java2Storage.java:271` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 2) jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java:79 — jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java:79-92 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java:79-92 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java:96 — jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java:96-109 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java:96-109 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisTopicEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:88 — jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:88-101 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:88-101 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:208 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:208-221 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:390-403 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 185 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:208` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:364 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:364-377 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:546-559 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 185 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:364` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PromptPersistenceManager.java:127 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PromptPersistenceManager.java:127-140 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PromptPersistenceManager.java:180-193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PromptPersistenceManager.java:127` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (14 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/path/ClassPathAdapter.java:11 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/path/ClassPathAdapter.java:11-24 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/path/ClassPathAdapter.java:11-24 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/path/ClassPathAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/path/ClassPathAdapter.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
D10 · Test Quality · No assertions · ×14
  • No assertions: testPerformance jstarcraft-core-common/src/test/java/com/jstarcraft/core/common/conversion/csv/CsvUtilityTestCase.java:65 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testConvertType jstarcraft-core-common/src/test/java/com/jstarcraft/core/common/conversion/json/JsonUtilityTestCase.java:34 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testStringCollision jstarcraft-core-common/src/test/java/com/jstarcraft/core/common/hash/HashUtilityTestCase.java:198 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testPerformance jstarcraft-core-common/src/test/java/com/jstarcraft/core/common/lockable/CompareLockTestCase.java:92 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testConvertString jstarcraft-core-common/src/test/java/com/jstarcraft/core/common/reflection/TypeUtilityTestCase.java:122 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testConvertType jstarcraft-core-common/src/test/java/com/jstarcraft/core/common/reflection/TypeUtilityTestCase.java:72 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testMessageCodec jstarcraft-core-communication/src/test/java/com/jstarcraft/core/communication/message/CommunicationMessageTestCase.java:28 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testConnect jstarcraft-core-communication/src/test/java/com/jstarcraft/core/communication/netty/NettyTestCase.java:151 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testQueue jstarcraft-core-event/jstarcraft-core-event-rocket/src/test/java/com/jstarcraft/core/event/rocket/RockMqTestCase.java:44 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testTopic jstarcraft-core-event/jstarcraft-core-event-rocket/src/test/java/com/jstarcraft/core/event/rocket/RockMqTestCase.java:78 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: waiveResource jstarcraft-core-io/src/test/java/com/jstarcraft/core/io/git/GitLocalStreamManagerTest.java:90 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: test jstarcraft-core-monitor/src/test/java/com/jstarcraft/core/monitor/measure/MicrometerTestCase.java:16 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testMigrate jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/test/java/com/jstarcraft/core/storage/berkeley/migration/MigrationTestCase.java:44 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testTransactor jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/test/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessorTestCase.java:123 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×12
  • Duplicated block (7 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:251 — jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:251-257 | jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:267-273 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:242-248 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:258-264 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 110 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 `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:251` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java:29 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java:29-35 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/BooleanSortConverter.java:29-35 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java:29-35 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/BooleanSortConverter.java:29-35 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/BooleanIndexConverter.java:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:34 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:34-40 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/InstantSortConverter.java:35-41 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:34-40 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/InstantSortConverter.java:35-41 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:37 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:37-43 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:32-38 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:37-43 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:32-38 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 119 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:346 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:346-352 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:362-368 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:346-352 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:362-368 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 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 `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:346` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:40 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:40-46 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:67-73 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:40-46 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:67-73 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:39` calls `getInstance` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:65` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:81 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:81-87 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:91-97 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:81-87 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:91-97 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 31 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 — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:153 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:153-159 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:203-209 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:153-159 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:203-209 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 96 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:153` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:118 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:118-124 | jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:132-138 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:118-124 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:132-138 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 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 `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:215 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:215-221 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:262-268 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:397-403 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:444-450 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 185 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:215` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/CollectionConverter.java:28 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/CollectionConverter.java:28-34 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/EnumerationConverter.java:23-29 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/MapConverter.java:29-35 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ObjectConverter.java:26-33 — 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 — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
  • Duplicated block (7 lines × 4) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java:79 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java:79-85 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayFloat.java:79-85 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayInteger.java:79-85 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayLong.java:79-85 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayFloat.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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 — extracting one helper per block leaves the fork in place. 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.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×10
  • Duplicated block (20 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:112 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:112-131 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:112-131 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 152 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:112` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneSearcher.java:41 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneSearcher.java:41-60 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneSearcher.java:41-60 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneSearcher.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneSearcher.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:34 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:34-53 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:34-53 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 108 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:48 — jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:48-67 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:48-67 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:39 — jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:39-58 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:39-58 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 92 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 `jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:77 — jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:77-96 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:77-96 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:236 — jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:236-255 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:236-255 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:123 — jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:123-142 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:123-142 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:314 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:314-333 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java:345-364 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 102 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:314` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/path/ZipPathAdapter.java:14 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/path/ZipPathAdapter.java:14-33 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/path/ZipPathAdapter.java:14-33 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/path/ZipPathAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/path/ZipPathAdapter.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×10
  • Duplicated block (8 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:59 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:59-66 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:70-77 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:59-66 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:70-77 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `Version` names `com.baomidou.mybatisplus.annotation.Version` in one and `javax.persistence.Version` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:72 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:72-79 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:80-87 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:69-76 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:80-87 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java` and `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 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 — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:88` calls `String` and `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:80` does not — 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.
  • Duplicated block (8 lines × 4) jstarcraft-core-resource/jstarcraft-core-resource-json/src/main/java/com/jstarcraft/core/resource/format/JsonFormatAdapter.java:35 — jstarcraft-core-resource/jstarcraft-core-resource-json/src/main/java/com/jstarcraft/core/resource/format/JsonFormatAdapter.java:35-42 | jstarcraft-core-resource/jstarcraft-core-resource-yaml/src/main/java/com/jstarcraft/core/resource/format/YamlFormatAdapter.java:35-42 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/JsonFormatAdapter.java:35-42 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/YamlFormatAdapter.java:35-42 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-json/src/main/java/com/jstarcraft/core/resource/format/JsonFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/JsonFormatAdapter.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 4) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:323 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:323-330 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:370-377 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:505-512 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:552-559 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 185 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:323` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 4) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalDateDeserializer.java:19 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalDateDeserializer.java:19-26 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalTimeDeserializer.java:19-26 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/OffsetTimeDeserializer.java:22-29 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/PeriodDeserializer.java:19-26 — 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 — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalDateDeserializer.java:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/OffsetTimeDeserializer.java:30` calls `readInt` and `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalDateDeserializer.java:27` does not — 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.
  • Duplicated block (8 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:40 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:40-47 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/StringStoreConverter.java:38-45 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:40-47 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/StringStoreConverter.java:38-45 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/StringStoreConverter.java` as WHOLE FILES: 91% of the shorter file's 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 4 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — 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 — extracting one helper per block leaves the fork in place. 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.
  • Duplicated block (8 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:32 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:32-39 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:41-48 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:32-39 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:41-48 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 114 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. 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 first that the copies are not typed on the same thing: the declarations holding them bind `oldArray` to `boolean[]` in one and `Boolean[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — 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.
  • Duplicated block (8 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:50 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:50-57 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:68-75 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:50-57 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:68-75 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 114 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. 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 first that the copies are not typed on the same thing: the declarations holding them bind `oldArray` to `byte[]` in one and `short[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — 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.
  • Duplicated block (8 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:59 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:59-66 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:77-84 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:59-66 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:77-84 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 114 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. 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 first that the copies are not typed on the same thing: the declarations holding them bind `oldArray` to `Byte[]` in one and `Short[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — 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.
  • Duplicated block (8 lines × 4) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileNavigator.java:149 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileNavigator.java:149-156 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/html/HtmlNavigator.java:175-182 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/mind/TopicNavigator.java:149-156 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/swing/SwingNavigator.java:149-156 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileNavigator.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/mind/TopicNavigator.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×10
  • Duplicated block (8 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:194 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:194-201 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:196-203 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:376-383 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 129 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:194` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:195` calls `getLeapMonth` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:193` does not — 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.
  • Duplicated block (8 lines × 3) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/CsvContentCodec.java:40 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/CsvContentCodec.java:40-47 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/HessianContentCodec.java:110-117 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/StandardContentCodec.java:39-46 — 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 — a location they all depend on today, or a new shared one if there is none — 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 `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/CsvContentCodec.java:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/ArrayConverter.java:39 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/ArrayConverter.java:39-46 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/CollectionConverter.java:39-46 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/MapConverter.java:40-47 — 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 — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/ArrayConverter.java:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PromptPersistenceManager.java:127 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PromptPersistenceManager.java:127-134 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PromptPersistenceManager.java:151-158 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PromptPersistenceManager.java:180-187 — 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 — 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 `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PromptPersistenceManager.java:127` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) REDACTED:223 — REDACTED:223-230 | REDACTED:223-230 | REDACTED:223-230 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 199 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.
  • Duplicated block (8 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileAttributeNode.java:31 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileAttributeNode.java:31-38 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/mind/TopicAttributeNode.java:31-38 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/swing/SwingAttributeNode.java:29-36 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileAttributeNode.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/mind/TopicAttributeNode.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 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.
  • Duplicated block (8 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileAttributeNode.java:40 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileAttributeNode.java:40-47 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/mind/TopicAttributeNode.java:40-47 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/swing/SwingAttributeNode.java:38-45 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileAttributeNode.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/mind/TopicAttributeNode.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 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.
  • Duplicated block (8 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileNavigator.java:183 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileNavigator.java:183-190 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/mind/TopicNavigator.java:183-190 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/swing/SwingNavigator.java:183-190 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileNavigator.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/mind/TopicNavigator.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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. 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.
  • Duplicated block (8 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileNavigator.java:60 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileNavigator.java:60-67 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/mind/TopicNavigator.java:60-67 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/swing/SwingNavigator.java:60-67 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileNavigator.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/mind/TopicNavigator.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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.
  • Duplicated block (8 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileNavigator.java:70 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileNavigator.java:70-77 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/mind/TopicNavigator.java:70-77 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/swing/SwingNavigator.java:70-77 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/file/FileNavigator.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/mind/TopicNavigator.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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.
D29 · Static Analysis (SAST) · REDACTED · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×8
  • Duplicated block (31 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:38 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:38-68 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:38-68 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 119 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:38` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (31 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jMetadata.java:49 — jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jMetadata.java:49-79 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jMetadata.java:49-79 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jMetadata.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (31 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:67 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:67-97 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:67-97 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (31 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:33 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:33-63 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:33-63 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:33` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (31 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:214 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:214-244 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:214-244 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 213 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (31 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:67 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:67-97 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:67-97 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 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 `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/PropertyAccessor.java:67` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (31 lines × 2) jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:102 — jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:102-132 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:102-132 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (31 lines × 2) jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:136 — jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:136-166 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:136-166 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×8
  • Duplicated block (24 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionAspect.java:32 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionAspect.java:32-55 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionAspect.java:32-55 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionAspect.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionAspect.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (24 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:52 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:52-75 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:52-75 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 115 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (24 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:106 — jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:106-129 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:106-129 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (24 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:35 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:35-58 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:35-58 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 116 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:73 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:73-96 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:73-96 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 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.
  • Duplicated block (24 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:109 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:109-132 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:109-132 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:109` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:169 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:169-192 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:169-192 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 133 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:169` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (24 lines × 2) jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:45 — jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:45-68 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:45-68 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×8
  • Duplicated block (18 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:53 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:53-70 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:53-70 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 152 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:139 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:139-156 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java:139-156 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationContext.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:78 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:78-95 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:78-95 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/ObjectSortConverter.java:27 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/ObjectSortConverter.java:27-44 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/ObjectSortConverter.java:27-44 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/ObjectSortConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/ObjectSortConverter.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/ObjectSortConverter.java:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java:27 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java:27-44 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java:27-44 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:39 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:39-56 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:39-56 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:39` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:194 — jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:194-211 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:194-211 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:215 — jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:215-232 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:215-232 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×8
  • Duplicated block (5 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:70 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:70-74 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:81-85 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:70-74 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:81-85 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:70` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:273 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:273-277 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:368-372 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:276-280 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:371-375 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:273` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:296 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:296-300 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:388-392 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:299-303 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:391-395 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:296` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:203 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:203-207 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:309-313 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:203-207 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:309-313 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 148 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.
  • Duplicated block (5 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:350 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:350-354 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:467-471 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:348-352 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:465-469 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:350` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:71 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:71-75 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:84-88 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:71-75 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:84-88 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java` 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. 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 `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:71` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:90` calls `putUserProperty`, `valueOf` and `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventProducer.java:77` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 4) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyExpression.java:42 — jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyExpression.java:42-46 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyFunction.java:39-43 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/kotlin/KotlinExpression.java:38-42 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/kotlin/KotlinFunction.java:39-43 — before extracting anything, compare `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyFunction.java` and `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/kotlin/KotlinFunction.java` as WHOLE FILES: 87% of the shorter file's 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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyExpression.java:42` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsExpression.java:42 — jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsExpression.java:42-46 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsFunction.java:39-43 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/lua/LuaExpression.java:42-46 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/lua/LuaFunction.java:45-49 — 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 — a location they all depend on today, or a new shared one if there is none — 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 `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsExpression.java:42` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×7
  • Duplicated block (22 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:89 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:89-110 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:89-110 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 152 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:235 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:235-256 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:235-256 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 202 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.
  • Duplicated block (22 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:32 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:32-53 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:32-53 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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.
  • Duplicated block (22 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:147 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:147-168 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:147-168 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (22 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:70 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:70-91 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:70-91 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (22 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceMonitor.java:43 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceMonitor.java:43-64 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceMonitor.java:43-64 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceMonitor.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceMonitor.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (22 lines × 2) jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:98 — jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:98-119 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:98-119 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×7
  • Duplicated block (19 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionContext.java:71 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionContext.java:71-89 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionContext.java:71-89 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionContext.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/aspect/TransactionContext.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:173 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:173-191 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:173-191 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 152 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:173` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:158 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:158-176 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:158-176 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:72 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:72-90 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:72-90 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:50 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:50-68 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:50-68 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 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 `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (19 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:572 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:572-590 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:570-588 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:572` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/hazelcast/HazelcastTransactionDefinition.java:24 — jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/hazelcast/HazelcastTransactionDefinition.java:24-42 | jstarcraft-core-transaction/src/main/java/com/jstarcraft/core/transaction/hibernate/HibernateTransactionDefinition.java:38-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — 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.
D3 · God Classes · ClassTooLong · ×6
  • ClassTooLong: HashUtility jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:17 — ClassTooLong — 499 significant lines (blank, comment-only and punctuation-only lines excluded), 58 methods. The bar is 400 significant lines; this is 99 over it, 1.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LunisolarDate jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarDate.java:15 — ClassTooLong — 456 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 56 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TypeParser jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/TypeParser.java:15 — ClassTooLong — 450 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 50 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: HibernateAccessor jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:49 — ClassTooLong — 409 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 9 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: HibernateAccessor jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:49 — ClassTooLong — 406 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 6 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SolarExpression jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:23 — ClassTooLong — 401 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 1 over it, 1.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×6
  • Duplicated block (28 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:83 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:83-110 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:83-110 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 115 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.
  • Duplicated block (28 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java:32 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java:32-59 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java:32-59 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java:32` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (28 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneSearcher.java:64 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneSearcher.java:64-91 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneSearcher.java:64-91 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneSearcher.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneSearcher.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (28 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:181 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:181-208 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:181-208 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 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 `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:181` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (28 lines × 2) jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:113 — jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:113-140 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:113-140 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 181 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (28 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:114 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:114-141 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:114-141 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 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 `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:114` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×6
  • Duplicated block (23 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:225 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:225-247 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:225-247 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 152 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:225` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:35 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:35-57 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:35-57 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 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.
  • Duplicated block (23 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:65 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:65-87 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:65-87 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 96 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:88 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:88-110 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:88-110 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 133 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:88` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (23 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:212 — jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:212-234 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:212-234 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 232 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 `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:212` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) jstarcraft-core-event/jstarcraft-core-event-api/src/main/java/com/jstarcraft/core/event/AbstractEventProducer.java:20 — jstarcraft-core-event/jstarcraft-core-event-api/src/main/java/com/jstarcraft/core/event/AbstractEventProducer.java:20-42 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/AbstractEventProducer.java:20-42 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-api/src/main/java/com/jstarcraft/core/event/AbstractEventProducer.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/AbstractEventProducer.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×6
  • Duplicated block (21 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:125 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:125-145 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:125-145 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:55 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:55-75 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:55-75 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 57 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 `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:55` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:539 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:539-559 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:537-557 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:539` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:190 — jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:190-210 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:190-210 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 232 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 `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:252 — jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:252-272 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:252-272 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 232 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 `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:252` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:100 — jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:100-120 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:100-120 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×6
  • Duplicated block (6 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:195 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:195-200 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:233-238 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:198-203 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:236-241 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:195` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:83 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:83-88 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:77-82 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:83-88 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:77-82 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java` and `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:49 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:49-54 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:54-59 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:49-54 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:54-59 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 31 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:164 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:164-169 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:235-240 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:164-169 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:235-240 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:164` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:173 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:173-178 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:244-249 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:173-178 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:244-249 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:173` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:70 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:70-77 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:70-77 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:113-120 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/TermExpression.java:98-103 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 129 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) · ×5
  • Members sharing a duplicated core (12 members, 50+ identical tokens) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:87 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:87-114 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:70-97 | jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:50-77 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:50-77 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:51-79 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:50-77 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:50-77 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:49-71 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:51-79 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:50-77 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:50-77 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:49-71 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
  • Members sharing a duplicated core (12 members, 50+ identical tokens) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:118 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:118-187 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:100-187 | jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:87-141 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:87-141 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:82-155 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:80-136 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:80-133 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:74-127 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:82-155 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:80-136 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:80-133 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:74-127 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
  • Members sharing a duplicated core (12 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:264 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:264-284 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:287-307 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:316-329 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:332-345 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:359-376 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:379-396 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:267-287 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:290-310 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:319-332 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:335-348 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:362-379 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:382-399 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
  • Members sharing a duplicated core (12 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:212 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:212-233 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:236-257 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:267-284 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:287-304 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:328-359 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:362-393 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:212-233 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:236-257 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:267-284 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:287-304 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:328-359 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:362-393 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
  • Members sharing a duplicated core (12 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:258 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:258-273 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:276-291 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:302-312 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:315-325 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:339-352 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:355-368 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:258-273 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:276-291 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:302-312 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:315-325 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:339-352 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:355-368 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication · Duplicated block (53 lines × 2) · ×5
  • Duplicated block (53 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/LuceneContext.java:106 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/LuceneContext.java:106-158 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/LuceneContext.java:106-158 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/LuceneContext.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/LuceneContext.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/LuceneContext.java:106` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (53 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:64 — jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:64-116 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:64-116 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 232 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 `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (53 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:134 — jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:134-186 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:134-186 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 232 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 `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:134` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (53 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoAccessorFactory.java:1 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoAccessorFactory.java:1-53 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoAccessorFactory.java:1-53 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoAccessorFactory.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoAccessorFactory.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoAccessorFactory.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (53 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisAccessorFactory.java:1 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisAccessorFactory.java:1-53 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisAccessorFactory.java:1-53 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisAccessorFactory.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisAccessorFactory.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisAccessorFactory.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×5
  • Duplicated block (35 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationWriteTask.java:61 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationWriteTask.java:61-95 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationWriteTask.java:61-95 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationWriteTask.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationWriteTask.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationWriteTask.java:61` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (35 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java:101 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java:101-135 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java:101-135 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (35 lines × 2) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:166 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:166-200 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:166-200 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (35 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/FieldAccessor.java:31 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/FieldAccessor.java:31-65 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/FieldAccessor.java:31-65 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/FieldAccessor.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/FieldAccessor.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
  • Duplicated block (35 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/MethodAccessor.java:31 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/MethodAccessor.java:31-65 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/MethodAccessor.java:31-65 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/definition/MethodAccessor.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/definition/MethodAccessor.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×5
  • Duplicated block (32 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/StringIndexConverter.java:36 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/StringIndexConverter.java:36-67 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/StringIndexConverter.java:36-67 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/StringIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/StringIndexConverter.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (32 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/InstantSortConverter.java:36 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/InstantSortConverter.java:36-67 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/InstantSortConverter.java:36-67 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/InstantSortConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/InstantSortConverter.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 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.
  • Duplicated block (32 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java:63 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java:63-94 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java:63-94 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (32 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:121 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:121-152 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:121-152 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (32 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:110 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:110-141 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:110-141 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 110 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 `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:110` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×5
  • Duplicated block (27 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:219 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:219-245 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:219-245 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 297 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:38 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:38-64 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:38-64 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 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.
  • Duplicated block (27 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:164 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:164-190 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:164-190 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:164` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (27 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:51 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:51-77 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:51-77 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceMonitor.java:72 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceMonitor.java:72-98 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceMonitor.java:72-98 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceMonitor.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceMonitor.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×5
  • Duplicated block (9 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java:105 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java:105-113 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:68-76 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java:105-113 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:68-76 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 149 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.
  • Duplicated block (9 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:539 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:539-547 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:572-580 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:537-545 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:570-578 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:539` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:89 — jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:89-97 | jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:144-152 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:89-97 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:144-152 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 232 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 `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:120 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:120-128 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:111-119 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:120-128 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:111-119 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 184 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 `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:48 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:48-56 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:53-61 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:48-56 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:53-61 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java` and `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 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 — extracting one helper per block leaves the fork in place. 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.
D3 · God Classes · MethodTooLong · ×4
  • MethodTooLong: PropertyFormatAdapter.process jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:46 — MethodTooLong — process runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PropertyFormatAdapter.process jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:46 — MethodTooLong — process runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LunisolarExpression.getPreviousDateTime jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:179 — MethodTooLong — getPreviousDateTime runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TypeParser.array jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/TypeParser.java:131 — MethodTooLong — array runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (6 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:250 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:250-261 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:264-284 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:287-307 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:253-264 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:267-287 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:290-310 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:342 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:342-358 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:389-399 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:433-455 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:342-358 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:389-399 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:433-455 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:414 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:414-431 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:433-455 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:457-481 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:414-431 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:433-455 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:457-481 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:101 — jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:101-132 | jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:135-166 | jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:169-199 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:101-132 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:135-166 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:169-199 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×4
  • Duplicated block (44 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:177 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:177-220 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java:177-220 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneMetadata.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (44 lines × 2) jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:73 — jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:73-116 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:73-116 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 200 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 `jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:73` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (44 lines × 2) jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:136 — jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:136-179 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:136-179 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 200 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 `jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (44 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyTransactor.java:21 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyTransactor.java:21-64 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyTransactor.java:21-64 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyTransactor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyTransactor.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×4
  • Duplicated block (39 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:66 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:66-104 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java:66-104 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyMetadata.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (39 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:177 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:177-215 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:177-215 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (39 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java:52 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java:52-90 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java:52-90 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 89 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 `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceAccessorProcessor.java:52` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (39 lines × 2) jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:151 — jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:151-189 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:151-189 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×4
  • Duplicated block (29 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:154 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:154-182 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:154-182 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (29 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:492 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:492-520 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:490-518 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:492` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (29 lines × 2) jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:159 — jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:159-187 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:159-187 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 181 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (29 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:219 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:219-247 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:278-306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×4
  • Duplicated block (13 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:139 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:139-151 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:167-179 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:142-154 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:170-182 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:139` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 4) jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:127 — jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:127-139 | jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:205-217 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:127-139 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:205-217 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 232 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 `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:127` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 4) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:120 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:120-132 | jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:171-183 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:120-132 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:171-183 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 194 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.
  • Duplicated block (13 lines × 4) jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:118 — jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:118-130 | jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:161-173 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:118-130 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:161-173 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 181 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.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×4
  • Duplicated block (12 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:162 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:162-173 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:174-185 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:159-170 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:174-185 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java` and `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 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 — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:420 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:420-431 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:444-455 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:420-431 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:444-455 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:420` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 4) jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:104 — jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:104-115 | jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:105-116 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:104-115 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:105-116 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 4) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:160 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:160-171 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:145-156 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:160-171 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:145-156 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×4
  • Duplicated block (10–11 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:198 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:198-207 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:217-227 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:264-274 — 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 — 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 `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:217` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:306 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:306-315 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:325-335 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:372-382 — 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 — 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 `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:325` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:380 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:380-389 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:399-409 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:446-456 — 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 — 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 `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:399` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:488 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:488-497 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:507-517 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:554-564 — 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 — 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 `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:507` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×4
  • Duplicated block (9 lines × 3) REDACTED:68 — REDACTED:68-76 | REDACTED:68-76 | REDACTED:68-76 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 3) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:225 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:225-233 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:232-240 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java:270-278 — before extracting anything, compare `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 125 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 — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:302 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:302-310 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:333-341 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:484-492 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 129 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:302` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/CsvContentCodec.java:67 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/CsvContentCodec.java:67-75 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/HessianContentCodec.java:140-148 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/StandardContentCodec.java:64-72 — 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 — a location they all depend on today, or a new shared one if there is none — 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 `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/CsvContentCodec.java:67` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 · Cyclomatic Complexity · XlsxProcessor.endElement (cyclomatic 16) · ×3
  • XlsxProcessor.endElement (cyclomatic 16) REDACTED:278 — XlsxProcessor.endElement has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • XlsxProcessor.endElement (cyclomatic 16) REDACTED:278 — XlsxProcessor.endElement has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • XlsxProcessor.endElement (cyclomatic 16) REDACTED:278 — XlsxProcessor.endElement has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D2 · Cognitive Complexity · XlsxProcessor.parseRow (cognitive 25) · ×3
  • XlsxProcessor.parseRow (cognitive 25) REDACTED:171 — XlsxProcessor.parseRow has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 1 (4 pts), loops 2 (4 pts) (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.
  • XlsxProcessor.parseRow (cognitive 25) REDACTED:171 — XlsxProcessor.parseRow has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 1 (4 pts), loops 2 (4 pts) (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.
  • XlsxProcessor.parseRow (cognitive 25) REDACTED:171 — XlsxProcessor.parseRow has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 1 (4 pts), loops 2 (4 pts) (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.
D2 · Cognitive Complexity · XlsxProcessor.startElement (cognitive 21) · ×3
  • XlsxProcessor.startElement (cognitive 21) REDACTED:233 — XlsxProcessor.startElement has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, loops 1 (2 pts) (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.
  • XlsxProcessor.startElement (cognitive 21) REDACTED:233 — XlsxProcessor.startElement has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, loops 1 (2 pts) (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.
  • XlsxProcessor.startElement (cognitive 21) REDACTED:233 — XlsxProcessor.startElement has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, loops 1 (2 pts) (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.
D2 · Cognitive Complexity · XlsxProcessor.endElement (cognitive 19) · ×3
  • XlsxProcessor.endElement (cognitive 19) REDACTED:278 — XlsxProcessor.endElement has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 2 (5 pts), ternaries 1 (3 pts), loops 1 (2 pts), match/switch 1 (2 pts) (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.
  • XlsxProcessor.endElement (cognitive 19) REDACTED:278 — XlsxProcessor.endElement has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 2 (5 pts), ternaries 1 (3 pts), loops 1 (2 pts), match/switch 1 (2 pts) (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.
  • XlsxProcessor.endElement (cognitive 19) REDACTED:278 — XlsxProcessor.endElement has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 2 (5 pts), ternaries 1 (3 pts), loops 1 (2 pts), match/switch 1 (2 pts) (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.
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: HashUtility jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:17 — TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BerkeleyAccessor jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:51 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BerkeleyAccessor jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:51 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (5 members, 50+ identical tokens) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java:61 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java:61-76 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayElement.java:61-76 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayFloat.java:61-76 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayInteger.java:61-76 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayLong.java:61-76 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java:38 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java:38-58 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayElement.java:38-58 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayFloat.java:38-58 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayInteger.java:38-58 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayLong.java:38-58 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java:185 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java:185-238 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java:241-279 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:237-277 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:280-310 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:313-347 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×3
  • Duplicated block (26 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:59 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:59-84 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:59-84 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:62 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:62-87 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:62-87 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:356 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:356-381 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:412-437 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×3
  • Duplicated block (17 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:215 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:215-231 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:259-275 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:215-231 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:259-275 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 160 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneEngine.java:215` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 4) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:239 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:239-255 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:255-271 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:421-437 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/TermExpression.java:172-188 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 129 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 — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 4) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:347 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:347-363 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:389-405 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:529-545 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/TermExpression.java:235-251 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 129 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 — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 6) · ×3
  • Duplicated block (16 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:49 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:49-64 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:53-68 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:88-103 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:49-64 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:53-68 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:88-103 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 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.
  • Duplicated block (16 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:310 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:310-325 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:344-359 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:378-393 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:310-325 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:344-359 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:378-393 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 148 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 `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:310` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 6) jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:108 — jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:108-123 | jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:143-158 | jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:173-188 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:108-123 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:143-158 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:173-188 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 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.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×3
  • Duplicated block (11 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:115 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:115-125 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:181-191 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:115-125 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:181-191 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 107 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:115` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:111` calls `getCreatedIds`, `getUpdatedIds`, `getDeletedIds` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:179` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:105 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:105-115 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:130-140 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:105-115 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:130-140 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 142 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/TransienceManager.java:105` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java:40 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java:40-50 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/ObjectSortConverter.java:40-50 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java:40-50 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/ObjectSortConverter.java:40-50 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `annotation` to `LuceneIndex` in one and `LuceneSort` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — 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.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×3
  • Duplicated block (10 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:264 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:264-273 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:282-291 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:264-273 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:282-291 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 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 `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:264` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:147 — jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:147-156 | jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:187-196 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:147-156 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:187-196 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 221 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.
  • Duplicated block (10 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:154 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:154-163 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:182-191 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:157-166 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:185-194 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:154` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×3
  • Duplicated block (9 lines × 5) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java:207 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java:207-215 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java:250-258 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:255-263 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:288-296 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:323-331 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java:207` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:265` calls `put` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:333` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 5) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java:81 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java:81-89 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/ion/IonContentCodec.java:81-89 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/json/JsonContentCodec.java:83-91 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/msgpack/MessagePackContentCodec.java:90-98 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/yaml/YamlContentCodec.java:83-91 — before extracting anything, compare `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java` and `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/ion/IonContentCodec.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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.
  • Duplicated block (9 lines × 5) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java:92 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java:92-100 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/ion/IonContentCodec.java:92-100 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/json/JsonContentCodec.java:94-102 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/msgpack/MessagePackContentCodec.java:101-109 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/yaml/YamlContentCodec.java:94-102 — before extracting anything, compare `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java` and `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/ion/IonContentCodec.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×3
  • Duplicated block (7 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java:109 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java:109-115 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:40-46 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:72-78 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java:109-115 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:40-46 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:72-78 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 149 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java:109` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:28 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:28-34 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java:30-36 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/StringStoreConverter.java:27-33 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:28-34 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java:30-36 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/StringStoreConverter.java:27-33 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/StringStoreConverter.java` as WHOLE FILES: 91% of the shorter file's 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 4 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — 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 — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:32 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:32-38 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:33-39 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:29-35 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:32-38 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:33-39 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:29-35 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 31 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 — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpMessageEncoder.java:32 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpMessageEncoder.java:32-37 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:140-145 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java:146-151 — before extracting anything, compare `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 125 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpMessageEncoder.java:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) REDACTED:60 — REDACTED:60-65 | REDACTED:60-65 | REDACTED:60-65 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 199 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.
  • Duplicated block (6 lines × 3) REDACTED:164 — REDACTED:164-169 | REDACTED:164-169 | REDACTED:164-169 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 199 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. 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.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×3
  • Duplicated block (5 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:352 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:352-356 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:372-376 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:392-396 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:355-359 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:375-379 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:395-399 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:352` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:262 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:262-266 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:306-310 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:343-347 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:262-266 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:306-310 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:343-347 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 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.
  • Duplicated block (5 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:280 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:280-284 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:319-323 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:359-363 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:280-284 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:319-323 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:359-363 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×3
  • Duplicated block (5 lines × 3) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/InputDefinition.java:145 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/InputDefinition.java:145-149 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/OutputDefinition.java:92-96 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/OutputDefinition.java:108-112 — there are 3 copies across 2 file(s) — 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 `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/InputDefinition.java:145` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 3) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/DurationDeserializer.java:17 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/DurationDeserializer.java:17-21 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/InstantDeserializer.java:17-21 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalDateTimeDeserializer.java:19-23 — 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 — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/DurationDeserializer.java:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bit/LocalByteArrayMap.java:31 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bit/LocalByteArrayMap.java:31-35 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bit/LocalIntegerArrayMap.java:31-35 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/bit/LocalLongArrayMap.java:31-35 — 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 — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, 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.
D1 · Cyclomatic Complexity · NumberIndexConverter.query (cyclomatic 31) · ×2
  • NumberIndexConverter.query (cyclomatic 31) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:71 — NumberIndexConverter.query has cyclomatic complexity 31 (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.
  • NumberIndexConverter.query (cyclomatic 31) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:71 — NumberIndexConverter.query has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · PropertyFormatAdapter.process (cyclomatic 28) · ×2
  • PropertyFormatAdapter.process (cyclomatic 28) jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:46 — PropertyFormatAdapter.process 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.
  • PropertyFormatAdapter.process (cyclomatic 28) jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:46 — PropertyFormatAdapter.process 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.
D1 · Cyclomatic Complexity · MigrationReadTask.call (cyclomatic 22) · ×2
  • MigrationReadTask.call (cyclomatic 22) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:61 — MigrationReadTask.call 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.
  • MigrationReadTask.call (cyclomatic 22) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:61 — MigrationReadTask.call 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.
D1 · Cyclomatic Complexity · BerkeleyManager.queryIdentities (cyclomatic 22) · ×2
  • BerkeleyManager.queryIdentities (cyclomatic 22) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:160 — BerkeleyManager.queryIdentities has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (BerkeleyManager.queryInstances) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • BerkeleyManager.queryIdentities (cyclomatic 22) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:160 — BerkeleyManager.queryIdentities has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (BerkeleyManager.queryInstances) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · BerkeleyManager.queryInstances (cyclomatic 22) · ×2
  • BerkeleyManager.queryInstances (cyclomatic 22) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:231 — BerkeleyManager.queryInstances has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (BerkeleyManager.queryIdentities) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • BerkeleyManager.queryInstances (cyclomatic 22) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:231 — BerkeleyManager.queryInstances has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (BerkeleyManager.queryIdentities) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ArrayIndexConverter.convert (cyclomatic 19) · ×2
  • ArrayIndexConverter.convert (cyclomatic 19) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:87 — ArrayIndexConverter.convert 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.
  • ArrayIndexConverter.convert (cyclomatic 19) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:87 — ArrayIndexConverter.convert 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.
D1 · Cyclomatic Complexity · NumberUtility.convert (cyclomatic 18) · ×2
  • NumberUtility.convert (cyclomatic 18) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/NumberUtility.java:19 — NumberUtility.convert 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.
  • NumberUtility.convert (cyclomatic 18) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/NumberUtility.java:48 — NumberUtility.convert 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.
D1 · Cyclomatic Complexity · FileMemorandum.checkOut (cyclomatic 16) · ×2
  • FileMemorandum.checkOut (cyclomatic 16) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:134 — FileMemorandum.checkOut 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.
  • FileMemorandum.checkOut (cyclomatic 16) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:134 — FileMemorandum.checkOut 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.
D1 · Cyclomatic Complexity · FileMemorandum.clean (cyclomatic 16) · ×2
  • FileMemorandum.clean (cyclomatic 16) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:194 — FileMemorandum.clean 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.
  • FileMemorandum.clean (cyclomatic 16) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:194 — FileMemorandum.clean 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.
D2 · Cognitive Complexity · PropertyFormatAdapter.process (cognitive 128) · ×2
  • PropertyFormatAdapter.process (cognitive 128) jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:46 — PropertyFormatAdapter.process has cognitive complexity 128 (threshold 15). Drivers by points: if/else 29 (105 pts), loops 3 (18 pts), ternaries 1 (5 pts) (nesting depth added 95). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
  • PropertyFormatAdapter.process (cognitive 128) jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:46 — PropertyFormatAdapter.process has cognitive complexity 128 (threshold 15). Drivers by points: if/else 29 (105 pts), loops 3 (18 pts), ternaries 1 (5 pts) (nesting depth added 95). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
D2 · Cognitive Complexity · NumberIndexConverter.query (cognitive 49) · ×2
  • NumberIndexConverter.query (cognitive 49) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:71 — NumberIndexConverter.query has cognitive complexity 49 (threshold 15). Drivers by points: if/else 25 (31 pts), loops 4 (17 pts), match/switch 1 (nesting depth added 19). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
  • NumberIndexConverter.query (cognitive 49) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:71 — NumberIndexConverter.query has cognitive complexity 49 (threshold 15). Drivers by points: if/else 25 (31 pts), loops 4 (17 pts), match/switch 1 (nesting depth added 19). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
D2 · Cognitive Complexity · BerkeleyManager.queryIdentities (cognitive 37) · ×2
  • BerkeleyManager.queryIdentities (cognitive 37) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:160 — BerkeleyManager.queryIdentities has cognitive complexity 37 (threshold 15). Drivers by points: loops 13 (33 pts), if/else 1 (3 pts), match/switch 1 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — 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. This shape REPEATS in the file: one other method here (BerkeleyManager.queryInstances) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • BerkeleyManager.queryIdentities (cognitive 37) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:160 — BerkeleyManager.queryIdentities has cognitive complexity 37 (threshold 15). Drivers by points: loops 13 (33 pts), if/else 1 (3 pts), match/switch 1 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — 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. This shape REPEATS in the file: one other method here (BerkeleyManager.queryInstances) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · BerkeleyManager.queryInstances (cognitive 37) · ×2
  • BerkeleyManager.queryInstances (cognitive 37) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:231 — BerkeleyManager.queryInstances has cognitive complexity 37 (threshold 15). Drivers by points: loops 13 (33 pts), if/else 1 (3 pts), match/switch 1 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — 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. This shape REPEATS in the file: one other method here (BerkeleyManager.queryIdentities) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • BerkeleyManager.queryInstances (cognitive 37) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:231 — BerkeleyManager.queryInstances has cognitive complexity 37 (threshold 15). Drivers by points: loops 13 (33 pts), if/else 1 (3 pts), match/switch 1 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — 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. This shape REPEATS in the file: one other method here (BerkeleyManager.queryIdentities) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ArrayIndexConverter.convert (cognitive 36) · ×2
  • ArrayIndexConverter.convert (cognitive 36) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:87 — ArrayIndexConverter.convert has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (33 pts), loops 1 (3 pts) (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.
  • ArrayIndexConverter.convert (cognitive 36) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:87 — ArrayIndexConverter.convert has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (33 pts), loops 1 (3 pts) (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.
D2 · Cognitive Complexity · EventThread.run (cognitive 34) · ×2
  • EventThread.run (cognitive 34) jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:81 — EventThread.run has cognitive complexity 34 (threshold 15). Drivers by points: error handling 3 (12 pts), if/else 3 (12 pts), loops 3 (7 pts), match/switch 1 (3 pts) (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.
  • EventThread.run (cognitive 34) jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:81 — EventThread.run has cognitive complexity 34 (threshold 15). Drivers by points: error handling 3 (12 pts), if/else 3 (12 pts), loops 3 (7 pts), match/switch 1 (3 pts) (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.
D2 · Cognitive Complexity · FileMemorandum.clean (cognitive 32) · ×2
  • FileMemorandum.clean (cognitive 32) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:194 — FileMemorandum.clean has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 5 (8 pts), boolean chains 1, error handling 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.
  • FileMemorandum.clean (cognitive 32) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:194 — FileMemorandum.clean has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 5 (8 pts), boolean chains 1, error handling 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.
D2 · Cognitive Complexity · MigrationReadTask.call (cognitive 32) · ×2
  • MigrationReadTask.call (cognitive 32) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:61 — MigrationReadTask.call has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 5 (7 pts), boolean chains 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.
  • MigrationReadTask.call (cognitive 32) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:61 — MigrationReadTask.call has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 5 (7 pts), boolean chains 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.
D2 · Cognitive Complexity · FileMemorandum.checkOut (cognitive 28) · ×2
  • FileMemorandum.checkOut (cognitive 28) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:134 — FileMemorandum.checkOut has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 5 (8 pts), 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.
  • FileMemorandum.checkOut (cognitive 28) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:134 — FileMemorandum.checkOut has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 5 (8 pts), 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.
D2 · Cognitive Complexity · BerkeleyXmlParser.parseInternal (cognitive 26) · ×2
  • BerkeleyXmlParser.parseInternal (cognitive 26) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:82 — BerkeleyXmlParser.parseInternal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (7 pts), loops 2 (4 pts), 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.
  • BerkeleyXmlParser.parseInternal (cognitive 26) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:82 — BerkeleyXmlParser.parseInternal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (7 pts), loops 2 (4 pts), 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.
D2 · Cognitive Complexity · MyBatisXmlParser.parseInternal (cognitive 26) · ×2
  • MyBatisXmlParser.parseInternal (cognitive 26) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:74 — MyBatisXmlParser.parseInternal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (7 pts), loops 2 (4 pts), 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.
  • MyBatisXmlParser.parseInternal (cognitive 26) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:74 — MyBatisXmlParser.parseInternal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (7 pts), loops 2 (4 pts), 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.
D2 · Cognitive Complexity · 2.run (cognitive 26) · ×2
  • 2.run (cognitive 26) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:123 — 2.run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 3 (8 pts), loops 2 (4 pts) (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.
  • 2.run (cognitive 26) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java:129 — 2.run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 3 (8 pts), loops 2 (4 pts) (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.
D2 · Cognitive Complexity · LuceneXmlParser.parseInternal (cognitive 24) · ×2
  • LuceneXmlParser.parseInternal (cognitive 24) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:80 — LuceneXmlParser.parseInternal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (7 pts), loops 2 (4 pts) (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.
  • LuceneXmlParser.parseInternal (cognitive 24) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:80 — LuceneXmlParser.parseInternal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (7 pts), loops 2 (4 pts) (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.
D2 · Cognitive Complexity · MongoXmlParser.parseInternal (cognitive 24) · ×2
  • MongoXmlParser.parseInternal (cognitive 24) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:80 — MongoXmlParser.parseInternal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (7 pts), loops 2 (4 pts) (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.
  • MongoXmlParser.parseInternal (cognitive 24) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:80 — MongoXmlParser.parseInternal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (7 pts), loops 2 (4 pts) (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.
D2 · Cognitive Complexity · 2.run (cognitive 23) · ×2
  • 2.run (cognitive 23) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:117 — 2.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 2 (4 pts), loops 2 (4 pts) (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.
  • 2.run (cognitive 23) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java:119 — 2.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 2 (4 pts), loops 2 (4 pts) (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.
D2 · Cognitive Complexity · Migrator.migrate (cognitive 22) · ×2
  • Migrator.migrate (cognitive 22) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:234 — Migrator.migrate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 7, 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.
  • Migrator.migrate (cognitive 22) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:234 — Migrator.migrate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 7, 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.
D2 · Cognitive Complexity · BerkeleyAccessor.checkVersions (cognitive 22) · ×2
  • BerkeleyAccessor.checkVersions (cognitive 22) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:432 — BerkeleyAccessor.checkVersions has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 5 (9 pts), boolean chains 2, ternaries 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.
  • BerkeleyAccessor.checkVersions (cognitive 22) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:432 — BerkeleyAccessor.checkVersions has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 5 (9 pts), boolean chains 2, ternaries 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.
D2 · Cognitive Complexity · ZipJsonType.getFieldName (cognitive 20) · ×2
  • ZipJsonType.getFieldName (cognitive 20) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:134 — ZipJsonType.getFieldName has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), 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.
  • ZipJsonType.getFieldName (cognitive 20) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:134 — ZipJsonType.getFieldName has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · JsonType.getFieldName (cognitive 20) · ×2
  • JsonType.getFieldName (cognitive 20) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:119 — JsonType.getFieldName has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), 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.
  • JsonType.getFieldName (cognitive 20) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:122 — JsonType.getFieldName has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · EventHandler.consumeMessage (cognitive 20) · ×2
  • EventHandler.consumeMessage (cognitive 20) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:56 — EventHandler.consumeMessage has cognitive complexity 20 (threshold 15). Drivers by points: error handling 3 (9 pts), if/else 2 (5 pts), loops 2 (4 pts), match/switch 1 (2 pts) (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.
  • EventHandler.consumeMessage (cognitive 20) jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:56 — EventHandler.consumeMessage has cognitive complexity 20 (threshold 15). Drivers by points: error handling 3 (9 pts), if/else 2 (5 pts), loops 2 (4 pts), match/switch 1 (2 pts) (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.
D2 · Cognitive Complexity · MigrationWriteTask.call (cognitive 18) · ×2
  • MigrationWriteTask.call (cognitive 18) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationWriteTask.java:57 — MigrationWriteTask.call has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), error handling 2 (6 pts), loops 2 (4 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.
  • MigrationWriteTask.call (cognitive 18) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationWriteTask.java:57 — MigrationWriteTask.call has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), error handling 2 (6 pts), loops 2 (4 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.
D2 · Cognitive Complexity · EventHandler.handleDelivery (cognitive 18) · ×2
  • EventHandler.handleDelivery (cognitive 18) jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:52 — EventHandler.handleDelivery has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 3 (6 pts), loops 1 (2 pts), 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.
  • EventHandler.handleDelivery (cognitive 18) jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:52 — EventHandler.handleDelivery has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 3 (6 pts), loops 1 (2 pts), 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.
D2 · Cognitive Complexity · ResourceXmlParser.parseInternal (cognitive 17) · ×2
  • ResourceXmlParser.parseInternal (cognitive 17) jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:87 — ResourceXmlParser.parseInternal has cognitive complexity 17 (threshold 15). Drivers by points: error handling 2 (7 pts), if/else 3 (6 pts), loops 2 (4 pts) (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.
  • ResourceXmlParser.parseInternal (cognitive 17) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:87 — ResourceXmlParser.parseInternal has cognitive complexity 17 (threshold 15). Drivers by points: error handling 2 (7 pts), if/else 3 (6 pts), loops 2 (4 pts) (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.
D2 · Cognitive Complexity · NumberUtility.convert (cognitive 17) · ×2
  • NumberUtility.convert (cognitive 17) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/NumberUtility.java:19 — NumberUtility.convert has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 7. To reduce it, split the body: this score is breadth rather than depth — 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.
  • NumberUtility.convert (cognitive 17) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/NumberUtility.java:48 — NumberUtility.convert has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — 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.
D2 · Cognitive Complexity · BerkeleyConverter.handleField (cognitive 16) · ×2
  • BerkeleyConverter.handleField (cognitive 16) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:68 — BerkeleyConverter.handleField has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 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.
  • BerkeleyConverter.handleField (cognitive 16) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:68 — BerkeleyConverter.handleField has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 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.
D2 · Cognitive Complexity · ResourceManager.load (cognitive 16) · ×2
  • ResourceManager.load (cognitive 16) jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:269 — ResourceManager.load has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (10 pts), if/else 3 (5 pts), error handling 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • ResourceManager.load (cognitive 16) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:269 — ResourceManager.load has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (10 pts), if/else 3 (5 pts), error handling 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D4 · Code Duplication · Near-duplicate member family (4 members, 27 shared lines) · ×2
  • Near-duplicate member family (4 members, 27 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:134 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:134-191 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:194-247 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:134-191 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:194-247 — These 4 members are variants of one another: a block of 27 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Near-duplicate member family (4 members, 27 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:349 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:349-385 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:466-517 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:347-383 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:464-515 — These 4 members are variants of one another: a block of 27 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (8 members, 50+ identical tokens) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:247 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:247-291 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:301-340 | jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:227-281 | jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:284-334 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:245-289 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:299-338 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:227-281 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:284-334 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/ArrayConverter.java:56 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/ArrayConverter.java:56-80 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/BooleanConverter.java:46-63 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/CollectionConverter.java:61-86 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/EnumerationConverter.java:45-60 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/InstantConverter.java:49-66 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/MapConverter.java:64-93 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/StringConverter.java:47-60 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/TypeConverter.java:42-55 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Duplicated block (68 lines × 2) · ×2
  • Duplicated block (68 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:162 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:162-229 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:162-229 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:162` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (68 lines × 2) jstarcraft-core-event/jstarcraft-core-event-api/src/main/java/com/jstarcraft/core/event/EventManager.java:1 — jstarcraft-core-event/jstarcraft-core-event-api/src/main/java/com/jstarcraft/core/event/EventManager.java:1-68 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/EventManager.java:1-68 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-api/src/main/java/com/jstarcraft/core/event/EventManager.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/EventManager.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-event/jstarcraft-core-event-api/src/main/java/com/jstarcraft/core/event/EventManager.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×2
  • Duplicated block (37 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/StringIndexConverter.java:71 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/StringIndexConverter.java:71-107 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/StringIndexConverter.java:71-107 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/StringIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/StringIndexConverter.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (37 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/EnumerationIndexConverter.java:45 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/EnumerationIndexConverter.java:45-81 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/EnumerationIndexConverter.java:45-81 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/EnumerationIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/EnumerationIndexConverter.java` as WHOLE FILES: 100% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×2
  • Duplicated block (33 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:114 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:114-146 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:114-146 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 297 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (33 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:76 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:76-108 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:76-108 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:76` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×2
  • Duplicated block (30 lines × 2) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:114 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:114-143 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:114-143 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (30 lines × 2) jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:170 — jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:170-199 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:170-199 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×2
  • Duplicated block (25 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:31 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:31-55 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:31-55 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:31` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyIsolation.java:27 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyIsolation.java:27-51 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyIsolation.java:27-51 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyIsolation.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyIsolation.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×2
  • Duplicated block (16 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:30 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:30-45 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:74-89 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:30-45 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:74-89 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:123 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:123-138 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:135-150 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:120-135 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:135-150 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java` and `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:123` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×2
  • Duplicated block (14 lines × 4) jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:111 — jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:111-124 | jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:181-194 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:111-124 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:181-194 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 232 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 `jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:111` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 4) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:97 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:97-110 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java:99-112 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:103-116 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java:109-122 — before extracting anything, compare `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 97 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:97` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×2
  • Duplicated block (12–13 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:200 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:200-211 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:231-243 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:290-302 — 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 — 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 `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:231` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:337 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:337-348 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:365-377 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:421-433 — 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 — 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 `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:365` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×2
  • Duplicated block (10–11 lines × 2) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:342 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:342-352 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java:372-381 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 102 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:342` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:188 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:188-197 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:208-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:188` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:197` calls `getCacheObject` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/RegionCacheManager.java:218` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×2
  • Duplicated block (10 lines × 3) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyFunction.java:47 — jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyFunction.java:47-56 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsFunction.java:46-55 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/kotlin/KotlinFunction.java:46-55 — before extracting anything, compare `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyFunction.java` and `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/kotlin/KotlinFunction.java` as WHOLE FILES: 87% of the shorter file's 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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyFunction.java:47` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyFunction.java:44` calls `format`, `getValue`, `getDeclaringClass` and `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsFunction.java:43` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalDateSerializer.java:23 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalDateSerializer.java:23-32 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalTimeSerializer.java:23-32 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/PeriodSerializer.java:23-32 — 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 — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalDateSerializer.java:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×2
  • Duplicated block (9 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:34 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:34-42 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:41-49 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:78-86 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:34-42 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:41-49 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:78-86 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 6) jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:101 — jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:101-109 | jstarcraft-core-event/jstarcraft-core-event-memory/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:55-63 | jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:51-59 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:101-109 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/memory/MemoryQueueEventChannel.java:55-63 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:51-59 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 171 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.
D4 · Code Duplication · Duplicated block (8 lines × 12) · ×2
  • Duplicated block (8 lines × 12) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:64 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:64-71 | jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:65-72 | jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:98-105 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:68-75 | jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:57-64 | jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:52-59 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:64-71 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:65-72 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:98-105 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:68-75 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:57-64 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:52-59 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` and `jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 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 `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 12) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:265 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:265-272 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:288-295 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:317-324 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:333-340 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:360-367 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:380-387 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:268-275 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:291-298 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:320-327 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:336-343 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:363-370 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:383-390 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:265` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×2
  • Duplicated block (8 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchMetadata.java:59 — jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchMetadata.java:59-66 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:55-62 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoMetadata.java:103-110 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchMetadata.java:59-66 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:55-62 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoMetadata.java:103-110 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchMetadata.java` and `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoMetadata.java` as WHOLE FILES: 84% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchMetadata.java:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `Version` names `javax.persistence.Version` in one and `org.springframework.data.annotation.Version` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 6) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/beanshell/BeanShellFunction.java:62 — jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/beanshell/BeanShellFunction.java:62-70 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyFunction.java:59-66 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsFunction.java:58-65 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/kotlin/KotlinFunction.java:58-65 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/python/PythonFunction.java:65-72 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/ruby/RubyFunction.java:72-79 — before extracting anything, compare `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyFunction.java` and `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/kotlin/KotlinFunction.java` as WHOLE FILES: 87% of the shorter file's 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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 14) · ×2
  • Duplicated block (6 lines × 14) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:32 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:32-37 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:32-37 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:28-33 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:33-38 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java:30-35 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:29-34 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/StringStoreConverter.java:27-32 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:32-37 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:32-37 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:28-33 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:33-38 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java:30-35 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:29-34 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/StringStoreConverter.java:27-32 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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. 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.
  • Duplicated block (6 lines × 14) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:66 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:66-71 | jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:67-72 | jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:100-105 | jstarcraft-core-event/jstarcraft-core-event-redis/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:50-55 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:70-75 | jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:59-64 | jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:54-59 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:66-71 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:67-72 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:100-105 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/redis/RedisQueueEventChannel.java:50-55 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:70-75 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:59-64 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:54-59 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` and `jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 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 `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×2
  • Duplicated block (43 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-excel/src/main/java/com/jstarcraft/core/resource/format/excel/ExcelJsonConverter.java:1 — jstarcraft-core-resource/jstarcraft-core-resource-excel/src/main/java/com/jstarcraft/core/resource/format/excel/ExcelJsonConverter.java:1-43 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/excel/ExcelJsonConverter.java:1-43 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-excel/src/main/java/com/jstarcraft/core/resource/format/excel/ExcelJsonConverter.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/excel/ExcelJsonConverter.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-resource/jstarcraft-core-resource-excel/src/main/java/com/jstarcraft/core/resource/format/excel/ExcelJsonConverter.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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.
  • Duplicated block (43 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-api/src/main/java/com/jstarcraft/core/storage/StoragePagination.java:16 — jstarcraft-core-storage/jstarcraft-core-storage-api/src/main/java/com/jstarcraft/core/storage/StoragePagination.java:16-58 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/StoragePagination.java:16-58 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-api/src/main/java/com/jstarcraft/core/storage/StoragePagination.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/StoragePagination.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
D1 · Cyclomatic Complexity · VariableDefinition.getValue (cyclomatic 31) · ×1
  • VariableDefinition.getValue (cyclomatic 31) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/VariableDefinition.java:41 — VariableDefinition.getValue 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.
D1 · Cyclomatic Complexity · NumberConverter.readValueFrom (cyclomatic 31) · ×1
  • NumberConverter.readValueFrom (cyclomatic 31) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/NumberConverter.java:75 — NumberConverter.readValueFrom 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.
D1 · Cyclomatic Complexity · LunisolarExpression.getPreviousDateTime (cyclomatic 27) · ×1
  • LunisolarExpression.getPreviousDateTime (cyclomatic 27) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:179 — LunisolarExpression.getPreviousDateTime 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.
D1 · Cyclomatic Complexity · NumberConverter.writeValueTo (cyclomatic 26) · ×1
  • NumberConverter.writeValueTo (cyclomatic 26) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/NumberConverter.java:139 — NumberConverter.writeValueTo 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.
D1 · Cyclomatic Complexity · LunisolarExpression.getNextDateTime (cyclomatic 25) · ×1
  • LunisolarExpression.getNextDateTime (cyclomatic 25) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:316 — LunisolarExpression.getNextDateTime 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.
D1 · Cyclomatic Complexity · CsvUtility.readValue (cyclomatic 24) · ×1
  • CsvUtility.readValue (cyclomatic 24) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:227 — CsvUtility.readValue 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.
D1 · Cyclomatic Complexity · CsvUtility.writeValue (cyclomatic 24) · ×1
  • CsvUtility.writeValue (cyclomatic 24) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:79 — CsvUtility.writeValue 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.
D1 · Cyclomatic Complexity · ClassDefinition.instanceOf (cyclomatic 24) · ×1
  • ClassDefinition.instanceOf (cyclomatic 24) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/specification/ClassDefinition.java:176 — ClassDefinition.instanceOf 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.
D1 · Cyclomatic Complexity · LunarExpression.getNextDateTime (cyclomatic 21) · ×1
  • LunarExpression.getNextDateTime (cyclomatic 21) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:288 — LunarExpression.getNextDateTime 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.
D1 · Cyclomatic Complexity · LunarExpression.getPreviousDateTime (cyclomatic 21) · ×1
  • LunarExpression.getPreviousDateTime (cyclomatic 21) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:180 — LunarExpression.getPreviousDateTime 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.
D1 · Cyclomatic Complexity · SolarExpression.getNextDateTime (cyclomatic 21) · ×1
  • SolarExpression.getNextDateTime (cyclomatic 21) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:470 — SolarExpression.getNextDateTime 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.
D1 · Cyclomatic Complexity · SolarExpression.getPreviousDateTime (cyclomatic 21) · ×1
  • SolarExpression.getPreviousDateTime (cyclomatic 21) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:362 — SolarExpression.getPreviousDateTime 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.
D1 · Cyclomatic Complexity · PersistenceElement.modify (cyclomatic 20) · ×1
  • PersistenceElement.modify (cyclomatic 20) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PersistenceElement.java:67 — PersistenceElement.modify 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.
D1 · Cyclomatic Complexity · OutputDefinition.instanceOf (cyclomatic 19) · ×1
  • OutputDefinition.instanceOf (cyclomatic 19) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/OutputDefinition.java:136 — OutputDefinition.instanceOf 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.
D1 · Cyclomatic Complexity · ClassMatcher.match (cyclomatic 19) · ×1
  • ClassMatcher.match (cyclomatic 19) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/specification/ClassMatcher.java:92 — ClassMatcher.match 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.
D1 · Cyclomatic Complexity · InputDefinition.instanceOf (cyclomatic 18) · ×1
  • InputDefinition.instanceOf (cyclomatic 18) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/InputDefinition.java:236 — InputDefinition.instanceOf 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.
D1 · Cyclomatic Complexity · SolarExpression.getDays (cyclomatic 18) · ×1
  • SolarExpression.getDays (cyclomatic 18) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:288 — SolarExpression.getDays 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.
D1 · Cyclomatic Complexity · NumberConverter.readValueFrom (cyclomatic 18) · ×1
  • NumberConverter.readValueFrom (cyclomatic 18) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/NumberConverter.java:32 — NumberConverter.readValueFrom 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.
D1 · Cyclomatic Complexity · CommunicationXmlParser.parseInternal (cyclomatic 16) · ×1
  • CommunicationXmlParser.parseInternal (cyclomatic 16) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:100 — CommunicationXmlParser.parseInternal has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · NumberConverter.writeValueTo (cyclomatic 16) · ×1
  • NumberConverter.writeValueTo (cyclomatic 16) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/NumberConverter.java:75 — NumberConverter.writeValueTo 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.
D17 · Explicit Debt · TodoComment repeated across 17 files · ×1
  • TodoComment repeated across 17 files jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/kryo/KryoContentCodec.java:47 — The identical TodoComment appears in 17 files (25 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 25 independent debts. Fix the systemic cause once rather than file-by-file. Text: "// TODO". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
D17 · Explicit Debt · TodoComment repeated across 18 files · ×1
  • TodoComment repeated across 18 files jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:123 — The identical TodoComment appears in 18 files (50 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 50 independent debts. Fix the systemic cause once rather than file-by-file. Text: "// TODO 需要防止路径冲突". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
D17 · Explicit Debt · TodoComment repeated across 14 files · ×1
  • TodoComment repeated across 14 files jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ObjectIndexConverter.java:34 — The identical TodoComment appears in 14 files (20 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 20 independent debts. Fix the systemic cause once rather than file-by-file. Text: "// TODO 此处需要代码重构". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
D2 · Cognitive Complexity · ClassDefinition.instanceOf (cognitive 85) · ×1
  • ClassDefinition.instanceOf (cognitive 85) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/specification/ClassDefinition.java:176 — ClassDefinition.instanceOf has cognitive complexity 85 (threshold 15). Drivers by points: if/else 17 (67 pts), loops 4 (15 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · NumberConverter.readValueFrom (cognitive 84) · ×1
  • NumberConverter.readValueFrom (cognitive 84) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/NumberConverter.java:75 — NumberConverter.readValueFrom has cognitive complexity 84 (threshold 15). Drivers by points: ternaries 8 (41 pts), if/else 17 (35 pts), boolean chains 8 (nesting depth added 51). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
D2 · Cognitive Complexity · VariableDefinition.getValue (cognitive 79) · ×1
  • VariableDefinition.getValue (cognitive 79) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/VariableDefinition.java:41 — VariableDefinition.getValue has cognitive complexity 79 (threshold 15). Drivers by points: if/else 31 (61 pts), error handling 5 (15 pts), boolean chains 2, match/switch 1 (nesting depth added 40). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — 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.
D2 · Cognitive Complexity · NumberConverter.writeValueTo (cognitive 72) · ×1
  • NumberConverter.writeValueTo (cognitive 72) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/NumberConverter.java:139 — NumberConverter.writeValueTo has cognitive complexity 72 (threshold 15). Drivers by points: if/else 29 (66 pts), boolean chains 6 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
D2 · Cognitive Complexity · LunisolarExpression.getPreviousDateTime (cognitive 58) · ×1
  • LunisolarExpression.getPreviousDateTime (cognitive 58) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:179 — LunisolarExpression.getPreviousDateTime has cognitive complexity 58 (threshold 15). Drivers by points: if/else 23 (52 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
D2 · Cognitive Complexity · ClassMatcher.match (cognitive 49) · ×1
  • ClassMatcher.match (cognitive 49) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/specification/ClassMatcher.java:92 — ClassMatcher.match has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (38 pts), loops 3 (10 pts), boolean chains 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
D2 · Cognitive Complexity · LunisolarExpression.getNextDateTime (cognitive 48) · ×1
  • LunisolarExpression.getNextDateTime (cognitive 48) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:316 — LunisolarExpression.getNextDateTime has cognitive complexity 48 (threshold 15). Drivers by points: if/else 21 (42 pts), loops 2 (3 pts), boolean chains 2, ternaries 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.
D2 · Cognitive Complexity · CsvUtility.readValue (cognitive 47) · ×1
  • CsvUtility.readValue (cognitive 47) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:227 — CsvUtility.readValue has cognitive complexity 47 (threshold 15). Drivers by points: if/else 23 (39 pts), loops 3 (6 pts), boolean chains 1, error handling 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.
D2 · Cognitive Complexity · CsvUtility.writeValue (cognitive 47) · ×1
  • CsvUtility.writeValue (cognitive 47) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/conversion/csv/CsvUtility.java:79 — CsvUtility.writeValue has cognitive complexity 47 (threshold 15). Drivers by points: if/else 23 (39 pts), loops 3 (6 pts), boolean chains 1, error handling 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.
D2 · Cognitive Complexity · NumberConverter.writeNumber (cognitive 44) · ×1
  • NumberConverter.writeNumber (cognitive 44) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/NumberConverter.java:281 — NumberConverter.writeNumber has cognitive complexity 44 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 2 (13 pts), loops 2 (12 pts) (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
D2 · Cognitive Complexity · LunarExpression.getPreviousDateTime (cognitive 42) · ×1
  • LunarExpression.getPreviousDateTime (cognitive 42) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:180 — LunarExpression.getPreviousDateTime has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (38 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
D2 · Cognitive Complexity · SolarExpression.getPreviousDateTime (cognitive 42) · ×1
  • SolarExpression.getPreviousDateTime (cognitive 42) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:362 — SolarExpression.getPreviousDateTime has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (38 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
D2 · Cognitive Complexity · SolarExpression.getDays (cognitive 41) · ×1
  • SolarExpression.getDays (cognitive 41) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:288 — SolarExpression.getDays has cognitive complexity 41 (threshold 15). Drivers by points: if/else 7 (21 pts), ternaries 2 (9 pts), loops 2 (7 pts), boolean chains 3, match/switch 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
D2 · Cognitive Complexity · SensitivityQueue.poll (cognitive 40) · ×1
  • SensitivityQueue.poll (cognitive 40) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/SensitivityQueue.java:116 — SensitivityQueue.poll has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (35 pts), ternaries 1 (4 pts), loops 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.
D2 · Cognitive Complexity · LunarExpression.getNextDateTime (cognitive 39) · ×1
  • LunarExpression.getNextDateTime (cognitive 39) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:288 — LunarExpression.getNextDateTime has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (35 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · SolarExpression.getNextDateTime (cognitive 39) · ×1
  • SolarExpression.getNextDateTime (cognitive 39) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:470 — SolarExpression.getNextDateTime has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (35 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · SolarExpression.setWeeks (cognitive 38) · ×1
  • SolarExpression.setWeeks (cognitive 38) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:183 — SolarExpression.setWeeks has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (33 pts), loops 2 (5 pts) (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.
D2 · Cognitive Complexity · CommunicationXmlParser.parseInternal (cognitive 37) · ×1
  • CommunicationXmlParser.parseInternal (cognitive 37) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:100 — CommunicationXmlParser.parseInternal has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 4 (13 pts), error handling 2 (7 pts), 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.
D2 · Cognitive Complexity · ChainLockableStrategy.getLock (cognitive 32) · ×1
  • ChainLockableStrategy.getLock (cognitive 32) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/lockable/ChainLockableStrategy.java:53 — ChainLockableStrategy.getLock has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (10 pts) (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.
D2 · Cognitive Complexity · HashLockableStrategy.getLock (cognitive 32) · ×1
  • HashLockableStrategy.getLock (cognitive 32) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/lockable/HashLockableStrategy.java:60 — HashLockableStrategy.getLock has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (10 pts) (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.
D2 · Cognitive Complexity · NumberConverter.readValueFrom (cognitive 29) · ×1
  • NumberConverter.readValueFrom (cognitive 29) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/NumberConverter.java:32 — NumberConverter.readValueFrom has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SchedulePersistenceManager.getInstances (cognitive 27) · ×1
  • SchedulePersistenceManager.getInstances (cognitive 27) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java:166 — SchedulePersistenceManager.getInstances has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EntityCacheManager.loadInstance (cognitive 27) · ×1
  • EntityCacheManager.loadInstance (cognitive 27) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java:185 — EntityCacheManager.loadInstance has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (12 pts) (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.
D2 · Cognitive Complexity · InputDefinition.instanceOf (cognitive 26) · ×1
  • InputDefinition.instanceOf (cognitive 26) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/InputDefinition.java:236 — InputDefinition.instanceOf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5, 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.
D2 · Cognitive Complexity · ReflectionUtility.getPropertyDescriptors (cognitive 26) · ×1
  • ReflectionUtility.getPropertyDescriptors (cognitive 26) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/ReflectionUtility.java:252 — ReflectionUtility.getPropertyDescriptors has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 3 (7 pts), ternaries 1 (3 pts), 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.
D2 · Cognitive Complexity · PersistenceElement.modify (cognitive 26) · ×1
  • PersistenceElement.modify (cognitive 26) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/PersistenceElement.java:67 — PersistenceElement.modify has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 4 (7 pts) (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.
D2 · Cognitive Complexity · SchedulePersistenceManager.getIdentities (cognitive 26) · ×1
  • SchedulePersistenceManager.getIdentities (cognitive 26) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java:120 — SchedulePersistenceManager.getIdentities has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (24 pts), 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.
D2 · Cognitive Complexity · OutputDefinition.instanceOf (cognitive 25) · ×1
  • OutputDefinition.instanceOf (cognitive 25) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/OutputDefinition.java:136 — OutputDefinition.instanceOf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 6, 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.
D2 · Cognitive Complexity · ArrayConverter.writeValueTo (cognitive 25) · ×1
  • ArrayConverter.writeValueTo (cognitive 25) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/ArrayConverter.java:91 — ArrayConverter.writeValueTo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (8 pts), loops 2 (7 pts) (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.
D2 · Cognitive Complexity · StringConverter.readValueFrom (cognitive 25) · ×1
  • StringConverter.readValueFrom (cognitive 25) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/StringConverter.java:42 — StringConverter.readValueFrom has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 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.
D2 · Cognitive Complexity · SolarExpression.setBits (cognitive 24) · ×1
  • SolarExpression.setBits (cognitive 24) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:134 — SolarExpression.setBits has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · TypeParser.array (cognitive 24) · ×1
  • TypeParser.array (cognitive 24) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/TypeParser.java:131 — TypeParser.array has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (18 pts), match/switch 3 (5 pts), error handling 1 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · SchedulePersistenceManager.run (cognitive 24) · ×1
  • SchedulePersistenceManager.run (cognitive 24) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java:385 — SchedulePersistenceManager.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 1 (3 pts), 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.
D2 · Cognitive Complexity · InputDefinition.getMessageBody (cognitive 23) · ×1
  • InputDefinition.getMessageBody (cognitive 23) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/InputDefinition.java:138 — InputDefinition.getMessageBody has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (6 pts), 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.
D2 · Cognitive Complexity · SensitivityQueue.take (cognitive 21) · ×1
  • SensitivityQueue.take (cognitive 21) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/SensitivityQueue.java:83 — SensitivityQueue.take has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 1 (4 pts), 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.
D2 · Cognitive Complexity · CommandDispatcher.start (cognitive 20) · ×1
  • CommandDispatcher.start (cognitive 20) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/CommandDispatcher.java:190 — CommandDispatcher.start has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (7 pts), 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.
D2 · Cognitive Complexity · XmlConfigurator.flatten (cognitive 20) · ×1
  • XmlConfigurator.flatten (cognitive 20) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/configuration/string/XmlConfigurator.java:55 — XmlConfigurator.flatten has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 4 (7 pts), boolean chains 2, loops 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.
D2 · Cognitive Complexity · LunarExpression.setBits (cognitive 20) · ×1
  • LunarExpression.setBits (cognitive 20) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:91 — LunarExpression.setBits has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts) (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.
D2 · Cognitive Complexity · LunisolarExpression.setBits (cognitive 20) · ×1
  • LunisolarExpression.setBits (cognitive 20) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:91 — LunisolarExpression.setBits has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts) (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.
D2 · Cognitive Complexity · QueuePersistenceManager.run (cognitive 20) · ×1
  • QueuePersistenceManager.run (cognitive 20) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:288 — QueuePersistenceManager.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 2 (4 pts), boolean chains 2, match/switch 1 (2 pts), ternaries 1 (2 pts), 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.
D2 · Cognitive Complexity · JavassistEntityProxy.proxyMethod (cognitive 20) · ×1
  • JavassistEntityProxy.proxyMethod (cognitive 20) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java:83 — JavassistEntityProxy.proxyMethod has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · JavassistRegionProxy.proxyMethod (cognitive 20) · ×1
  • JavassistRegionProxy.proxyMethod (cognitive 20) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistRegionProxy.java:72 — JavassistRegionProxy.proxyMethod has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · EntityCacheManager.deleteInstance (cognitive 20) · ×1
  • EntityCacheManager.deleteInstance (cognitive 20) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/EntityCacheManager.java:241 — EntityCacheManager.deleteInstance has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 4 (8 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · NettyTcpMessageDecoder.decode (cognitive 19) · ×1
  • NettyTcpMessageDecoder.decode (cognitive 19) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpMessageDecoder.java:37 — NettyTcpMessageDecoder.decode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · AvroData.createSchema (cognitive 19) · ×1
  • AvroData.createSchema (cognitive 19) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/avro/AvroData.java:30 — AvroData.createSchema has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 pts), 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.
D2 · Cognitive Complexity · KryoContentCodec.<init> (cognitive 19) · ×1
  • KryoContentCodec.<init> (cognitive 19) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/kryo/KryoContentCodec.java:38 — KryoContentCodec.<init> has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (10 pts), if/else 4 (8 pts), boolean chains 1 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · CommunicationDispatcherFactory.onApplicationEvent (cognitive 18) · ×1
  • CommunicationDispatcherFactory.onApplicationEvent (cognitive 18) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationDispatcherFactory.java:51 — CommunicationDispatcherFactory.onApplicationEvent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (7 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.
D2 · Cognitive Complexity · HashUtility.tianlStringHash64 (cognitive 18) · ×1
  • HashUtility.tianlStringHash64 (cognitive 18) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:1199 — HashUtility.tianlStringHash64 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts), 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.
D2 · Cognitive Complexity · TypeUtility.refineType (cognitive 18) · ×1
  • TypeUtility.refineType (cognitive 18) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/TypeUtility.java:37 — TypeUtility.refineType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · MapConverter.writeValueTo (cognitive 18) · ×1
  • MapConverter.writeValueTo (cognitive 18) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/MapConverter.java:95 — MapConverter.writeValueTo has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 2 (8 pts), loops 2 (6 pts), if/else 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NumberConverter.writeValueTo (cognitive 18) · ×1
  • NumberConverter.writeValueTo (cognitive 18) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/NumberConverter.java:75 — NumberConverter.writeValueTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — 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.
D2 · Cognitive Complexity · CacheXmlParser.parseInternal (cognitive 18) · ×1
  • CacheXmlParser.parseInternal (cognitive 18) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:118 — CacheXmlParser.parseInternal has cognitive complexity 18 (threshold 15). Drivers by points: error handling 2 (7 pts), if/else 4 (7 pts), loops 2 (4 pts) (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.
D2 · Cognitive Complexity · 2.run (cognitive 17) · ×1
  • 2.run (cognitive 17) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/CommandDispatcher.java:111 — 2.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 2 (6 pts), loops 2 (4 pts) (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.
D2 · Cognitive Complexity · HashUtility.universalStringHash32 (cognitive 17) · ×1
  • HashUtility.universalStringHash32 (cognitive 17) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:1246 — HashUtility.universalStringHash32 has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), 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.
D2 · Cognitive Complexity · TermExpression.setBits (cognitive 17) · ×1
  • TermExpression.setBits (cognitive 17) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/TermExpression.java:67 — TermExpression.setBits has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts) (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.
D2 · Cognitive Complexity · ArrayConverter.getWriteList (cognitive 17) · ×1
  • ArrayConverter.getWriteList (cognitive 17) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/avro/converter/ArrayConverter.java:61 — ArrayConverter.getWriteList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 4 (7 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · CommandDefinition.checkType (cognitive 16) · ×1
  • CommandDefinition.checkType (cognitive 16) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/command/CommandDefinition.java:119 — CommandDefinition.checkType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts) (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.
D2 · Cognitive Complexity · TermExpression.getRange (cognitive 16) · ×1
  • TermExpression.getRange (cognitive 16) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/TermExpression.java:97 — TermExpression.getRange has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), 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.
D2 · Cognitive Complexity · SeimiXpathSelector.selectMultiple (cognitive 16) · ×1
  • SeimiXpathSelector.selectMultiple (cognitive 16) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/selection/xpath/SeimiXpathSelector.java:45 — SeimiXpathSelector.selectMultiple has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), loops 2 (4 pts), boolean chains 1, error handling 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — 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.
D2 · Cognitive Complexity · ArrayConverter.readValueFrom (cognitive 16) · ×1
  • ArrayConverter.readValueFrom (cognitive 16) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/ArrayConverter.java:38 — ArrayConverter.readValueFrom has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 2 (6 pts), ternaries 1 (3 pts) (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.
D2 · Cognitive Complexity · NumberConverter.readNumber (cognitive 16) · ×1
  • NumberConverter.readNumber (cognitive 16) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/standard/converter/NumberConverter.java:243 — NumberConverter.readNumber has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 6, boolean chains 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D3 · God Classes · FileTooLong · ×1
  • FileTooLong: hash/HashUtility.java jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java — FileTooLong — 501 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: HashUtility (17-1287). The bar is 500 significant lines; this is 1 over it, 1.00× the bar. 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 — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D4 · Code Duplication · Near-duplicate member family (12 members, 28 shared lines) · ×1
  • Near-duplicate member family (12 members, 28 shared lines) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:53 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:53-97 | jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:54-98 | jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:72-122 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:56-103 | jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:45-90 | jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:47-85 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:53-97 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:54-98 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:72-122 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:56-103 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:45-90 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:47-85 — These 12 members are variants of one another: a block of 28 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication · Near-duplicate member family (12 members, 25 shared lines) · ×1
  • Near-duplicate member family (12 members, 25 shared lines) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:53 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:53-97 | jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:54-98 | jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:81-132 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:56-103 | jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:45-90 | jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:47-85 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:53-97 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:54-98 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:81-132 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:56-103 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:45-90 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:47-85 — These 12 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication · Near-duplicate member family (6 members, 22 shared lines) · ×1
  • Near-duplicate member family (6 members, 22 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:349 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:349-385 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:409-442 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:466-517 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:347-383 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:407-440 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:464-515 — These 6 members are variants of one another: a block of 22 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 23 shared lines) · ×1
  • Near-duplicate member family (4 members, 23 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:138 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:138-163 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:166-191 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:141-166 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:169-194 — These 4 members are variants of one another: a block of 23 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 21 shared lines) · ×1
  • Near-duplicate member family (4 members, 21 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:33 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:33-65 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/InstantSortConverter.java:34-68 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:33-65 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/InstantSortConverter.java:34-68 — These 4 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 16 shared lines) · ×1
  • Near-duplicate member family (4 members, 16 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:28 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:28-56 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:72-110 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/MapIndexConverter.java:28-56 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:72-110 — These 4 members are variants of one another: a block of 16 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 15 shared lines) · ×1
  • Near-duplicate member family (4 members, 15 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:29 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:29-63 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:30-69 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:29-63 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:30-69 — These 4 members are variants of one another: a block of 15 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 13 shared lines) · ×1
  • Near-duplicate member family (4 members, 13 shared lines) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:52 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:52-86 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:53-92 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateMetadata.java:52-86 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:53-92 — These 4 members are variants of one another: a block of 13 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 5 shared lines) · ×1
  • Near-duplicate member family (4 members, 5 shared lines) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsExpression.java:41 — jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsExpression.java:41-57 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsFunction.java:38-55 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/lua/LuaExpression.java:41-57 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/lua/LuaFunction.java:44-67 — These 4 members are variants of one another: a block of 5 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 4 shared lines) · ×1
  • Near-duplicate member family (4 members, 4 shared lines) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/python/PythonExpression.java:41 — jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/python/PythonExpression.java:41-64 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/python/PythonFunction.java:38-62 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/ruby/RubyExpression.java:48-72 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/ruby/RubyFunction.java:44-69 — These 4 members are variants of one another: a block of 4 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 29 shared lines) · ×1
  • Near-duplicate member family (3 members, 29 shared lines) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:91 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:91-127 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:91-127 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:134-172 — These 3 members are variants of one another: a block of 29 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member pair (182 shared lines) · ×1
  • Near-duplicate member pair (182 shared lines) jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:46 — jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:46-234 | jstarcraft-core-resource/jstarcraft-core-resource-property/src/main/java/com/jstarcraft/core/resource/format/PropertyFormatAdapter.java:46-234 — These two members are variants of one another: 182 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (122 shared lines) · ×1
  • Near-duplicate member pair (122 shared lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:61 — jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:61-190 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/MigrationReadTask.java:61-190 — These two members are variants of one another: 122 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (84 shared lines) · ×1
  • Near-duplicate member pair (84 shared lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:71 — jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:71-169 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:71-169 — These two members are variants of one another: 84 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (49 shared lines) · ×1
  • Near-duplicate member pair (49 shared lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:68 — jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:68-124 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:68-124 — These two members are variants of one another: 49 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (37 shared lines) · ×1
  • Near-duplicate member pair (37 shared lines) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:288 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:288-352 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java:328-382 — These two members are variants of one another: 37 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (32 shared lines) · ×1
  • Near-duplicate member pair (32 shared lines) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:231 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:231-272 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java:269-310 — These two members are variants of one another: 32 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (58 corresponding lines) · ×1
  • Edited copy of a member (58 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:460 — jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:460-518 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:462-520 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:336 — jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:336-376 | jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:336-376 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:168 — jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:168-206 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:168-206 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:343 — jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:343-386 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:345-388 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:403 — jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:403-443 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:405-445 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:408 — jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:408-445 | jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:408-445 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×1
  • Edited copy of a member (24 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:97 — jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:97-122 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:99-124 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) REDACTED:37 — REDACTED:37-53 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/beanshell/BeanShellFunction.java:38-59 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:66 — jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:66-80 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/NumberSortConverter.java:66-80 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×1
  • Edited copy of a member (11 corresponding lines) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyExpression.java:41 — jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyExpression.java:41-58 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyFunction.java:38-56 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×1
  • Edited copy of a member (16 corresponding lines) jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:79 — jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:79-94 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:79-94 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×1
  • Edited copy of a member (10 corresponding lines) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/kotlin/KotlinExpression.java:37 — jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/kotlin/KotlinExpression.java:37-55 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/kotlin/KotlinFunction.java:38-55 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java:49 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java:49-62 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java:65-78 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/ion/IonContentCodec.java:49-62 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/ion/IonContentCodec.java:65-78 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/json/JsonContentCodec.java:51-64 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/json/JsonContentCodec.java:67-80 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/msgpack/MessagePackContentCodec.java:58-71 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/msgpack/MessagePackContentCodec.java:74-87 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/yaml/YamlContentCodec.java:51-64 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/yaml/YamlContentCodec.java:67-80 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication · Duplicated block (70–89 lines × 2) · ×1
  • Duplicated block (70–89 lines × 2) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java:92 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java:92-180 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistRegionProxy.java:81-150 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistRegionProxy.java` as WHOLE FILES: 96% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/proxy/JavassistEntityProxy.java:92` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (85 lines × 2) · ×1
  • Duplicated block (85 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:257 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:257-341 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:257-341 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 202 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/Migrator.java:257` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (80 lines × 2) · ×1
  • Duplicated block (80 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:96 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:96-175 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:96-175 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 114 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:96` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (70 lines × 2) · ×1
  • Duplicated block (70 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java:104 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java:104-173 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java:104-173 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/CollectionIndexConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 149 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (69 lines × 2) · ×1
  • Duplicated block (69 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:232 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:232-300 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:232-300 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (66 lines × 2) · ×1
  • Duplicated block (66 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:270 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:270-335 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java:270-335 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/ResourceManager.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 213 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (64 lines × 2) · ×1
  • Duplicated block (64 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:153 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:153-216 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:153-216 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 297 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (60 lines × 2) · ×1
  • Duplicated block (60 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/TypeParser.java:144 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/TypeParser.java:144-203 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/TypeParser.java:209-268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/reflection/TypeParser.java:144` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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.
D4 · Code Duplication · Duplicated block (58 lines × 3) · ×1
  • Duplicated block (58 lines × 3) REDACTED:279 — REDACTED:279-336 | REDACTED:279-336 | REDACTED:279-336 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (56 lines × 2) · ×1
  • Duplicated block (56 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:53 — jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:53-108 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:53-108 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (49 lines × 3) · ×1
  • Duplicated block (49 lines × 3) REDACTED:172 — REDACTED:172-220 | REDACTED:172-220 | REDACTED:172-220 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (48 lines × 2) · ×1
  • Duplicated block (48 lines × 2) jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:85 — jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:85-132 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:85-132 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 171 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 `jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:85` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (47 lines × 2) · ×1
  • Duplicated block (47 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:103 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:103-149 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java:103-149 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/PersistenceManager.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×1
  • Duplicated block (45 lines × 2) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:124 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:124-168 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java:130-174 — before extracting anything, compare `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 125 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 — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (42 lines × 3) · ×1
  • Duplicated block (42 lines × 3) REDACTED:234 — REDACTED:234-275 | REDACTED:234-275 | REDACTED:234-275 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:433 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:433-473 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java:433-473 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyAccessor.java` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 297 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×1
  • Duplicated block (40 lines × 2) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:118 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java:118-157 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java:120-159 — before extracting anything, compare `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpClientConnector.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 97 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 — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:126 — jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:126-161 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java:126-161 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rabbit/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rabbit/RabbitEventChannel.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (34 lines × 4) · ×1
  • Duplicated block (34 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:151 — jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:151-184 | jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:200-233 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:142-175 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java:191-224 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchAccessor.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 110 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.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:123 — jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:123-156 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:123-156 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 184 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 `jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:123` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (31 lines × 4) · ×1
  • Duplicated block (31 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:122 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:122-152 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:166-196 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:122-152 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:166-196 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 148 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. 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.
D4 · Code Duplication · Duplicated block (30–31 lines × 2) · ×1
  • Duplicated block (30–31 lines × 2) jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java1Storage.java:108 — jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java1Storage.java:108-138 | jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java2Storage.java:162-191 — before extracting anything, compare `jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java1Storage.java` and `jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java2Storage.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-monitor/src/main/java/com/jstarcraft/core/monitor/trace/Log4Java1Storage.java:108` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — 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.
D4 · Code Duplication · Duplicated block (30 lines × 10) · ×1
  • Duplicated block (30 lines × 10) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:62 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:62-91 | jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:63-92 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:66-95 | jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:55-84 | jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:50-79 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:62-91 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:63-92 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:66-95 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:55-84 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:50-79 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` and `jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: `Message` names `io.vertx.core.eventbus.Message` in one and `javax.jms.Message` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (30 lines × 4) · ×1
  • Duplicated block (30 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:249 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:249-278 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:303-332 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:247-276 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:301-330 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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.
D4 · Code Duplication · Duplicated block (29 lines × 3) · ×1
  • Duplicated block (29 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:95 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:95-123 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:95-123 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:138-166 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 129 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:95` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25 lines × 4) · ×1
  • Duplicated block (25 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:341 — jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:341-365 | jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:413-437 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:341-365 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:413-437 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 221 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.
D4 · Code Duplication · Duplicated block (24 lines × 4) · ×1
  • Duplicated block (24 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:168 — jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:168-191 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:216-239 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:168-191 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java:216-239 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisAccessor.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 184 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. 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.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/specification/ClassDefinition.java:201 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/specification/ClassDefinition.java:201-222 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/specification/ClassDefinition.java:239-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/specification/ClassDefinition.java:239` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/specification/ClassDefinition.java:200` calls `mode` and `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/specification/ClassDefinition.java:238` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (22 lines × 6) · ×1
  • Duplicated block (22 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:356 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:356-377 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:416-437 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:473-494 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:354-375 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:414-435 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:471-492 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:356` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21–22 lines × 4) · ×1
  • Duplicated block (21–22 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:151 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:151-172 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:204-224 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:151-172 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:204-224 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 152 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 4) · ×1
  • Duplicated block (21 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:139 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:139-159 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:151-171 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:136-156 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java:151-171 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java` and `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/ZipJsonType.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/JsonType.java:139` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) REDACTED:81 — REDACTED:81-101 | REDACTED:81-101 | REDACTED:81-101 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (4–21 lines × 3) · ×1
  • Duplicated block (4–21 lines × 3) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java:168 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java:168-188 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java:183-203 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/session/SessionManager.java:27-30 — before extracting anything, compare `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/session/SessionManager.java:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `sessionManager` to `NettySessionManager<Channel>` in one and `NettySessionManager<InetSocketAddress>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — 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.
D4 · Code Duplication · Duplicated block (20 lines × 5) · ×1
  • Duplicated block (20 lines × 5) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java:39 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java:39-58 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayElement.java:39-58 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayFloat.java:39-58 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayInteger.java:39-58 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayLong.java:39-58 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayElement.java` as WHOLE FILES: 82% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — 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 — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (18–19 lines × 12) · ×1
  • Duplicated block (18–19 lines × 12) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:80 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:80-97 | jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:81-98 | jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:104-122 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:84-101 | jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:73-90 | jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:68-85 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:80-97 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:81-98 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:104-122 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:84-101 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:73-90 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:68-85 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` and `jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 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 `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:80` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 8) · ×1
  • Duplicated block (19 lines × 8) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:249 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:249-267 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:303-321 | jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:232-250 | jstarcraft-core-storage/jstarcraft-core-storage-neo4j/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:289-307 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:247-265 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:301-319 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:232-250 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/neo4j/Neo4jAccessor.java:289-307 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:249` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×1
  • Duplicated block (19 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchMetadata.java:54 — jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchMetadata.java:54-72 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoMetadata.java:98-116 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchMetadata.java:54-72 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoMetadata.java:98-116 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchMetadata.java` and `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoMetadata.java` as WHOLE FILES: 84% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-elasticsearch/src/main/java/com/jstarcraft/core/storage/elasticsearch/ElasticsearchMetadata.java:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–18 lines × 12) · ×1
  • Duplicated block (17–18 lines × 12) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:74 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:74-91 | jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:75-92 | jstarcraft-core-event/jstarcraft-core-event-kafka/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:108-124 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:78-95 | jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:67-84 | jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:62-79 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:74-91 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:75-92 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/kafka/KafkaEventChannel.java:108-124 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:78-95 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:67-84 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:62-79 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` and `jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 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 `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:74` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PackageUtility.java:84 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PackageUtility.java:84-100 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PackageUtility.java:135-152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/PackageUtility.java:84` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — 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.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×1
  • Duplicated block (17 lines × 3) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java:281 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java:281-297 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpClientConnector.java:256-272 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java:294-310 — before extracting anything, compare `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/udp/NettyUdpServerConnector.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/netty/tcp/NettyTcpServerConnector.java:281` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 8) · ×1
  • Duplicated block (16 lines × 8) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:95 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:95-110 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:78-93 | jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:58-73 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:58-73 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:58-73 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:58-73 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:58-73 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:58-73 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:95` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
D4 · Code Duplication · Duplicated block (15–16 lines × 4) · ×1
  • Duplicated block (15–16 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:553 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:553-567 | jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:584-599 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:551-565 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:582-597 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 305 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 `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java:553` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:120 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:120-135 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java:126-141 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java:143-158 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 102 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 8) · ×1
  • Duplicated block (15 lines × 8) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:126 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:126-140 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:107-121 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:104-118 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:98-112 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:126-140 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:107-121 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:104-118 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:98-112 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:126` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 5) · ×1
  • Duplicated block (15 lines × 5) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java:62 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java:62-76 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayElement.java:62-76 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayFloat.java:62-76 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayInteger.java:62-76 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayLong.java:62-76 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayDouble.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/DelayElement.java` as WHOLE FILES: 82% of the shorter file's 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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — 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 — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×1
  • Duplicated block (15 lines × 4) jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:49 — jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:49-63 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:68-82 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:49-63 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventConsumer.java:68-82 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 92 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 `jstarcraft-core-event/jstarcraft-core-event-mqtt/src/main/java/com/jstarcraft/core/event/mqtt/MqttTopicEventChannel.java:49` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:156 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:156-170 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java:178-192 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java:195-209 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 102 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:156` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 8) · ×1
  • Duplicated block (14 lines × 8) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:52 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:52-65 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/InstantSortConverter.java:55-68 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:56-69 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:91-104 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:52-65 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/InstantSortConverter.java:55-68 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:56-69 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:91-104 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/InstantIndexConverter.java:52` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalDateDeserializer.java:17 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalDateDeserializer.java:17-30 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/LocalTimeDeserializer.java:17-30 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/hessian/converter/PeriodDeserializer.java:17-30 — 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 — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (13 lines × 10) · ×1
  • Duplicated block (13 lines × 10) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java:50 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java:50-62 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java:66-78 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/ion/IonContentCodec.java:50-62 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/ion/IonContentCodec.java:66-78 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/json/JsonContentCodec.java:52-64 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/json/JsonContentCodec.java:68-80 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/msgpack/MessagePackContentCodec.java:59-71 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/msgpack/MessagePackContentCodec.java:75-87 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/yaml/YamlContentCodec.java:52-64 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/yaml/YamlContentCodec.java:68-80 — before extracting anything, compare `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java` and `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/ion/IonContentCodec.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (3–13 lines × 6) · ×1
  • Duplicated block (3–13 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:346 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:346-358 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:391-393 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:435-437 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:346-358 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:391-393 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:435-437 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:346` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:345` calls `entrySet`, `get`, `getKey` and `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:391` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:241 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:241-252 | jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java:297-309 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java` and `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/SchedulePersistenceManager.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 102 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/persistence/QueuePersistenceManager.java:241` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 12) · ×1
  • Duplicated block (12 lines × 12) jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:215 — jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:215-226 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:239-250 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:270-281 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:290-301 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:331-342 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:365-376 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:215-226 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:239-250 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:270-281 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:290-301 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:331-342 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java:365-376 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/MongoAccessor.java` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 148 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.
D4 · Code Duplication · Duplicated block (4–12 lines × 4) · ×1
  • Duplicated block (4–12 lines × 4) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/python/PythonExpression.java:52 — jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/python/PythonExpression.java:52-55 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/python/PythonFunction.java:51-62 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/ruby/RubyExpression.java:60-63 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/ruby/RubyFunction.java:58-69 — 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 — a location they all depend on today, or a new shared one if there is none — 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 `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/python/PythonExpression.java:52` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/python/PythonFunction.java:50` calls `format`, `getKey`, `getValue` and `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/python/PythonExpression.java:51` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11 lines × 12) · ×1
  • Duplicated block (11 lines × 12) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:147 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:147-157 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:111-121 | jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:101-111 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:101-111 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:111-121 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:92-102 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:89-99 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:83-93 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:111-121 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:92-102 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:89-99 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:83-93 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:147` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×1
  • Duplicated block (11 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:420 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:420-430 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:444-454 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:466-476 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:420-430 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:444-454 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:466-476 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 349 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/BerkeleyManager.java:420` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 12) · ×1
  • Duplicated block (10 lines × 12) jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:69 — jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:69-78 | jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:70-79 | jstarcraft-core-event/jstarcraft-core-event-qmq/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:93-102 | jstarcraft-core-event/jstarcraft-core-event-rocket/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:73-82 | jstarcraft-core-event/jstarcraft-core-event-stomp/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:62-71 | jstarcraft-core-event/jstarcraft-core-event-vertx/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:57-66 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:69-78 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java:70-79 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/qmq/QmqEventChannel.java:93-102 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/rocket/RocketEventChannel.java:73-82 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/stomp/StompEventChannel.java:62-71 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/vertx/VertxEventChannel.java:57-66 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java` and `jstarcraft-core-event/jstarcraft-core-event-jms/src/main/java/com/jstarcraft/core/event/jms/JmsEventChannel.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 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 `jstarcraft-core-event/jstarcraft-core-event-amqp/src/main/java/com/jstarcraft/core/event/amqp/AmqpEventChannel.java:69` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 10) · ×1
  • Duplicated block (10 lines × 10) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ArrayConverter.java:33 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ArrayConverter.java:33-42 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ArrayConverter.java:62-71 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:92-101 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/ArraySortConverter.java:31-40 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:38-47 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:67-76 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java:92-101 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/ArraySortConverter.java:31-40 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:38-47 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:67-76 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/ArrayIndexConverter.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 114 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 `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ArrayConverter.java:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/csv/converter/ArrayConverter.java:32` calls `valueOf` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:37` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 8) · ×1
  • Duplicated block (10 lines × 8) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:70 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:70-79 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:68-77 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:68-77 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:62-71 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:70-79 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:68-77 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:68-77 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:62-71 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:70` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:61` calls `getMetadataReader` and `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:69` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 8) · ×1
  • Duplicated block (9 lines × 8) jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:103 — jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:103-111 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:86-94 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:68-76 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:66-74 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:66-74 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:68-76 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:66-74 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:66-74 — before extracting anything, compare `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java` and `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `jstarcraft-core-cache/src/main/java/com/jstarcraft/core/cache/schema/CacheXmlParser.java:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
D4 · Code Duplication · Duplicated block (3–9 lines × 6) · ×1
  • Duplicated block (3–9 lines × 6) jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyExpression.java:50 — jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyExpression.java:50-58 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsExpression.java:49-57 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/lua/LuaExpression.java:49-57 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/lua/LuaFunction.java:50-52 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/python/PythonExpression.java:56-64 | jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/ruby/RubyExpression.java:64-72 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyExpression.java:50` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/groovy/GroovyExpression.java:47` calls `format`, `getValue`, `getDeclaringClass` and `jstarcraft-core-script/src/main/java/com/jstarcraft/core/script/js/JsExpression.java:46` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–9 lines × 4) · ×1
  • Duplicated block (8–9 lines × 4) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java:38 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java:38-45 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/json/JsonContentCodec.java:40-47 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/msgpack/MessagePackContentCodec.java:44-52 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/yaml/YamlContentCodec.java:40-47 — before extracting anything, compare `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java` and `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/json/JsonContentCodec.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/msgpack/MessagePackContentCodec.java:53` calls `addDeserializer`, `BigDecimalJacksonDeserializer`, `addSerializer` and `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/cbor/CborContentCodec.java:46` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (3–9 lines × 4) · ×1
  • Duplicated block (3–9 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:99 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:99-107 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:157-159 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:99-107 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:157-159 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 119 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:99` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:98` calls `isAssignableFrom`, `newExactQuery`, `doubleValue` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/index/NumberIndexConverter.java:157` does not — 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/message/CommunicationMessage.java:102 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/message/CommunicationMessage.java:102-109 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/message/CommunicationMessage.java:111-118 | jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/message/CommunicationMessage.java:119-125 — 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 — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–8 lines × 3) · ×1
  • Duplicated block (4–8 lines × 3) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:398 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java:398-405 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java:454-457 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/SolarExpression.java:580-587 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunarExpression.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarExpression.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 129 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 — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–7 lines × 4) · ×1
  • Duplicated block (6–7 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:114 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:114-120 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:196-201 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:114-120 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:196-201 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 133 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/migration/BerkeleyConverter.java:114` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 8) · ×1
  • Duplicated block (6 lines × 8) jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/ArrayConverter.java:57 — jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/ArrayConverter.java:57-62 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/BooleanConverter.java:47-52 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/CollectionConverter.java:62-67 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/EnumerationConverter.java:46-51 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/InstantConverter.java:50-55 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/MapConverter.java:65-70 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/StringConverter.java:48-53 | jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/TypeConverter.java:43-48 — before extracting anything, compare `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/EnumerationConverter.java` and `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/StringConverter.java` as WHOLE FILES: 83% of the shorter file's 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 — 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-codec/src/main/java/com/jstarcraft/core/codec/thrift/converter/ArrayConverter.java:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `instance` to `Object` in one and `Collection<?>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — 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.
D4 · Code Duplication · Duplicated block (6 lines × 6) · ×1
  • Duplicated block (6 lines × 6) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:256 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:256-261 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:279-284 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:302-307 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:259-264 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:282-287 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:305-310 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 150 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 `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/LuceneAccessor.java:256` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (5–6 lines × 4) · ×1
  • Duplicated block (5–6 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:144 — jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:144-148 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:196-201 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:144-148 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:196-201 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 152 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 `jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/memorandum/FileMemorandum.java:144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (1–6 lines × 4) · ×1
  • Duplicated block (1–6 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:50 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:50-50 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:156-161 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:50-50 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:156-161 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java` as WHOLE FILES: 100% of the shorter file's 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 4 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:50` calls `isUnderscoreRequired`, `charAt`, `insert` and `jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:161` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5–6 lines × 2) · ×1
  • Duplicated block (5–6 lines × 2) jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:1219 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:1219-1223 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:1227-1232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java:1219` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 16) · ×1
  • Duplicated block (5 lines × 16) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:30 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:30-34 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:30-34 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:26-30 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:35-39 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:31-35 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java:28-32 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:27-31 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/StringStoreConverter.java:25-29 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:30-34 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/CollectionStoreConverter.java:30-34 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/EnumerationStoreConverter.java:26-30 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:35-39 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/MapStoreConverter.java:31-35 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/NumberStoreConverter.java:28-32 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ObjectStoreConverter.java:27-31 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/StringStoreConverter.java:25-29 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/InstantStoreConverter.java:40` calls `firstEntry`, `getValue` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/store/ArrayStoreConverter.java:35` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 11) · ×1
  • Duplicated block (5 lines × 11) jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:140 — jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:140-144 | jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:124-128 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java:124-128 | jstarcraft-core-storage/jstarcraft-core-storage-berkeley/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:136-140 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:117-121 | jstarcraft-core-storage/jstarcraft-core-storage-mongo/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:114-118 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:108-112 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/berkeley/schema/BerkeleyXmlParser.java:136-140 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneXmlParser.java:117-121 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mongo/schema/MongoXmlParser.java:114-118 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/schema/MyBatisXmlParser.java:108-112 — before extracting anything, compare `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java` and `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceXmlParser.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 `jstarcraft-core-communication/src/main/java/com/jstarcraft/core/communication/schema/CommunicationXmlParser.java:140` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (1–5 lines × 4) · ×1
  • Duplicated block (1–5 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:45 — jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:45-49 | jstarcraft-core-storage/jstarcraft-core-storage-mybatis/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:155-155 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:45-49 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/mybatis/MyBatisMetadata.java:155-155 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java` as WHOLE FILES: 100% of the shorter file's 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 4 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/Camel2SnakeStrategy.java:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (62 lines × 2) · ×1
  • Duplicated block (62 lines × 2) jstarcraft-core-event/jstarcraft-core-event-api/src/main/java/com/jstarcraft/core/event/AbstractEventChannel.java:32 — jstarcraft-core-event/jstarcraft-core-event-api/src/main/java/com/jstarcraft/core/event/AbstractEventChannel.java:32-93 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/AbstractEventChannel.java:32-93 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-api/src/main/java/com/jstarcraft/core/event/AbstractEventChannel.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/AbstractEventChannel.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
D4 · Code Duplication · Duplicated block (55 lines × 2) · ×1
  • Duplicated block (55 lines × 2) jstarcraft-core-event/jstarcraft-core-event-api/src/main/java/com/jstarcraft/core/event/AbstractEventConsumer.java:27 — jstarcraft-core-event/jstarcraft-core-event-api/src/main/java/com/jstarcraft/core/event/AbstractEventConsumer.java:27-81 | jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/AbstractEventConsumer.java:27-81 — before extracting anything, compare `jstarcraft-core-event/jstarcraft-core-event-api/src/main/java/com/jstarcraft/core/event/AbstractEventConsumer.java` and `jstarcraft-core-event/src/main/java/com/jstarcraft/core/event/AbstractEventConsumer.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
D4 · Code Duplication · Duplicated block (77 lines × 2) · ×1
  • Duplicated block (77 lines × 2) jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceStorageFactory.java:1 — jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceStorageFactory.java:1-77 | jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceStorageFactory.java:1-77 — before extracting anything, compare `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceStorageFactory.java` and `jstarcraft-core-resource/src/main/java/com/jstarcraft/core/resource/schema/ResourceStorageFactory.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-resource/jstarcraft-core-resource-api/src/main/java/com/jstarcraft/core/resource/schema/ResourceStorageFactory.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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.
D4 · Code Duplication · Duplicated block (33 lines × 4) · ×1
  • Duplicated block (33 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/CollectionSortConverter.java:1 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/CollectionSortConverter.java:1-33 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/MapSortConverter.java:1-33 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/CollectionSortConverter.java:1-33 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/MapSortConverter.java:1-33 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/CollectionSortConverter.java` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/MapSortConverter.java` as WHOLE FILES: 84% of the shorter file's 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 — 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/CollectionSortConverter.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (40 lines × 4) · ×1
  • Duplicated block (40 lines × 4) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/EnumerationSortConverter.java:1 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/EnumerationSortConverter.java:1-40 | jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/StringSortConverter.java:1-40 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/EnumerationSortConverter.java:1-40 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/StringSortConverter.java:1-40 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/EnumerationSortConverter.java` and `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/StringSortConverter.java` as WHOLE FILES: 93% of the shorter file's 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 — 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 — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/converter/sort/EnumerationSortConverter.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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.
D4 · Code Duplication · Duplicated block (61 lines × 2) · ×1
  • Duplicated block (61 lines × 2) jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneAccessorFactory.java:1 — jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneAccessorFactory.java:1-61 | jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneAccessorFactory.java:1-61 — before extracting anything, compare `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneAccessorFactory.java` and `jstarcraft-core-storage/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneAccessorFactory.java` as WHOLE FILES: 100% of the shorter file's 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 — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `jstarcraft-core-storage/jstarcraft-core-storage-lucene/src/main/java/com/jstarcraft/core/storage/lucene/schema/LuceneAccessorFactory.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 17) · ×1
  • Duplicated block (6 lines × 17) jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Double2DoubleKeyValue.java:82 — jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Double2DoubleKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Double2FloatKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Double2IntegerKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Double2LongKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Float2DoubleKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Float2FloatKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Float2IntegerKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Float2LongKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Integer2DoubleKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Integer2FloatKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Integer2IntegerKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Integer2LongKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/KeyValue.java:108-113 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Long2DoubleKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Long2FloatKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Long2IntegerKeyValue.java:82-87 | jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Long2LongKeyValue.java:82-87 — before extracting anything, compare `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Double2DoubleKeyValue.java` and `jstarcraft-core-common/src/main/java/com/jstarcraft/core/utility/Double2FloatKeyValue.java` as WHOLE FILES: 85% of the shorter file's 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 — 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 — extracting one helper per block leaves the fork in place. 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.
P1 · CI/CD gates · No CI pipeline · ×1
  • No CI pipeline — No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
Minor — 43 finding(s)
D10 · Test Quality · No direct assertions · ×31
  • No direct assertions: testArray jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroContentCodecTestCase.java:35 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testBoolean jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroContentCodecTestCase.java:40 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testComplex jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroContentCodecTestCase.java:50 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testEnum jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroContentCodecTestCase.java:85 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testInstant jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroContentCodecTestCase.java:45 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testNull jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroContentCodecTestCase.java:55 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testNumber jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroContentCodecTestCase.java:65 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testPerformance jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroContentCodecTestCase.java:60 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testString jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroContentCodecTestCase.java:70 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testType jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroContentCodecTestCase.java:75 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testUniMi jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroContentCodecTestCase.java:80 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArray jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroTestCase.java:153 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testAvro jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroTestCase.java:147 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testBoolean jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroTestCase.java:169 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testComplex jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroTestCase.java:192 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testInstant jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroTestCase.java:179 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testNull jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroTestCase.java:420 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testNumber jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroTestCase.java:245 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testString jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroTestCase.java:297 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testType jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroTestCase.java:304 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testUniMi jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/avro/AvroTestCase.java:407 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArray jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/ContentCodecTestCase.java:145 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testBoolean jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/ContentCodecTestCase.java:161 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testComplex jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/ContentCodecTestCase.java:184 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testInstant jstarcraft-core-codec/src/test/java/com/jstarcraft/core/codec/ContentCodecTestCase.java:171 — No conventional assertion call was detected, and 31 of 33 tests in `jstarcraft-core-codec` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • + 6 more in this group — see findings.md.
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/hash/HashUtility.java — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's 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.
  • Most significant orphaned file jstarcraft-core-common/src/main/java/com/jstarcraft/core/common/instant/LunisolarDate.java — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's 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.
  • Most significant orphaned file jstarcraft-core-storage/jstarcraft-core-storage-hibernate/src/main/java/com/jstarcraft/core/storage/hibernate/HibernateAccessor.java — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's 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.
D19 · Documentation Quality · Documentation · ×2
  • Documentation: no installation or build instructions README.md — The README begins with a welcome and an outline but does not provide installation, build, or setup instructions. Add a short install/dependency section covering Maven coordinates, Gradle dependencies, and any prerequisites.
  • Documentation: no usage examples README.md — The document is descriptive with no runnable example showing how to run the framework. Include an 'Usage' or 'How to Run It' section with a minimal code path demonstrating one core feature, such as creating a cache.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Dormant codebase · ×1
  • Dormant codebase — 312 of 312 significant files have no living knowledge — the codebase as a whole is dormant, not 312 separate risks. Counted over 312 of the 794 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.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` 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.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" 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 — not evidence that nobody wrote the shape down.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) — 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's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-26b30928793b465aaa38e9cf6362fcb5/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-26b30928793b465aaa38e9cf6362fcb5/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .14artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive .0—
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D36 · Supply-chain Provenance & Signingprovenance—provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive .0—

Run 01a0c722-7868-7400-9789-d2e9dc85e25d · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md