java-topology/docs/tickets
russell@unturf.com 547a9f5738 ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems)
rails-0009: FilterAttributeHandler filter_parameters Array O(A×F) → Set (450×)
rails-0010: Encryption::AutoFilteredParameters two Array scans → Set (250×)
rails-0011: TimeZoneConversion skip_list Array O(M×C×S) → Set (20×)

exposed-0001: SchemaUtilityApi mapMissingColumnStatements O(N×M) → map (118×)
exposed-0002: IdentifierManagerApi isAKeyword O(K) linear → HashSet (144×)
exposed-0003: Table.clone consParams.map fresh List → hoisted HashSet (6×)

seaorm-0001: active_model establish_links leftover.any O(N²) → HashSet (501×)
seaorm-0002: rbac engine group_permissions .values().find() → HashMap by ID (502×)
seaorm-0003: schema builder sorted_tables Vec::contains → HashSet (500×)
seaorm-0004: TopologicalSort from_iter seen Vec O(N²) → BTreeSet (28×)

Unit tests: RailsTest 11/11, ExposedTest 3/3, SeaORMTest 4/4 PASS
Whitepaper: 157→167 sites, 62→64 ecosystems; §13.12 ORM Wave 2 added
2026-03-27 13:49:46 -04:00
..
diagrams undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
0001-tarjan-ov2-stack-contains.md undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
0002-inference-graph-findnode-linear-scan.md undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
0003-module-hasher-topo-deque-contains.md undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
0004-dependencies-node-list-contains.md undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
0005-inference-context-isequiv-containsall.md undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
doctrine-orm-0001-hydrator-discriminator-in-array.md ORM wave: 24 defects patched across 10 ORMs (157 sites, 62 ecosystems) 2026-03-27 13:34:26 -04:00
doctrine-orm-0002-classmetadata-addsubclass-linear-dedup.md ORM wave: 24 defects patched across 10 ORMs (157 sites, 62 ecosystems) 2026-03-27 13:34:26 -04:00
doctrine-orm-0003-sqlwalker-partial-field-in-array.md ORM wave: 24 defects patched across 10 ORMs (157 sites, 62 ecosystems) 2026-03-27 13:34:26 -04:00
exposed-0001-mapMissingColumnStatements-O2-list-scan.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
exposed-0002-isAKeyword-O-N-list-scan.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
exposed-0003-Table-clone-consParamNames-O2.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
gorm-0001-sortcallbacks-getindex-quadratic.md ORM wave: 24 defects patched across 10 ORMs (157 sites, 62 ecosystems) 2026-03-27 13:34:26 -04:00
rails-0001-preloader-batch-future-tables.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
rails-0002-callbacks-chain-index.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
rails-0003-enumerable-excluding-set.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
rails-0004-enumerable-in-order-of-series-index.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
rails-0005-schema-dumper-constraint-names-array.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
rails-0006-postgresql-schema-include-columns-array.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
rails-0007-lazy-load-hooks-run-once-array.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
rails-0008-enum-value-method-names-array.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
rails-0009-filter-attribute-handler-filter-params-array.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
rails-0010-encryption-auto-filtered-params-array.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
rails-0011-time-zone-conversion-skip-list-array.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
README.md undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
seaorm-0001-establish-links-leftover-quadratic.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
seaorm-0002-rbac-group-permissions-linear-find.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
seaorm-0003-sorted-tables-vec-contains.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00
seaorm-0004-topological-sort-from-iter-seen-vec.md ORM wave 2: 10 new defects — Active Record +3, Exposed +3, SeaORM +4 (167 sites, 64 ecosystems) 2026-03-27 13:49:46 -04:00

Tickets

# Title Module Severity Status
0001 Tarjan SCC: stack.contains(n) — O(V²) jdk.compiler high open
0002 InferenceGraph.findNode() O(N) scan, called O(N³) total jdk.compiler high open
0003 ModuleHashesBuilder$TopoSorter Deque.contains() java.base medium open
0004 Dependencies$Node.addDependency() List.contains() dedup jdk.compiler low open
0005 InferenceContext.isEquiv() List.containsAll() bound comparison jdk.compiler low open

Pattern

Same defect replicated in 4 locations across 2 modules: O(n) linear collection membership check where O(1) is available.

In every case a flag field, HashSet, or dedicated boolean already exists or is trivially addable. The background bytecode scan of all 69 JDK modules confirmed no additional hits beyond these five. The active field in TarjanNode (0001) is the most direct evidence: maintained correctly, never read.

Cascade

javac compilation
  └─ type inference (Infer.java)
       ├─ GraphSolver.solve()
       │    └─ InferenceGraph.initNodes()
       │         └─ GraphUtils.tarjan()  ← DEFECT 0001: O(V²)
       └─ DeferredAttr.buildStuckGraph()
            └─ canInfluence() × N²
                 ├─ findNode()           ← DEFECT 0002: O(N) per call → O(N³) total
                 └─ closure()           ← DEFECT 0002: uncached O(V+E) per call

jlink image creation
  └─ ModuleHashesBuilder.computeHashes()
       └─ TopoSorter.visit()            ← DEFECT 0003: Deque.contains() O(N)

debug compilation (-XDcompletionDeps)
  └─ Dependencies$GraphDependencies
       └─ Node.addDependency()          ← DEFECT 0004: List.contains() O(N)