Public report of williamfiset/algorithms, published 13 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.3). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 13 November 2026, 14:21 UTC · Survey ID cd_9d9cafd32ebb4bb196bae6c2f41e9571

williamfiset/algorithms

Measured 13 November 2026, 14:20 UTC, at code version da35c18

Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.

CAI score 58out of 100 Adequate
CriticalWeakAdequateStrongExemplary
No change since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A medium codebase: 26,364 lines of product code in 185 projects, tests not counted · Estimated rebuild effort: about 0.3 person-years · Weakest lens: Production Readiness, 50

Findings by how serious they are

8 critical 366 serious 132 minor

20 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 14:20 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

37of 37 dimensions measured by tools.
499of 506 findings point to an exact file and line, so you can open each one in the code. The other 7 concern the repository as a whole, such as missing documentation.
37dimensions across 5 lenses, read from 26,364 lines of product code in 185 projects.
Chapters

Executive summary

williamfiset/algorithms falls short of our standard for production, in part because we found no logging, tracing or health checks in the code. It scores 58 out of 100 and is rated Adequate, and six of its eight critical findings are security problems in the build pipeline and in its automatic dependency updates.

Production Readiness, at 50, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the comment that repeats the code, or contradicts it, worth about 5 points. Adding a diagnostic log would lift Production Readiness itself, worth about 6 points. Raising Production Readiness to 70 would lift the score to about 63.

Four pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One automatic update takes new releases before a bad one can be spotted, and one pipeline step installs packages that can change without warning. Pinning each tool to an exact version, setting a waiting period for automatic updates and pinning what the pipeline installs would close these risks. The loop of parts of the code that depend on each other needs breaking by moving the shared parts into a project of their own.

The product code is 26,364 lines, about €43,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 50 · counts for 47%Maturity 52 · counts for 26%Code Health 65 · counts for 14%Security and Compliance 84 · counts for 8%Architecture 100 · counts for 4%

If Production Readiness rose from 50 to 70, the lowest score rated Strong, the score would rise from 58 to about 63.

Code composition: what the lines of code are
Product code 63%Tests 37%
New since the last survey: 92 findings

These 92 critical or serious findings weren't in the previous survey, on 24 October 2026.

  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java
  • Code Duplication · Edited copy of a member (62 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java
  • Code Duplication · Edited copy of a member (51 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java
  • Code Duplication · Edited copy of a member (34 corresponding lines) src/main/java/com/williamfiset/algorithms/strings/RabinKarp.java
  • Code Duplication · Edited copy of a member (36 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/EdmondsKarpAdjacencyList.java
  • Code Duplication · Edited copy of a member (36 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java
  • Code Duplication · Edited copy of a member (23 corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/ConvexHullGrahamScan.java
  • Code Duplication · Edited copy of a member (67 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java
  • Code Duplication · Edited copy of a member (21 corresponding lines) src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.java
  • Code Duplication · Edited copy of a member (26 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenter.java
  • Code Duplication · Edited copy of a member (40 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java
  • Code Duplication · Edited copy of a member (18 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/EditDistanceRecursive.java
  • Code Duplication · Edited copy of a member (37 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/DagDynamicProgramming.java
  • Code Duplication · Edited copy of a member (23 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java
  • Code Duplication · Edited copy of a member (26 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/BellmanFordAdjacencyList.java
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/FloydWarshallSolver.java
  • Code Duplication · Edited copy of a member (30 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java
  • Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java
  • Code Duplication · Edited copy of a member (22 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/TspDynamicProgrammingIterative.java
  • Code Duplication · Edited copy of a member (21 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsDfs.java
  • Code Duplication · Edited copy of a member (20 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/BreadthFirstSearchAdjacencyList.java
  • Code Duplication · Edited copy of a member (27 corresponding lines) src/main/java/com/williamfiset/algorithms/linearalgebra/LinearRecurrenceSolver.java
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java
  • Code Duplication · Edited copy of a member (28 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java
  • Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java
  • Code Duplication · Edited copy of a member (22 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java
  • Code Duplication · Edited copy of a member (29 corresponding lines) src/main/java/com/williamfiset/algorithms/other/Combinations.java
  • Code Duplication · Edited copy of a member (25 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/examples/TreeHeight.java
  • Code Duplication · Edited copies of one member (7 members, 13+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java
  • Code Duplication · Edited copies of one member (6 members, 13+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/CompactSegmentTree.java
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/ConvexPolygonContainsPoint.java
  • Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenter.java
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/CircularSegmentArea.java
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java
  • Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) src/main/java/com/williamfiset/algorithms/linearalgebra/LinearRecurrenceSolver.java
  • Code Duplication · Edited copy of a member (21 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java
  • Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/CapacityScalingSolverAdjacencyList.java
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/TspBruteForce.java
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java
  • Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/AngleBetweenVectors2D.java
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/MinCostMaxFlowJohnsons.java
  • Code Duplication · Edited copy of a member (21 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/fenwicktree/FenwickTreeRangeQueryPointUpdate.java
  • Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java
  • Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/unionfind/UnionFind.java
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/main/java/com/williamfiset/algorithms/sorting/BucketSort.java
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/TspDynamicProgrammingIterative.java
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/queue/IntQueue.java
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/PointInsideTriangle.java
  • Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java
  • Code Duplication · Edited copy of a member (6 corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/CollinearPoints.java
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/linearalgebra/ModularLinearAlgebra.java
  • Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/linkedlist/DoublyLinkedList.java
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/main/java/com/williamfiset/algorithms/sorting/CountingSort.java
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableSeparateChaining.java
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java
  • Code Duplication · Edited copy of a member (5 corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/ConvexHullMonotoneChainsAlgorithm.java
  • Code Duplication · Edited copy of a member (6 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java
  • Code Duplication · Edited copy of a member (6 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/CompactSegmentTree.java
  • Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/RangeQueryPointUpdateSegmentTree.java
  • Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/BipartiteGraphCheckAdjacencyList.java
  • Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/BreadthFirstSearchAdjacencyList.java
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/main/java/com/williamfiset/algorithms/sorting/MergeSort.java
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/bloomfilter/StringSet.java
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java
  • Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java
  • Code Duplication · Edited copy of a member (5 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java
  • Code Duplication · Edited copy of a member (6 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/TspBruteForce.java
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/other/SlidingWindowMaximum.java
  • Code Duplication · Edited copy of a member (5 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/JosephusProblem.java
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java
  • Code Duplication · Edited copies of one member (6 members, 4+ corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/NetworkFlowSolverBase.java
  • Code Duplication · Edited copies of one member (5 members, 3+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/EditDistanceRecursive.java
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/BreadthFirstSearchAdjacencyList.java
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/bloomfilter/StringSet.java
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/bloomfilter/StringSet.java
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/bloomfilter/StringSet.java
  • Code Duplication · Edited copy of a member (6 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 5 findings

These 5 critical or serious findings were in the previous survey, on 24 October 2026, and are gone from this one.

  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java
  • Code Duplication · Duplicated block (15 lines × 2) src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java
  • Code Duplication · Duplicated block (9 lines × 2) src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java
  • Code Duplication · Duplicated block (7 lines × 4) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java
Rebuild cost: about €43,000 · Estimate
Cost to rebuild€14,000 to €72,000, for 239 to 759 hours of work, about 0.3 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 58. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 26,364 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 1 redundant comment finding(s) in Comment Value — start with LineSegmentCircleIntersection.js.
Raises the score by about 5 points · Low effort · Comment Value
2
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag.
Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Raises the score by about 6 points · Medium effort · Observability
3
Record your significant design decisions.
Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Raises the score by about 5 points · Medium effort · Architecture documentation

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €43,000 to build again, about 0.3 person-years of work. Its weakest lens is Production Readiness, at 50 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 redundant comment finding(s) in Comment Value. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for low effort, because it clears the 1 Comment Value findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.3 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 135 lines over the last 90 days, which is about 548 lines a year. At that pace, the extra work comes to an estimated 0 to 0.2 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch //src/main/java/com/williamfiset/algorithms/datastructures/balancedtree:balancedtree balancedtree:balancedtree //src/main/java/com/williamfiset/algorithms/datastructures/utils:utils utils:utils //src/main/java/com/williamfiset/algorithms/datastructures/balancedtree:balancedtree->//src/main/java/com/williamfiset/algorithms/datastructures/utils:utils //src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree:binarysearchtree binarysearchtree:binarysearchtree //src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree:binarysearchtree->//src/main/java/com/williamfiset/algorithms/datastructures/utils:utils //src/main/java/com/williamfiset/algorithms/datastructures/segmenttree:segmenttree segmenttree:segmenttree //src/main/java/com/williamfiset/algorithms/datastructures/sparsetable:sparsetable sparsetable:sparsetable //src/main/java/com/williamfiset/algorithms/datastructures/suffixarray:suffixarray suffixarray:suffixarray //src/main/java/com/williamfiset/algorithms/dp:dp dp:dp //src/main/java/com/williamfiset/algorithms/dp:dp_examples dp:dp_examples //src/main/java/com/williamfiset/algorithms/dp:dp_examples->//src/main/java/com/williamfiset/algorithms/dp:dp //src/main/java/com/williamfiset/algorithms/geometry:geometry geometry:geometry //src/main/java/com/williamfiset/algorithms/graphtheory/analysis:analysis analysis:analysis //src/main/java/com/williamfiset/algorithms/utils/graphutils:graphutils graphutils:graphutils //src/main/java/com/williamfiset/algorithms/graphtheory/analysis:analysis->//src/main/java/com/williamfiset/algorithms/utils/graphutils:graphutils //src/main/java/com/williamfiset/algorithms/graphtheory/networkflow:networkflow networkflow:networkflow //src/main/java/com/williamfiset/algorithms/graphtheory/networkflow:networkflow->//src/main/java/com/williamfiset/algorithms/utils/graphutils:graphutils //src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms:treealgorithms treealgorithms:treealgorithms //src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms:treealgorithms->//src/main/java/com/williamfiset/algorithms/utils/graphutils:graphutils //src/main/java/com/williamfiset/algorithms/graphtheory:graphtheory graphtheory:graphtheory //src/main/java/com/williamfiset/algorithms/graphtheory:graphtheory->//src/main/java/com/williamfiset/algorithms/utils/graphutils:graphutils //src/main/java/com/williamfiset/algorithms/linearalgebra:linearalgebra linearalgebra:linearalgebra //src/main/java/com/williamfiset/algorithms/math:math math:math //src/main/java/com/williamfiset/algorithms/other:other other:other //src/main/java/com/williamfiset/algorithms/search:search search:search //src/main/java/com/williamfiset/algorithms/sorting:sorting sorting:sorting //src/main/java/com/williamfiset/algorithms/strings:strings strings:strings __more__ +165 more projects

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

37 modules, with 2 dependencies between them. Every module uses only modules listed above it, so there are no loops.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 (global)2 com.williamfiset.algorithms.datastructures.bloomfilter3 com.williamfiset.algorithms.datastructures.dynamicarray4 com.williamfiset.algorithms.datastructures.fenwicktree5 com.williamfiset.algorithms.datastructures.fibonacciheap6 com.williamfiset.algorithms.datastructures.hashtable7 com.williamfiset.algorithms.datastructures.kdtree8 com.williamfiset.algorithms.datastructures.linkedlist9 com.williamfiset.algorithms.datastructures.priorityqueue10 com.williamfiset.algorithms.datastructures.quadtree11 com.williamfiset.algorithms.datastructures.queue12 com.williamfiset.algorithms.datastructures.segmenttree13 com.williamfiset.algorithms.datastructures.set14 com.williamfiset.algorithms.datastructures.skiplist15 com.williamfiset.algorithms.datastructures.sparsetable16 com.williamfiset.algorithms.datastructures.stack17 com.williamfiset.algorithms.datastructures.suffixarray18 com.williamfiset.algorithms.datastructures.trie19 com.williamfiset.algorithms.datastructures.unionfind20 com.williamfiset.algorithms.datastructures.utils21 com.williamfiset.algorithms.dp22 com.williamfiset.algorithms.geometry23 com.williamfiset.algorithms.graphtheory24 com.williamfiset.algorithms.graphtheory.analysis25 com.williamfiset.algorithms.graphtheory.networkflow26 com.williamfiset.algorithms.graphtheory.treealgorithms27 com.williamfiset.algorithms.linearalgebra28 com.williamfiset.algorithms.math29 com.williamfiset.algorithms.other30 com.williamfiset.algorithms.search31 com.williamfiset.algorithms.sorting32 com.williamfiset.algorithms.strings33 com.williamfiset.algorithms.utils34 com.williamfiset.algorithms.utils.graphutils35 src.main.java.com.williamfiset.algorithms.geometry36 com.williamfiset.algorithms.datastructures.balancedtree37 com.williamfiset.algorithms.datastructures.binarysearchtree
1 (global)
2 com.williamfiset.algorithms.datastructures.bloomfilter
3 com.williamfiset.algorithms.datastructures.dynamicarray
4 com.williamfiset.algorithms.datastructures.fenwicktree
5 com.williamfiset.algorithms.datastructures.fibonacciheap
6 com.williamfiset.algorithms.datastructures.hashtable
7 com.williamfiset.algorithms.datastructures.kdtree
8 com.williamfiset.algorithms.datastructures.linkedlist
9 com.williamfiset.algorithms.datastructures.priorityqueue
10 com.williamfiset.algorithms.datastructures.quadtree
11 com.williamfiset.algorithms.datastructures.queue
12 com.williamfiset.algorithms.datastructures.segmenttree
13 com.williamfiset.algorithms.datastructures.set
14 com.williamfiset.algorithms.datastructures.skiplist
15 com.williamfiset.algorithms.datastructures.sparsetable
16 com.williamfiset.algorithms.datastructures.stack
17 com.williamfiset.algorithms.datastructures.suffixarray
18 com.williamfiset.algorithms.datastructures.trie
19 com.williamfiset.algorithms.datastructures.unionfind
20 com.williamfiset.algorithms.datastructures.utils
21 com.williamfiset.algorithms.dp
22 com.williamfiset.algorithms.geometry
23 com.williamfiset.algorithms.graphtheory
24 com.williamfiset.algorithms.graphtheory.analysis
25 com.williamfiset.algorithms.graphtheory.networkflow
26 com.williamfiset.algorithms.graphtheory.treealgorithms
27 com.williamfiset.algorithms.linearalgebra
28 com.williamfiset.algorithms.math
29 com.williamfiset.algorithms.other
30 com.williamfiset.algorithms.search
31 com.williamfiset.algorithms.sorting
32 com.williamfiset.algorithms.strings
33 com.williamfiset.algorithms.utils
34 com.williamfiset.algorithms.utils.graphutils
35 src.main.java.com.williamfiset.algorithms.geometry
36 com.williamfiset.algorithms.datastructures.balancedtree1
37 com.williamfiset.algorithms.datastructures.binarysearchtree1
Uses a module listed above itPart of a loopThe module itself
1 (global)2 com.williamfiset.algorithms.datastructures.bloomfilter3 com.williamfiset.algorithms.datastructures.dynamicarray4 com.williamfiset.algorithms.datastructures.fenwicktree5 com.williamfiset.algorithms.datastructures.fibonacciheap6 com.williamfiset.algorithms.datastructures.hashtable7 com.williamfiset.algorithms.datastructures.kdtree8 com.williamfiset.algorithms.datastructures.linkedlist9 com.williamfiset.algorithms.datastructures.priorityqueue10 com.williamfiset.algorithms.datastructures.quadtree11 com.williamfiset.algorithms.datastructures.queue12 com.williamfiset.algorithms.datastructures.segmenttree13 com.williamfiset.algorithms.datastructures.set14 com.williamfiset.algorithms.datastructures.skiplist15 com.williamfiset.algorithms.datastructures.sparsetable16 com.williamfiset.algorithms.datastructures.stack17 com.williamfiset.algorithms.datastructures.suffixarray18 com.williamfiset.algorithms.datastructures.trie19 com.williamfiset.algorithms.datastructures.unionfind20 com.williamfiset.algorithms.datastructures.utils21 com.williamfiset.algorithms.dp22 com.williamfiset.algorithms.geometry23 com.williamfiset.algorithms.graphtheory24 com.williamfiset.algorithms.graphtheory.analysis25 com.williamfiset.algorithms.graphtheory.networkflow26 com.williamfiset.algorithms.graphtheory.treealgorithms27 com.williamfiset.algorithms.linearalgebra28 com.williamfiset.algorithms.math29 com.williamfiset.algorithms.other30 com.williamfiset.algorithms.search31 com.williamfiset.algorithms.sorting32 com.williamfiset.algorithms.strings33 com.williamfiset.algorithms.utils34 com.williamfiset.algorithms.utils.graphutils35 src.main.java.com.williamfiset.algorithms.geometry36 com.williamfiset.algorithms.datastructures.balancedtree37 com.williamfiset.algorithms.datastructures.binarysearchtree(global)1com.williamfiset.algorithms.datastructures.bloomfilter2com.williamfiset.algorithms.datastructures.dynamicarray3com.williamfiset.algorithms.datastructures.fenwicktree4com.williamfiset.algorithms.datastructures.fibonacciheap5com.williamfiset.algorithms.datastructures.hashtable6com.williamfiset.algorithms.datastructures.kdtree7com.williamfiset.algorithms.datastructures.linkedlist8com.williamfiset.algorithms.datastructures.priorityqueue9com.williamfiset.algorithms.datastructures.quadtree10com.williamfiset.algorithms.datastructures.queue11com.williamfiset.algorithms.datastructures.segmenttree12com.williamfiset.algorithms.datastructures.set13com.williamfiset.algorithms.datastructures.skiplist14com.williamfiset.algorithms.datastructures.sparsetable15com.williamfiset.algorithms.datastructures.stack16com.williamfiset.algorithms.datastructures.suffixarray17com.williamfiset.algorithms.datastructures.trie18com.williamfiset.algorithms.datastructures.unionfind19com.williamfiset.algorithms.datastructures.utils20com.williamfiset.algorithms.dp21com.williamfiset.algorithms.geometry22com.williamfiset.algorithms.graphtheory23com.williamfiset.algorithms.graphtheory.analysis24com.williamfiset.algorithms.graphtheory.networkflow25com.williamfiset.algorithms.graphtheory.treealgorithms26com.williamfiset.algorithms.linearalgebra27com.williamfiset.algorithms.math28com.williamfiset.algorithms.other29com.williamfiset.algorithms.search30com.williamfiset.algorithms.sorting31com.williamfiset.algorithms.strings32com.williamfiset.algorithms.utils33com.williamfiset.algorithms.utils.graphutils34src.main.java.com.williamfiset.algorithms.geometry35com.williamfiset.algorithms.datastructures.balancedtree36com.williamfiset.algorithms.datastructures.binarysearchtree3711

At a glance — Code Health · 65% · Adequate · gated by X5 ·

At a glance — Architecture · 100% · Exemplary ·

At a glance — Maturity · 52% · Adequate · gated by D34, M2 ·

At a glance — Readiness · 50% · Adequate · gated by P2, P3 ·

At a glance — Security · 84% · Checked 3 of 10 ·

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
A05:2025 — Injection7High / Critical

Roadmap

Top priorities: Resolve the 116 Orphaned file finding(s) in Knowledge Freshness — start with LongestCommonSubstring.java, PrimsGraphRepresentationAnaylsis.java, GenericSegmentTree.java; Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce; Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.

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

Do thisHelpsEffortDimension
Resolve the 1 redundant comment finding(s) in Comment Value — start with LineSegmentCircleIntersection.js.+4.6 ptsLowComment Value
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.+6.1 ptsMediumObservability
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+5.4 ptsMediumArchitecture documentation
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+4.7 ptsMediumSecurity & performance tooling
Resolve the 116 Orphaned file finding(s) in Knowledge Freshness — start with LongestCommonSubstring.java, PrimsGraphRepresentationAnaylsis.java, GenericSegmentTree.java.+6.6 ptsHighKnowledge Freshness
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).+3.0 ptsMediumNullable reference types
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED.+0.8 ptsLowStatic Analysis (SAST)
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED.+0.8 ptsLowStatic Analysis (SAST)

File quality

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

FileScoreBandWorst signal
REDACTED2.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java5.5MixedCyclomatic Complexity: GenericSegmentTree.<init> (cyclomatic 31)
src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java6.0MixedExplicit Debt: TodoComment
src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java6.0MixedExplicit Debt: TodoComment
src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java6.0MixedExplicit Debt: TodoComment
src/main/java/com/williamfiset/algorithms/dp/examples/editdistance/EditDistance.java6.0MixedExplicit Debt: TodoComment
src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java6.0MixedExplicit Debt: TodoComment
src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java6.0MixedExplicit Debt: TodoComment
src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java6.0MixedExplicit Debt: TodoComment
src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java6.0MixedExplicit Debt: TodoComment
src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java6.0MixedExplicit Debt: TodoComment
src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/RangeQueryPointUpdateSegmentTree.java6.7MixedExplicit Debt: TodoComment
src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java7.0MixedCognitive Complexity: ChineseRemainderTheorem.reduce (cognitive 27)
src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java7.0MixedCode Duplication: Members sharing a duplicated core (6 members, 50+ identical tokens)
src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java7.0MixedCode Duplication: Members sharing a duplicated core (5 members, 50+ identical tokens)
src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java7.0MixedCognitive Complexity: HashTableOpenAddressingBase.put (cognitive 22)
src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java7.0MixedCode Duplication: Members sharing a duplicated core (6 members, 50+ identical tokens)
src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java7.0MixedCode Duplication: Edited copy of a member (14 corresponding lines)
src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java7.0MixedCognitive Complexity: MinimumWeightPerfectMatching.solveIterative (cognitive 16)

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 — 8

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 — 366

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 — 132

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

Could not be resolved — 20

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

This survey 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. All 37 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.7, the weighted average across measured dimensions.

Every figure here is one of two 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. 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.

What we checked — 37 dimensions across the health lenses
D1D2D3D4D5D6D10D13D15D17D24D27D28D29D34D35AX10AX3AX4AX6AX8IC1M1M2M3M4P1P2P3X16X25X27X28X29X3X30X5

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, 499 of 506 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 or a scanner, 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
Canine Code Analyzer 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

Every finding is locatable in findings.md. Run 01a1d548-6bd9-760e-88b3-cfcad54a54fc.

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 — We 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.
  • D11 Test Reliability — not measured this run — We 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) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. 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 — We 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. No dependency manifest this pass reads for hygiene (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems)) was found in this repository, so no package was assessed. Zero packages read is NOT a clean dependency tree, so this is NOT SCORED — a gap in the analyzer, not a verdict about this repository. This row is about dependency HYGIENE — outdated, deprecated or unmaintained direct dependencies; known CVEs in the same dependency graph are a separate question, reported under D30 wherever the manifest is OSV-readable.
  • D14 License Compliance — not measured this run — We 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 — no dependency manifest this pass reads for licence data (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems)) was found in this repository, so it declares no third-party dependency closure to grade. A gap in the analyzer, NOT a finding that this repository's licences are compliant: a manifest in an ecosystem outside that list, or third-party code copied into the tree, is not read — so this dimension asserts nothing about this repository's licensing in either direction.
  • 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 (53 contributor(s) across 1777 commit(s) sampled, automation and bot accounts excluded). One of them holds 93% of the history; the other 52 hold 0.1% 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 — We 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`, `start` script or application dev server such as Vite or Next, 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, a Platform.sh `.platform/routes.yaml`, and the corresponding published-package manifests, including an OTP `*.app.src`, a Drupal module's `*.info` and a Claude Code `.claude-plugin/plugin.json`), 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. No manifest, project file or entry point of any ecosystem it reads exists in this tree.
  • D21 Naming Consistency — not measured this run — We 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. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — We 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 an ADMISSION gap, not an environment fault: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D26 Project Cohesion — not measured this run — We 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. Project size and spread are measured over build units (a .NET project, a Maven or Gradle module, an npm, Deno or JSR package, a Go module, a Cargo crate, a Python, Composer, Bundler, RubyGems, Mix, rebar3, sbt, SwiftPM or pub package, an OTP application, an Xcode project or XcodeGen spec, or a checkout that declares no build at all) whose source a code model reads. This repository's production source is in a language no model reads, or in units whose build tool D26 does not recognise. That is a gap in this analyzer's language reach — not a finding that the repository's projects are cohesive.
  • D44 Platform End-of-Life — not measured this run — We 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, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, 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 (Package.swift, a Dockerfile) is simply not read here yet.
  • C1 Data Protection — not measured this run — We 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 — We 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 — We 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 — We 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 — We 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.
  • GD1 Unfinished & placeholder code — not measured this run — We 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 reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Java, Kotlin is most of its product and is not read yet, so it had nothing of this repository's product 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.
  • P5 DR & Backup — not measured this run — We 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. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found. Whether there is anything here to recover could NOT be determined: persistence is detected from deployment/container manifests and from dependency manifests, and neither was readable by this pass, so a data store this code opens directly — a file, an embedded database — would not be visible to it. The blindness is this analyzer's, not a finding that the repository holds no data. You can widen what we reach: keep the deployment/container manifest or a dependency manifest in this repository — or a link to the ops repo that holds the DR evidence — so the persistence probe has something to read.
  • S1 Web-Security Posture — not measured this run — We 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.
  • X12 Unreachable branch — not measured this run — We 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's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.

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

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do 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.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • 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.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • 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: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.

Dimensions

D1 · Cyclomatic Complexity7.5 / 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.5 / 10 · rule-coverage 100% · ceiling Prevented

7 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Node.knn at 91.

Node.knn (cyclomatic 91)src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java:166
GenericSegmentTree.<init> (cyclomatic 31)src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:141
TreePrinter.getTreeDisplay (cyclomatic 27)src/main/java/com/williamfiset/algorithms/datastructures/utils/TreePrinter.java:23
TspDynamicProgrammingIterative.solve (cyclomatic 22)src/main/java/com/williamfiset/algorithms/graphtheory/TspDynamicProgrammingIterative.java:88
Solution.f (cyclomatic 21)src/main/java/com/williamfiset/algorithms/dp/examples/dominoandtrominotiling/Solution.java:17

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

What to do

  1. Bring the 2 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with Node.knn (cyclomatic 91), GenericSegmentTree.<init> (cyclomatic 31). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 7.6 to about 8.7/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

D2 · Cognitive Complexity4.7 / 10Weak✓ 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 4.7 / 10 · rule-coverage 100% · ceiling Prevented

45 method(s) exceeded the cognitive complexity threshold of 15; the worst was Node.knn at 341.

SuffixArray.construct (cognitive 25) · ×3src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:54
Node.knn (cognitive 341)src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java:166
TreePrinter.getTreeDisplay (cognitive 92)src/main/java/com/williamfiset/algorithms/datastructures/utils/TreePrinter.java:23
TspDynamicProgrammingIterative.solve (cognitive 48)src/main/java/com/williamfiset/algorithms/graphtheory/TspDynamicProgrammingIterative.java:88
RedBlackTree.deleteFix (cognitive 31)src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/RedBlackTree.java:160

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

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cognitive Complexity — start with Node.knn (cognitive 341). — Refactoring it lifts Cognitive Complexity from 4.7 to about 5.8/10.

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

D3 · God Classes9.6 / 10Stronggated by 2 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.6 / 10 · rule-coverage 100% · ceiling Prevented

2 over-large unit(s) detected — types, modules or files that carry too much.

MethodTooLong: MatrixDeterminantLaplaceExpansion.main · ×2src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixDeterminantLaplaceExpansion.java:83

What to do

  1. Resolve the 2 MethodTooLong finding(s) in God Classes — start with MatrixDeterminantLaplaceExpansion.java, GenericSegmentTree.java. — One of this dimension's main actionable groups (2 warning-level).

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

D4 · Code Duplication7.1 / 10Strong✓ 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 7.1 / 10 · rule-coverage 100% · ceiling Verified

166 duplicated block group(s) detected. A further 110 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) · ×14src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:153
Duplicated block (6 lines × 2) · ×13src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java:235
Duplicated block (8 lines × 2) · ×11src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:143
Duplicated block (9 lines × 2) · ×10src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:132
Edited copy of a member (10 corresponding lines) · ×8src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:457

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

What to do

  1. Resolve the 14 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with SuffixArray.java (2), MinQueryAssignUpdateSegmentTree.java, SumQueryMultiplicationUpdateSegmentTree.java. — One of this dimension's main actionable groups (14 warning-level).
  2. Resolve the 13 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with MinQueryAssignUpdateSegmentTree.java (2), QuadTree.java, MinimumWeightPerfectMatching.java. — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 11 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with AVLTreeRecursive.java (2), MaxQuerySumUpdateSegmentTree.java, MinQueryAssignUpdateSegmentTree.java. — One of this dimension's main actionable groups (11 warning-level).

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

D5 · Coupling9.9 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

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

185 production modules (Bazel), 1 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations, and main-sequence distance (abstractness) is not computed for these modules yet.

Circular dependency

What to do

  1. Resolve the 1 Circular dependency finding(s) in Coupling. — One of this dimension's main actionable groups (1 issue-level).

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

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

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

1 of 125 classes have LCOM4 above 3.

Low cohesion: GenericSegmentTree (LCOM4 6)src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:37

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with GenericSegmentTree.java. — One of this dimension's main actionable groups (1 warning-level).

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

D10 · Test Quality10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 295 tests.

✓ On the Gold path — maintain.

Detailed fixes: d10_recommendation.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.8 / 10Stronggated by 30 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.8 / 10 · rule-coverage 100% · ceiling Prevented

30 deducted task-comment markers across 26364 LoC (0.1/KLoC) → score 9.8. 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 · ×30src/test/java/com/williamfiset/algorithms/strings/BoyerMooreStringSearchTest.java:118

What to do

  1. Resolve the 30 TodoComment finding(s) in Explicit Debt — start with LongestCommonSubstring.java (4), ChinesePostmanProblem.java (3), MaxQuerySumUpdateSegmentTree.java (3). — One of this dimension's main actionable groups (30 warning-level).

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

D24 · Comment Value7.6 7.1 / 10Strong✓ Tool-verified

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 7.1 / 10 · rule-coverage 93% · ceiling Documented

1 of 42 judged comments only repeat the code they sit on (2.4 %). 4 comment(s) in another language or script were not judged.

redundant commentsrc/main/java/com/williamfiset/algorithms/geometry/LineSegmentCircleIntersection.js:136

What to do

  1. Resolve the 1 redundant comment finding(s) in Comment Value — start with LineSegmentCircleIntersection.js. — One of this dimension's main actionable groups (1 recommendation-level).

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

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

0 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_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 High. 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)6.7 / 10Adequate✓ 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 6.7 / 10 · rule-coverage 100% · ceiling Documented

7 finding(s): 0 critical, 6 high, 1 medium, 0 low. 4 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. No action in Static Analysis (SAST) — all 4 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (4 issue-level, 0 of them charged here).

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

D34 · Knowledge Freshness2.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 2.0 / 10 · rule-coverage 100% · ceiling Documented

116 of 145 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java. Counted over 145 of the 226 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×116src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:1
Concentrated knowledge decay

What to do

  1. Resolve the 116 Orphaned file finding(s) in Knowledge Freshness — start with LongestCommonSubstring.java, PrimsGraphRepresentationAnaylsis.java, GenericSegmentTree.java. — One of this dimension's main actionable groups (116 recommendation-level).
  2. Resolve the 1 Concentrated knowledge decay 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 composition10.0 / 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.

AX3 · Project dependency cycles7.9 / 10Strong✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

  • The projects //src/main/java/com/williamfiset/algorithms/datastructures/sparsetable:sparsetable → //src/main/java/com/williamfiset/algorithms/datastructures/sparsetable:sparsetable form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.

What to do

  • Break project reference cycles by extracting shared abstractions into a separate project; keep the graph a DAG.
AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

IC1 · Incompleteness & stubs9.0 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Java: methods that only throw a "not implemented" exception, methods that take inputs and return a constant or do nothing, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `rangeUpdate` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/RangeQueryPointUpdateSegmentTree.java:256

What to do

  • Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

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

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
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 your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
  • 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 repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

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

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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.

P2 · Observability0.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.

What to do

  • Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
P3 · Security & performance tooling3.0 / 10Weak✓ 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) as a CI step. What was searched, so you can tell an absence from a miss: the 2 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. — REDACTED:4

What to do

  • Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether Java packages are null-marked and not undermined by heavy nullness suppression — a package under `@NullMarked` (or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, or a NullAway/Checker Framework configuration naming it) makes an unannotated reference exclude null, and `@SuppressWarnings("NullAway")`, `("nullness")`, `("null")` and `castToNonNull(…)` are what silence it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • 0/47 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.

What to do

  • Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).

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 Health65%Adequate — gated by X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture100%ExemplaryStrongest area.
Maturity52%Adequate — gated by D34, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness50%Adequate — gated by P2, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security84%Checked 3 of 10Solid.
Unscored — 2 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • D36 Supply-chain Provenance & Signing — 2 observation(s) recorded · The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
  • X10 Duplicated predicate — 10 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 6 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
  • P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
Not included — 70 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.
  • AX1 Captive dependencies — Not applicable: this repository's Java imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Kotlin imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) 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
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
  • 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 — Dependency hygiene not measured — no supported dependency manifest was read
  • D14 License Compliance — No dependency manifest found — no declared dependency closure to grade for licences
  • 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.
  • D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
  • D20 ADR Quality — Repository kind not determined
  • D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Java, JavaScript, Kotlin not measured.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. 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"]`.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 measured no build unit over this repository's .java, .js, .kt source. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
  • 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.
  • 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.
  • 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 — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • 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 — not scored — this repository shows only 1 of the 3 signals this lens looks for (4 value object(s))
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • 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#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM, JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a pom.xml, Gradle or sbt build, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
  • 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 applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X12 Unreachable branch — X12 reached only 2% of this repository's production lines — java (26,229 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no C# was loaded; this repository's Java and Kotlin were read, and no request in it can be cancelled by a caller (Ktor, OkHttp's newCall or a URL stream, from a suspend function) — a Java request off Android takes no token: it is cancelled through the handle it returns (Future.cancel, Call.cancel, a Disposable), ambiently (io.grpc.Context) or by interrupting its thread, not through a parameter; a Kotlin request outside a suspend function has no caller's cancellation to honour
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Java was read, and it logs through none that an assembled message defeats: java.util.logging's level methods, log4j 1, commons-logging, JBoss Logging and Flogger take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J or log4j 2 (`org.slf4j.Logger`, `org.apache.logging.log4j.Logger`, Lombok's `@Slf4j`) would be judged.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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 — 8 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AX3 · Project dependency cycles · Project dependency cycle · ×1
  • Project dependency cycle — The projects //src/main/java/com/williamfiset/algorithms/datastructures/sparsetable:sparsetable → //src/main/java/com/williamfiset/algorithms/datastructures/sparsetable:sparsetable form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D5 · Coupling · Circular dependency · ×1
  • Circular dependency — //src/main/java/com/williamfiset/algorithms/datastructures/sparsetable:sparsetable → //src/main/java/com/williamfiset/algorithms/datastructures/sparsetable:sparsetable
Serious — 366 finding(s)
D17 · Explicit Debt · TodoComment · ×30
  • TodoComment src/test/java/com/williamfiset/algorithms/strings/BoyerMooreStringSearchTest.java:118 — // TODO(william): Add a test that compares this implementation of Boyermoore — 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 src/test/java/com/williamfiset/algorithms/strings/LongestCommonSubstringTest.java:373 — // TODO(williamfiset): crank up the numbers once implementation is faster. — 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 src/test/java/com/williamfiset/algorithms/graphtheory/treealgorithms/RootingTreeTest.java:70 — // TODO(williamfiset): also verify the parent pointers are pointing at the correct nodes. — 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 src/test/java/com/williamfiset/algorithms/graphtheory/networkflow/MinCostMaxFlowTests.java:18 — // TODO(issue/67): Fix Bellman Ford mincost maxflow — 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 src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:316 — // TODO(williamfiset): support LCS with strings as int arrays for larger alphabet sizes. — 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 src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:407 — // TODO(williamfiset): Avoid initializing a new hash set to count colors every method call. — 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 src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:412 — // TODO(williamfiset): Investigate if == can become >= — 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 src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:470 — // TODO(williamfiset): Replace with SlidingWindowMinimum for speed. — 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 src/main/java/com/williamfiset/algorithms/search/TernarySearchDiscrete.java:17 — // TODO(williamfiset): refactor for better support of custom functions. — 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 src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:37 — // TODO(william): Make a copy of this graph. — 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 src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:39 — // TODO(william): check if graph has an Eulerian path — 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 src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:403 — // TODO(william): implement tests for this modified Eulerian path algo. It should be able to — 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 src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathUndirectedEdgesAdjacencyList.java:120 — // TODO(william): handle the case where `0` starts on an island — 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 src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/MinCostMaxFlowWithBellmanFord.java:50 — // TODO(williamfiset): Compute mincut. — 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 src/main/java/com/williamfiset/algorithms/dp/examples/editdistance/EditDistance.java:30 — // TODO(william): Define whether we're transforming a into b, or b into b. That should matter, — 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 src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:65 — // TODO(william): Lazily call init in query methods instead of initializing in constructor? — 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 src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:51 — // TODO(william): Investigate to reduce this space. There are only 2n-1 segments, so we should — 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 src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:42 — // TODO(william): Investigate to reduce this space. There are only 2n-1 segments, so we should — 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 src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:52 — // TODO(william): Investigate to reduce this space. There are only 2n-1 segments, so we should — 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 src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/RangeQueryPointUpdateSegmentTree.java:84 — // TODO(william): Investigate to reduce this space. There are only 2n-1 segments, so we should — 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 src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:48 — // TODO(william): Investigate to reduce this space. There are only 2n-1 segments, so we should — 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 src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:61 — // TODO(william): Investigate to reduce this space. There are only 2n-1 segments, so we should — 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 src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:41 — // TODO(william): Investigate to reduce this space. There are only 2n-1 segments, so we should — 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 src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:125 — // TODO(william): should this also used the minSegmentUpdateFn — 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 src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:126 — // TODO(william): should this also used the minSegmentUpdateFn — 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.
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×14
  • Duplicated block (5 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:153 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:153-157 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:158-162 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 71 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 `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:153` 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) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:165 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:165-169 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:147-151 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 72 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 `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.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 (5 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:63 — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:63-67 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:104-108 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java` and `src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.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 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. 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 (5 lines × 2) src/main/java/com/williamfiset/algorithms/geometry/ConvexPolygonArea.java:65 — src/main/java/com/williamfiset/algorithms/geometry/ConvexPolygonArea.java:65-69 | src/main/java/com/williamfiset/algorithms/geometry/ConvexPolygonArea.java:75-79 — 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) src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenter.java:40 — src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenter.java:40-44 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeIsomorphism.java:119-125 — 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 `src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenter.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.
  • Duplicated block (5 lines × 2) src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.java:35 — src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.java:35-39 | src/main/java/com/williamfiset/algorithms/linearalgebra/ModularLinearAlgebra.java:82-86 — 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 (5 lines × 2) src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixMultiplication.java:35 — src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixMultiplication.java:35-39 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixPower.java:67-71 — 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 `src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixMultiplication.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. 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) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:109 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:109-113 | src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeapQuickRemovals.java:120-125 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java` and `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeapQuickRemovals.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeapQuickRemovals.java:113` calls `mapAdd` and `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:103` 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 (5 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:25 — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:25-29 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:66-70 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java` and `src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.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 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.
  • Duplicated block (5 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java:28 — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java:28-32 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:222-226 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java` and `src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.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. 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 (5 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/utils/TestUtils.java:9 — src/main/java/com/williamfiset/algorithms/datastructures/utils/TestUtils.java:9-13 | src/main/java/com/williamfiset/algorithms/utils/TestUtils.java:25-29 — 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.
  • Duplicated block (5 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:355 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:355-359 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:357-361 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java` and `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 123 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.
  • Duplicated block (5 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/queue/IntQueue.java:124 — src/main/java/com/williamfiset/algorithms/datastructures/queue/IntQueue.java:124-128 | src/main/java/com/williamfiset/algorithms/datastructures/queue/IntQueue.java:132-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/java/com/williamfiset/algorithms/datastructures/queue/IntQueue.java:124` 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) src/main/java/com/williamfiset/algorithms/geometry/LineSegmentLineSegmentIntersection.java:87 — src/main/java/com/williamfiset/algorithms/geometry/LineSegmentLineSegmentIntersection.java:87-91 | src/main/java/com/williamfiset/algorithms/geometry/LineSegmentLineSegmentIntersection.java:94-98 — 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. 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 (6 lines × 2) · ×13
  • Duplicated block (6 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java:235 — src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java:235-240 | src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java:298-303 — 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 `src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java:235` 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) src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:227 — src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:227-232 | src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:143-149 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java` and `src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java` as WHOLE FILES: this scan already matched 4 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. 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 `src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:227` 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) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/BipartiteGraphCheckAdjacencyList.java:191 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/BipartiteGraphCheckAdjacencyList.java:191-196 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/RootingTree.java:131-136 — 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 (6 lines × 2) src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java:80 — src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java:80-85 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.java:89-95 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java` and `src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.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. 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 `src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.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. 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) src/main/java/com/williamfiset/algorithms/sorting/BucketSort.java:14 — src/main/java/com/williamfiset/algorithms/sorting/BucketSort.java:14-19 | src/main/java/com/williamfiset/algorithms/sorting/CountingSort.java:12-17 — 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) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:26 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:26-31 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:27-32 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 71 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.
  • Duplicated block (6 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:118 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:118-123 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:126-131 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 5 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. 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 (6 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/utils/TestUtils.java:17 — src/main/java/com/williamfiset/algorithms/datastructures/utils/TestUtils.java:17-22 | src/main/java/com/williamfiset/algorithms/utils/TestUtils.java:33-38 — 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.
  • Duplicated block (6 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/Boruvkas.java:174 — src/main/java/com/williamfiset/algorithms/graphtheory/Boruvkas.java:174-179 | src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsUnionFind.java:139-144 — 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. 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) src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyList.java:59 — src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyList.java:59-64 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:45-50 — 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) src/main/java/com/williamfiset/algorithms/linearalgebra/LinearRecurrenceSolver.java:20 — src/main/java/com/williamfiset/algorithms/linearalgebra/LinearRecurrenceSolver.java:20-25 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixPower.java:73-79 — 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. 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) src/main/java/com/williamfiset/algorithms/geometry/ConvexPolygonContainsPoint.java:57 — src/main/java/com/williamfiset/algorithms/geometry/ConvexPolygonContainsPoint.java:57-62 | src/main/java/com/williamfiset/algorithms/geometry/PointInsideTriangle.java:64-69 — 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 `src/main/java/com/williamfiset/algorithms/geometry/ConvexPolygonContainsPoint.java:57` 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) src/main/java/com/williamfiset/algorithms/graphtheory/SteinerTree.java:129 — src/main/java/com/williamfiset/algorithms/graphtheory/SteinerTree.java:129-134 | src/main/java/com/williamfiset/algorithms/graphtheory/SteinerTree.java:154-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 `src/main/java/com/williamfiset/algorithms/graphtheory/SteinerTree.java:129` 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 after the matched lines, `src/main/java/com/williamfiset/algorithms/graphtheory/SteinerTree.java:160` calls `minLengthSteinerTree` and `src/main/java/com/williamfiset/algorithms/graphtheory/SteinerTree.java:135` 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 lines × 2) · ×11
  • Duplicated block (8 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:143 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:143-150 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:144-151 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 7 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. 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 `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:143` 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) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:64 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:64-71 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:74-81 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 71 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 `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:64` 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) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:83 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:83-90 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:63-70 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 72 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 `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:83` 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) src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:165 — src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:165-172 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/LowestCommonAncestorEulerTour.java:235-242 — 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 `src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.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 (8 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsDfs.java:103 — src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsDfs.java:103-110 | src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsUnionFind.java:89-96 — 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 (8 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:197 — src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:197-204 | src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:221-228 — 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) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:428 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:428-435 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:442-449 — 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 `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:428` 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) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:191 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:191-198 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:184-191 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java` and `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 123 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.
  • Duplicated block (8 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:200 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:200-207 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:193-200 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java` and `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 123 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.
  • Duplicated block (8 lines × 2) src/main/java/com/williamfiset/algorithms/other/SlidingWindowMaximum.java:42 — src/main/java/com/williamfiset/algorithms/other/SlidingWindowMaximum.java:42-50 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:524-531 — 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 (8 lines × 2) src/main/java/com/williamfiset/algorithms/sorting/InsertionSort.java:37 — src/main/java/com/williamfiset/algorithms/sorting/InsertionSort.java:37-44 | src/main/java/com/williamfiset/algorithms/sorting/SelectionSort.java:37-44 — 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 (9 lines × 2) · ×10
  • Duplicated block (9 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:132 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:132-140 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:124-132 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java` and `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 123 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 (9 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:150 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:150-158 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:144-152 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 5 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. 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 `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:150` 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) src/main/java/com/williamfiset/algorithms/dp/EditDistanceRecursive.java:43 — src/main/java/com/williamfiset/algorithms/dp/EditDistanceRecursive.java:43-51 | src/main/java/com/williamfiset/algorithms/dp/examples/editdistance/EditDistance.java:10-18 — 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. 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) src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyList.java:88 — src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyList.java:88-96 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:130-138 — 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. 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) src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:176 — src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:176-184 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:33-41 — 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 (9 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:246 — src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:246-254 | src/main/java/com/williamfiset/algorithms/graphtheory/LazyPrimsAdjacencyList.java:168-176 — 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. 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `solver` to `EagerPrimsAdjacencyList` in one and `LazyPrimsAdjacencyList` 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 (9 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:40 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:40-48 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:166-174 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:210 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:210-220 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/TreapTree.java:144-152 — 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. 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) src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:57 — src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:57-65 | src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:194-202 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) src/main/java/com/williamfiset/algorithms/graphtheory/Boruvkas.java:164 — src/main/java/com/williamfiset/algorithms/graphtheory/Boruvkas.java:164-172 | src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsUnionFind.java:129-137 — 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 · Edited copy of a member (10 corresponding lines) · ×8
  • Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:457 — src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:457-466 | src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:108-124 — 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.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/TspBruteForce.java:61 — src/main/java/com/williamfiset/algorithms/graphtheory/TspBruteForce.java:61-70 | src/main/java/com/williamfiset/algorithms/other/Permutations.java:67-76 — 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.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:55 — src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:55-68 | src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableSeparateChaining.java:56-65 — 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.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:131 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:131-140 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:122-132 — 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.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/linearalgebra/ModularLinearAlgebra.java:102 — src/main/java/com/williamfiset/algorithms/linearalgebra/ModularLinearAlgebra.java:102-113 | src/main/java/com/williamfiset/algorithms/linearalgebra/ModularLinearAlgebra.java:116-125 — 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.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/linkedlist/DoublyLinkedList.java:61 — src/main/java/com/williamfiset/algorithms/datastructures/linkedlist/DoublyLinkedList.java:61-70 | src/main/java/com/williamfiset/algorithms/datastructures/linkedlist/DoublyLinkedList.java:73-82 — 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.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:127 — src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:127-140 | src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:468-477 — 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.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/williamfiset/algorithms/other/SlidingWindowMaximum.java:28 — src/main/java/com/williamfiset/algorithms/other/SlidingWindowMaximum.java:28-39 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:512-521 — 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 · Duplicated block (7 lines × 2) · ×8
  • Duplicated block (7 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/RootingTree.java:135 — src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/RootingTree.java:135-141 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeIsomorphism.java:243-249 — 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 (7 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:81 — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:81-87 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:122-128 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java` and `src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.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 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 `src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:81` 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 after the matched lines, `src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:91` calls `buildLcpArray` and `src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:132` 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 (7 lines × 2) src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:88 — src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:88-94 | src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.java:92-98 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java` and `src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.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. 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 `src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.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 (7 lines × 2) src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:97 — src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:97-103 | src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.java:125-131 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java` and `src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.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. 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 (7 lines × 2) src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:89 — src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:89-95 | src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:226-232 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (7 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsDfs.java:30 — src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsDfs.java:30-36 | src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsUnionFind.java:28-34 — 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 (7 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:169 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:169-175 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/MiceAndOwls.java:234-240 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/MiceAndOwls.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. 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 × 2) src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:151 — src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:151-157 | src/main/java/com/williamfiset/algorithms/math/PrimeFactorization.java:23-30 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java` and `src/main/java/com/williamfiset/algorithms/math/PrimeFactorization.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 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 · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×6
  • Members sharing a duplicated core (6 members, 50+ identical tokens) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:304 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:304-344 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:311-351 | src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/BinarySearchTree.java:223-250 | src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/BinarySearchTree.java:253-295 | src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/BinarySearchTree.java:298-329 | src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/BinarySearchTree.java:332-359 — 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) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:43 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:43-60 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:33-51 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:44-61 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:39-57 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:53-70 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:33-50 — 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) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:142 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:142-163 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:136-157 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:143-162 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:144-163 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:150-169 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:131-151 — 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) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:127 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:127-160 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/FordFulkersonDfsSolverAdjacencyList.java:138-172 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:243-275 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:218-251 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:234-275 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:203-243 — 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) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/NetworkFlowSolverBase.java:44 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/NetworkFlowSolverBase.java:44-50 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:53-59 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:50-56 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:52-58 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:51-57 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/MiceAndOwls.java:116-122 — 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) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/NetworkFlowSolverBase.java:104 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/NetworkFlowSolverBase.java:104-112 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:117-125 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:106-114 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:116-124 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:115-123 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/MiceAndOwls.java:180-188 — 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 · Edited copy of a member (8 corresponding lines) · ×6
  • Edited copy of a member (8 corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/ConvexPolygonContainsPoint.java:55 — src/main/java/com/williamfiset/algorithms/geometry/ConvexPolygonContainsPoint.java:55-62 | src/main/java/com/williamfiset/algorithms/geometry/PointInsideTriangle.java:62-69 — These two members are one piece of code written twice and then edited apart: 8 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.
  • Edited copy of a member (8 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:354 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:354-361 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:356-363 — These two members are one piece of code written twice and then edited apart: 8 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.
  • Edited copy of a member (8 corresponding lines) src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:96 — src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:96-103 | src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.java:124-131 — These two members are one piece of code written twice and then edited apart: 8 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.
  • Edited copy of a member (8 corresponding lines) src/main/java/com/williamfiset/algorithms/sorting/CountingSort.java:31 — src/main/java/com/williamfiset/algorithms/sorting/CountingSort.java:31-39 | src/main/java/com/williamfiset/algorithms/sorting/RadixSort.java:74-81 — These two members are one piece of code written twice and then edited apart: 8 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.
  • Edited copy of a member (8 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:327 — src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:327-334 | src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:337-344 — These two members are one piece of code written twice and then edited apart: 8 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.
  • Edited copy of a member (8 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:195 — src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:195-202 | src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:204-211 — These two members are one piece of code written twice and then edited apart: 8 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 (7 corresponding lines) · ×6
  • Edited copy of a member (7 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/queue/IntQueue.java:122 — src/main/java/com/williamfiset/algorithms/datastructures/queue/IntQueue.java:122-128 | src/main/java/com/williamfiset/algorithms/datastructures/queue/IntQueue.java:130-136 — These two members are one piece of code written twice and then edited apart: 7 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.
  • Edited copy of a member (7 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/BreadthFirstSearchAdjacencyList.java:94 — src/main/java/com/williamfiset/algorithms/graphtheory/BreadthFirstSearchAdjacencyList.java:94-100 | src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:489-495 — These two members are one piece of code written twice and then edited apart: 7 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.
  • Edited copy of a member (7 corresponding lines) src/main/java/com/williamfiset/algorithms/sorting/MergeSort.java:57 — src/main/java/com/williamfiset/algorithms/sorting/MergeSort.java:57-63 | src/main/java/com/williamfiset/algorithms/sorting/TimSort.java:83-89 — These two members are one piece of code written twice and then edited apart: 7 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.
  • Edited copy of a member (7 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:480 — src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:480-486 | src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:151-160 — These two members are one piece of code written twice and then edited apart: 7 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.
  • Edited copy of a member (7 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:155 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:155-161 | src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeapQuickRemovals.java:171-180 — These two members are one piece of code written twice and then edited apart: 7 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.
  • Edited copy of a member (7 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/BreadthFirstSearchAdjacencyList.java:47 — src/main/java/com/williamfiset/algorithms/graphtheory/BreadthFirstSearchAdjacencyList.java:47-53 | src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:43-50 — These two members are one piece of code written twice and then edited apart: 7 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 (4 corresponding lines) · ×6
  • Edited copy of a member (4 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/bloomfilter/StringSet.java:181 — src/main/java/com/williamfiset/algorithms/datastructures/bloomfilter/StringSet.java:181-184 | src/main/java/com/williamfiset/algorithms/strings/RabinKarp.java:156-160 — These two members are one piece of code written twice and then edited apart: 4 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.
  • Edited copy of a member (4 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/TspBruteForce.java:72 — src/main/java/com/williamfiset/algorithms/graphtheory/TspBruteForce.java:72-75 | src/main/java/com/williamfiset/algorithms/other/Permutations.java:78-82 — These two members are one piece of code written twice and then edited apart: 4 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.
  • Edited copy of a member (4 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/EditDistanceRecursive.java:59 — src/main/java/com/williamfiset/algorithms/dp/EditDistanceRecursive.java:59-62 | src/main/java/com/williamfiset/algorithms/dp/examples/editdistance/EditDistance.java:33-36 — These two members are one piece of code written twice and then edited apart: 4 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.
  • Edited copy of a member (4 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/bloomfilter/StringSet.java:158 — src/main/java/com/williamfiset/algorithms/datastructures/bloomfilter/StringSet.java:158-161 | src/main/java/com/williamfiset/algorithms/strings/RabinKarp.java:169-172 — These two members are one piece of code written twice and then edited apart: 4 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.
  • Edited copy of a member (4 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/bloomfilter/StringSet.java:172 — src/main/java/com/williamfiset/algorithms/datastructures/bloomfilter/StringSet.java:172-175 | src/main/java/com/williamfiset/algorithms/strings/RabinKarp.java:181-184 — These two members are one piece of code written twice and then edited apart: 4 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.
  • Edited copy of a member (4 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/bloomfilter/StringSet.java:148 — src/main/java/com/williamfiset/algorithms/datastructures/bloomfilter/StringSet.java:148-151 | src/main/java/com/williamfiset/algorithms/strings/RabinKarp.java:148-151 — These two members are one piece of code written twice and then edited apart: 4 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 (6 corresponding lines) · ×5
  • Edited copy of a member (6 corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/CollinearPoints.java:57 — src/main/java/com/williamfiset/algorithms/geometry/CollinearPoints.java:57-63 | src/main/java/com/williamfiset/algorithms/geometry/ConvexHullGrahamScan.java:83-88 — These two members are one piece of code written twice and then edited apart: 6 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.
  • Edited copy of a member (6 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:62 — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:62-67 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:103-108 — These two members are one piece of code written twice and then edited apart: 6 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.
  • Edited copy of a member (6 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/CompactSegmentTree.java:80 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/CompactSegmentTree.java:80-87 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:567-572 — These two members are one piece of code written twice and then edited apart: 6 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.
  • Edited copy of a member (6 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:26 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:26-31 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:26-31 — These two members are one piece of code written twice and then edited apart: 6 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.
  • Edited copy of a member (6 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:414 — src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:414-419 | src/main/java/com/williamfiset/algorithms/graphtheory/TarjanSccSolverAdjacencyList.java:43-48 — These two members are one piece of code written twice and then edited apart: 6 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 · Duplicated block (12 lines × 2) · ×5
  • Duplicated block (12 lines × 2) src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:58 — src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:58-69 | src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:33-44 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java` and `src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java` as WHOLE FILES: this scan already matched 4 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. 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 × 2) src/main/java/com/williamfiset/algorithms/geometry/AngleBetweenVectors2D.java:20 — src/main/java/com/williamfiset/algorithms/geometry/AngleBetweenVectors2D.java:20-31 | src/main/java/com/williamfiset/algorithms/geometry/CircularSegmentArea.java:78-89 — 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. 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) src/main/java/com/williamfiset/algorithms/graphtheory/Boruvkas.java:183 — src/main/java/com/williamfiset/algorithms/graphtheory/Boruvkas.java:183-194 | src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsUnionFind.java:149-160 — 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 `src/main/java/com/williamfiset/algorithms/graphtheory/Boruvkas.java:183` 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) src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:207 — src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:207-218 | src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:225-236 — 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 `src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:207` 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) src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/RootingTree.java:144 — src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/RootingTree.java:144-155 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/RootingTree.java:168-179 — 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 `src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/RootingTree.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 (7 lines × 4) · ×5
  • Duplicated block (7 lines × 4) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:151 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:151-157 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:152-158 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:158-164 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:140-146 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 46 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 `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.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.
  • Duplicated block (7 lines × 4) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:146 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:146-152 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:266-272 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:515-521 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:322-328 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (7 lines × 4) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:155 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:155-161 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:275-281 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:524-530 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:331-337 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (7 lines × 4) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:95 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:95-101 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:94-100 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:93-99 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/MiceAndOwls.java:158-164 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (7 lines × 4) src/main/java/com/williamfiset/algorithms/dp/CoinChange.java:219 — src/main/java/com/williamfiset/algorithms/dp/CoinChange.java:219-225 | src/main/java/com/williamfiset/algorithms/dp/CoinChange.java:228-234 | src/main/java/com/williamfiset/algorithms/dp/CoinChange.java:237-243 | src/main/java/com/williamfiset/algorithms/dp/CoinChange.java:246-252 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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 × 3) · ×5
  • Duplicated block (6 lines × 3) src/main/java/com/williamfiset/algorithms/dp/KnapsackUnbounded.java:49 — src/main/java/com/williamfiset/algorithms/dp/KnapsackUnbounded.java:49-54 | src/main/java/com/williamfiset/algorithms/dp/Knapsack_01.java:45-52 | src/main/java/com/williamfiset/algorithms/dp/Knapsack_01.java:91-96 — 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 `src/main/java/com/williamfiset/algorithms/dp/KnapsackUnbounded.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 × 3) src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:76 — src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:76-81 | src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:104-109 | src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:117-122 — 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.
  • Duplicated block (6 lines × 3) src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:90 — src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:90-96 | src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:107-112 | src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:122-127 — 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.
  • Duplicated block (6 lines × 3) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:122 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:122-128 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:123-129 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:112-117 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 7 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. 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 (6 lines × 3) src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:243 — src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:243-248 | src/main/java/com/williamfiset/algorithms/math/ModPow.java:70-75 | src/main/java/com/williamfiset/algorithms/math/PrimeFactorization.java:119-124 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java` and `src/main/java/com/williamfiset/algorithms/math/PrimeFactorization.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayFast.java:53 — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayFast.java:53-105 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:54-79 | src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.java:58-83 | src/main/java/com/williamfiset/algorithms/strings/SubstringVerificationSuffixArray.java:56-81 — 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) src/main/java/com/williamfiset/algorithms/dp/CoinChange.java:218 — src/main/java/com/williamfiset/algorithms/dp/CoinChange.java:218-225 | src/main/java/com/williamfiset/algorithms/dp/CoinChange.java:227-234 | src/main/java/com/williamfiset/algorithms/dp/CoinChange.java:236-243 | src/main/java/com/williamfiset/algorithms/dp/CoinChange.java:245-252 — 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) src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:75 — src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:75-101 | src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:103-114 | src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:116-129 | src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:131-139 — 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) src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:141 — src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:141-149 | src/main/java/com/williamfiset/algorithms/math/ExtendedEuclideanAlgorithm.java:19-27 | src/main/java/com/williamfiset/algorithms/math/ModPow.java:55-63 | src/main/java/com/williamfiset/algorithms/math/ModularInverse.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.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×4
  • Edited copy of a member (21 corresponding lines) src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.java:29 — src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.java:29-49 | src/main/java/com/williamfiset/algorithms/linearalgebra/ModularLinearAlgebra.java:76-99 — These two members are one piece of code written twice and then edited apart: 21 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.
  • Edited copy of a member (21 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsDfs.java:102 — src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsDfs.java:102-122 | src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsUnionFind.java:88-108 — These two members are one piece of code written twice and then edited apart: 21 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.
  • Edited copy of a member (21 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:177 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:177-197 | src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeapQuickRemovals.java:202-226 — These two members are one piece of code written twice and then edited apart: 21 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.
  • Edited copy of a member (21 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:55 — src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:55-76 | src/main/java/com/williamfiset/algorithms/graphtheory/BridgesAdjacencyList.java:63-83 — These two members are one piece of code written twice and then edited apart: 21 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) · ×4
  • Edited copy of a member (14 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:29 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:29-42 | src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:45-58 — 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.
  • Edited copy of a member (14 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/TspDynamicProgrammingIterative.java:45 — src/main/java/com/williamfiset/algorithms/graphtheory/TspDynamicProgrammingIterative.java:45-58 | src/main/java/com/williamfiset/algorithms/graphtheory/TspDynamicProgrammingRecursive.java:34-54 — 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.
  • Edited copy of a member (14 corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/PointInsideTriangle.java:23 — src/main/java/com/williamfiset/algorithms/geometry/PointInsideTriangle.java:23-39 | src/main/java/com/williamfiset/algorithms/geometry/PointInsideTriangle.java:42-55 — 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.
  • Edited copy of a member (14 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:61 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:61-74 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/RedBlackTree.java:231-244 — 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 · Duplicated block (13 lines × 2) · ×4
  • Duplicated block (13 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:93 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:93-105 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:103-115 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 71 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 `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:93` 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 (13 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:112 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:112-124 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:92-104 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 72 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 `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:112` 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 (13 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:259 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:259-271 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:227-239 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 62 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 (13 lines × 2) src/main/java/com/williamfiset/algorithms/sorting/QuickSelect.java:29 — src/main/java/com/williamfiset/algorithms/sorting/QuickSelect.java:29-41 | src/main/java/com/williamfiset/algorithms/sorting/QuickSort.java:31-43 — 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. 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 lines × 2) · ×4
  • Duplicated block (10 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/queue/IntQueue.java:90 — src/main/java/com/williamfiset/algorithms/datastructures/queue/IntQueue.java:90-99 | src/main/java/com/williamfiset/algorithms/datastructures/queue/IntQueue.java:101-110 — 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) src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:157 — src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:157-166 | src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:294-303 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:232 — src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:232-241 | src/main/java/com/williamfiset/algorithms/math/PrimeFactorization.java:107-116 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java` and `src/main/java/com/williamfiset/algorithms/math/PrimeFactorization.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 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 (10 lines × 2) src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:43 — src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:43-52 | src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.java:47-56 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java` and `src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.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. 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 (5 lines × 4) · ×4
  • Duplicated block (5 lines × 4) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:181 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:181-185 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:301-307 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:550-554 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:357-361 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (5 lines × 4) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:207 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:207-211 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:329-334 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:576-580 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:383-387 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (5 lines × 4) src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:53 — src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:53-58 | src/main/java/com/williamfiset/algorithms/graphtheory/LazyPrimsAdjacencyList.java:51-56 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:136-140 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:118-122 — 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.
  • Duplicated block (5 lines × 4) src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:115 — src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:115-120 | src/main/java/com/williamfiset/algorithms/graphtheory/LazyPrimsAdjacencyList.java:104-109 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:211-215 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:70-74 — 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. 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.
D2 · Cognitive Complexity · SuffixArray.construct (cognitive 25) · ×3
  • SuffixArray.construct (cognitive 25) src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:54 — SuffixArray.construct has cognitive complexity 25 (threshold 15). Drivers by points: loops 10 (16 pts), if/else 3 (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.
  • SuffixArray.construct (cognitive 25) src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.java:58 — SuffixArray.construct has cognitive complexity 25 (threshold 15). Drivers by points: loops 10 (16 pts), if/else 3 (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.
  • SuffixArray.construct (cognitive 25) src/main/java/com/williamfiset/algorithms/strings/SubstringVerificationSuffixArray.java:56 — SuffixArray.construct has cognitive complexity 25 (threshold 15). Drivers by points: loops 10 (16 pts), if/else 3 (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.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (5 members, 50+ identical tokens) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:50 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:50-67 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:168-186 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:285-300 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:419-436 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:226-243 — 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) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:121 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:121-132 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:241-252 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:337-347 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:490-501 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:297-308 — 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) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/CapacityScalingSolverAdjacencyList.java:100 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/CapacityScalingSolverAdjacencyList.java:100-124 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/CapacityScalingSolverAdjacencyList.java:126-150 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:101-125 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/EdmondsKarpAdjacencyList.java:90-114 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/FordFulkersonDfsSolverAdjacencyList.java:92-116 — 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 · Edited copy of a member (17 corresponding lines) · ×3
  • Edited copy of a member (17 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/FloydWarshallSolver.java:135 — src/main/java/com/williamfiset/algorithms/graphtheory/FloydWarshallSolver.java:135-151 | src/main/java/com/williamfiset/algorithms/graphtheory/FloydWarshallSolver.java:154-170 — These two members are one piece of code written twice and then edited apart: 17 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.
  • Edited copy of a member (17 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:55 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:55-71 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:179-196 — These two members are one piece of code written twice and then edited apart: 17 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.
  • Edited copy of a member (17 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:203 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:203-219 | src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeapQuickRemovals.java:232-249 — These two members are one piece of code written twice and then edited apart: 17 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 (5 corresponding lines) · ×3
  • Edited copy of a member (5 corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/ConvexHullMonotoneChainsAlgorithm.java:83 — src/main/java/com/williamfiset/algorithms/geometry/ConvexHullMonotoneChainsAlgorithm.java:83-89 | src/main/java/com/williamfiset/algorithms/geometry/LineSegmentLineSegmentIntersection.java:115-119 — These two members are one piece of code written twice and then edited apart: 5 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.
  • Edited copy of a member (5 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:45 — src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:45-49 | src/main/java/com/williamfiset/algorithms/graphtheory/BridgesAdjacencyList.java:50-56 — These two members are one piece of code written twice and then edited apart: 5 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.
  • Edited copy of a member (5 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/JosephusProblem.java:15 — src/main/java/com/williamfiset/algorithms/dp/JosephusProblem.java:15-19 | src/main/java/com/williamfiset/algorithms/utils/TestUtils.java:9-13 — These two members are one piece of code written twice and then edited apart: 5 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 · Duplicated block (27 lines × 2) · ×3
  • Duplicated block (27 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:145 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:145-171 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:138-164 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java` and `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 123 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 (27 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:239 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:239-265 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:242-268 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java` and `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 123 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 `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.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. 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 (27 lines × 2) src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:101 — src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:101-127 | src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:238-264 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (22 lines × 2) · ×3
  • Duplicated block (22 lines × 2) src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:197 — src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:197-218 | src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:114-135 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java` and `src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java` as WHOLE FILES: this scan already matched 4 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. 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 `src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:197` 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 (22 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:178 — src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:178-199 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:143-164 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java` as WHOLE FILES: this scan already matched 18 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 `src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:178` 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 (22 lines × 2) src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:172 — src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:172-193 | src/main/java/com/williamfiset/algorithms/math/PrimeFactorization.java:45-66 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java` and `src/main/java/com/williamfiset/algorithms/math/PrimeFactorization.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 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 (20 lines × 2) · ×3
  • Duplicated block (20 lines × 2) src/main/java/com/williamfiset/algorithms/geometry/CircleCircleIntersectionArea.java:147 — src/main/java/com/williamfiset/algorithms/geometry/CircleCircleIntersectionArea.java:147-166 | src/main/java/com/williamfiset/algorithms/geometry/PointRotation.java:22-41 — 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. 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) src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:155 — src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:155-174 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:174-193 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java` as WHOLE FILES: this scan already matched 18 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 (20 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:179 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:179-198 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/MiceAndOwls.java:244-263 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/MiceAndOwls.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. 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 (7 lines × 3) · ×3
  • Duplicated block (7 lines × 3) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:246 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:246-252 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:615-621 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:422-428 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java` as WHOLE FILES: this scan already matched 12 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. 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 × 3) src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:149 — src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:149-155 | src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:219-225 | src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:356-362 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (7 lines × 3) src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:108 — src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:108-114 | src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:123-129 | src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:133-139 — 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 `src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.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.
D4 · Code Duplication · Duplicated block (6 lines × 6) · ×3
  • Duplicated block (6 lines × 6) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:153 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:153-158 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:147-152 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:152-157 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:153-158 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:159-164 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:141-146 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 5 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. 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 `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:153` 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 × 6) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/NetworkFlowSolverBase.java:45 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/NetworkFlowSolverBase.java:45-50 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:54-59 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:51-56 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:53-58 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:52-57 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/MiceAndOwls.java:117-122 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.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. 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 (6 lines × 6) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinDHeap.java:78 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinDHeap.java:78-83 | src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:173-178 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:293-298 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:357-362 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:542-547 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:349-354 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D3 · God Classes · MethodTooLong · ×2
  • MethodTooLong: MatrixDeterminantLaplaceExpansion.main src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixDeterminantLaplaceExpansion.java:83 — MethodTooLong — main runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× 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: GenericSegmentTree.<init> src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:141 — MethodTooLong — <init> runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (8 members, 50+ identical tokens) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:299 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:299-308 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:70-80 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:61-71 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:71-81 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/RangeQueryPointUpdateSegmentTree.java:121-131 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:67-77 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:80-90 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:60-70 — 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) src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:132 — src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:132-155 | src/main/java/com/williamfiset/algorithms/graphtheory/BridgesAdjacencyList.java:134-155 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:130-145 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:147-166 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:168-183 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:185-205 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:207-231 | src/main/java/com/williamfiset/algorithms/graphtheory/TarjanSccSolverAdjacencyList.java:123-153 — 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 · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (7 members, 50+ identical tokens) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:385 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:385-393 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:170-178 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:252-260 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:169-177 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:170-178 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:176-184 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:158-166 — These 7 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 7 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 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:527 — src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:527-540 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:144-169 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:172-191 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:194-213 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:229-243 | src/main/java/com/williamfiset/algorithms/graphtheory/LazyPrimsAdjacencyList.java:127-152 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:29-65 — These 7 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 7 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 7 times.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×2
  • Edited copy of a member (36 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/EdmondsKarpAdjacencyList.java:43 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/EdmondsKarpAdjacencyList.java:43-80 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:194-229 — These two members are one piece of code written twice and then edited apart: 36 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.
  • Edited copy of a member (36 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:186 — src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:186-221 | src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:271-306 — These two members are one piece of code written twice and then edited apart: 36 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 (23 corresponding lines) · ×2
  • Edited copy of a member (23 corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/ConvexHullGrahamScan.java:90 — src/main/java/com/williamfiset/algorithms/geometry/ConvexHullGrahamScan.java:90-112 | src/main/java/com/williamfiset/algorithms/geometry/ConvexPolygonArea.java:54-80 — These two members are one piece of code written twice and then edited apart: 23 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.
  • Edited copy of a member (23 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:226 — src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:226-248 | src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:141-167 — These two members are one piece of code written twice and then edited apart: 23 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 (26 corresponding lines) · ×2
  • Edited copy of a member (26 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenter.java:29 — src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenter.java:29-54 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeIsomorphism.java:103-137 — These two members are one piece of code written twice and then edited apart: 26 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.
  • Edited copy of a member (26 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/BellmanFordAdjacencyList.java:48 — src/main/java/com/williamfiset/algorithms/graphtheory/BellmanFordAdjacencyList.java:48-73 | src/main/java/com/williamfiset/algorithms/graphtheory/BellmanFordEdgeList.java:33-71 — These two members are one piece of code written twice and then edited apart: 26 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 (22 corresponding lines) · ×2
  • Edited copy of a member (22 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/TspDynamicProgrammingIterative.java:201 — src/main/java/com/williamfiset/algorithms/graphtheory/TspDynamicProgrammingIterative.java:201-224 | src/main/java/com/williamfiset/algorithms/graphtheory/TspDynamicProgrammingRecursive.java:118-139 — These two members are one piece of code written twice and then edited apart: 22 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.
  • Edited copy of a member (22 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:78 — src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:78-99 | src/main/java/com/williamfiset/algorithms/graphtheory/BridgesAdjacencyList.java:85-106 — These two members are one piece of code written twice and then edited apart: 22 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) · ×2
  • Edited copy of a member (11 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/CompactSegmentTree.java:103 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/CompactSegmentTree.java:103-115 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:575-585 — 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.
  • Edited copy of a member (11 corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/CircularSegmentArea.java:91 — src/main/java/com/williamfiset/algorithms/geometry/CircularSegmentArea.java:91-101 | src/main/java/com/williamfiset/algorithms/geometry/CollinearPoints.java:66-84 — 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 copies of one member (3 members, 16+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 16+ corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenter.java:71 — src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenter.java:71-92 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeIsomorphism.java:208-223 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeIsomorphism.java:237-253 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) src/main/java/com/williamfiset/algorithms/geometry/AngleBetweenVectors2D.java:15 — src/main/java/com/williamfiset/algorithms/geometry/AngleBetweenVectors2D.java:15-31 | src/main/java/com/williamfiset/algorithms/geometry/AngleBetweenVectors3D.java:16-31 | src/main/java/com/williamfiset/algorithms/geometry/CircularSegmentArea.java:73-89 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 9+ corresponding lines) src/main/java/com/williamfiset/algorithms/linearalgebra/LinearRecurrenceSolver.java:28 — src/main/java/com/williamfiset/algorithms/linearalgebra/LinearRecurrenceSolver.java:28-40 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixMultiplication.java:29-39 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixPower.java:63-71 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:79 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:79-93 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/TreapTree.java:79-87 | src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/BinarySearchTree.java:174-191 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×2
  • Edited copy of a member (9 corresponding lines) src/main/java/com/williamfiset/algorithms/sorting/BucketSort.java:13 — src/main/java/com/williamfiset/algorithms/sorting/BucketSort.java:13-21 | src/main/java/com/williamfiset/algorithms/sorting/CountingSort.java:11-19 — These two members are one piece of code written twice and then edited apart: 9 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.
  • Edited copy of a member (9 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableSeparateChaining.java:185 — src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableSeparateChaining.java:185-193 | src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableSeparateChaining.java:195-203 — These two members are one piece of code written twice and then edited apart: 9 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 · Duplicated block (35 lines × 2) · ×2
  • Duplicated block (35 lines × 2) src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:158 — src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:158-192 | src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:74-108 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java` and `src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java` as WHOLE FILES: this scan already matched 4 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. 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 `src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:158` 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 (35 lines × 2) src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:169 — src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:169-203 | src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:306-340 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:213 — src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:213-229 | src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:261-277 — 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 `src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:213` 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) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:74 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:74-90 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:199-215 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (15 lines × 2) · ×2
  • Duplicated block (15 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:205 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:205-219 | src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeapQuickRemovals.java:235-249 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java` and `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeapQuickRemovals.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 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 (15 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:116 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:116-130 | src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeapQuickRemovals.java:128-144 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java` and `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeapQuickRemovals.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 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 (8–12 lines × 3) · ×2
  • Duplicated block (8–12 lines × 3) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:456 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:456-467 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:474-485 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:492-499 — 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 `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:456` 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–12 lines × 3) src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenter.java:81 — src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenter.java:81-91 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenterLongestPathImpl.java:108-119 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenterLongestPathImpl.java:144-151 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×2
  • Duplicated block (8 lines × 4) src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:162 — src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:162-169 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:184-191 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:206-213 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:235-243 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — 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 `src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.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.
  • Duplicated block (8 lines × 4) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:105 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:105-112 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:224-232 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:474-481 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:281-288 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) · ×2
  • Duplicated block (8 lines × 3) src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:188 — src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:188-195 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:294-301 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:153-160 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java` as WHOLE FILES: this scan already matched 18 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 `src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.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.
  • Duplicated block (8 lines × 3) src/main/java/com/williamfiset/algorithms/sorting/QuickSort.java:52 — src/main/java/com/williamfiset/algorithms/sorting/QuickSort.java:52-59 | src/main/java/com/williamfiset/algorithms/sorting/QuickSort3.java:81-88 | src/main/java/com/williamfiset/algorithms/sorting/ShellSort.java:53-60 — 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 (7 lines × 6) · ×2
  • Duplicated block (7 lines × 6) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/NetworkFlowSolverBase.java:106 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/NetworkFlowSolverBase.java:106-112 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:119-125 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:108-114 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:118-124 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:117-123 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/MiceAndOwls.java:182-188 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.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. 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 `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/NetworkFlowSolverBase.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 (7 lines × 6) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinDHeap.java:70 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinDHeap.java:70-76 | src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:165-171 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:285-291 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:349-355 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:534-540 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:341-347 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 5) · ×2
  • Duplicated block (7 lines × 5) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:187 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:187-193 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:309-315 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:377-383 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:556-562 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:363-369 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (7 lines × 5) src/main/java/com/williamfiset/algorithms/graphtheory/BridgesAdjacencyList.java:110 — src/main/java/com/williamfiset/algorithms/graphtheory/BridgesAdjacencyList.java:110-116 | src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsDfs.java:124-130 | src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsUnionFind.java:110-116 | src/main/java/com/williamfiset/algorithms/graphtheory/DepthFirstSearchAdjacencyListRecursive.java:63-69 | src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:170-176 — 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 5 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:130 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:130-140 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:131-141 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 7 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. 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 (11 lines × 2) src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:159 — src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:159-169 | src/main/java/com/williamfiset/algorithms/math/PrimeFactorization.java:32-42 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java` and `src/main/java/com/williamfiset/algorithms/math/PrimeFactorization.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 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 (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:36 — src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:36-40 | src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.java:40-44 | src/main/java/com/williamfiset/algorithms/strings/SubstringVerificationSuffixArray.java:39-43 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java` and `src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.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. 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 (5 lines × 3) src/main/java/com/williamfiset/algorithms/datastructures/stack/IntStack.java:95 — src/main/java/com/williamfiset/algorithms/datastructures/stack/IntStack.java:95-99 | src/main/java/com/williamfiset/algorithms/datastructures/stack/IntStack.java:102-106 | src/main/java/com/williamfiset/algorithms/datastructures/stack/IntStack.java:109-113 — 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.
D1 · Cyclomatic Complexity · Node.knn (cyclomatic 91) · ×1
  • Node.knn (cyclomatic 91) src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java:166 — Node.knn has cyclomatic complexity 91 (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 · GenericSegmentTree.<init> (cyclomatic 31) · ×1
  • GenericSegmentTree.<init> (cyclomatic 31) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:141 — GenericSegmentTree.<init> has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TreePrinter.getTreeDisplay (cyclomatic 27) · ×1
  • TreePrinter.getTreeDisplay (cyclomatic 27) src/main/java/com/williamfiset/algorithms/datastructures/utils/TreePrinter.java:23 — TreePrinter.getTreeDisplay has cyclomatic complexity 27 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D1 · Cyclomatic Complexity · TspDynamicProgrammingIterative.solve (cyclomatic 22) · ×1
  • TspDynamicProgrammingIterative.solve (cyclomatic 22) src/main/java/com/williamfiset/algorithms/graphtheory/TspDynamicProgrammingIterative.java:88 — TspDynamicProgrammingIterative.solve 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 · Solution.f (cyclomatic 21) · ×1
  • Solution.f (cyclomatic 21) src/main/java/com/williamfiset/algorithms/dp/examples/dominoandtrominotiling/Solution.java:17 — Solution.f has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LineSegmentLineSegmentIntersection.lineSegmentLineSegmentIntersection (cyclomatic 19) · ×1
  • LineSegmentLineSegmentIntersection.lineSegmentLineSegmentIntersection (cyclomatic 19) src/main/java/com/williamfiset/algorithms/geometry/LineSegmentLineSegmentIntersection.java:41 — LineSegmentLineSegmentIntersection.lineSegmentLineSegmentIntersection 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 · CoinChange.coinChange (cyclomatic 17) · ×1
  • CoinChange.coinChange (cyclomatic 17) src/main/java/com/williamfiset/algorithms/dp/CoinChange.java:56 — CoinChange.coinChange has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · Node.knn (cognitive 341) · ×1
  • Node.knn (cognitive 341) src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java:166 — Node.knn has cognitive complexity 341 (threshold 15). Drivers by points: if/else 86 (326 pts), boolean chains 6, ternaries 3 (6 pts), loops 2 (3 pts) (nesting depth added 244). 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. This file is where this pass's cognitive complexity CONCENTRATES: src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java holds 2 of the 45 methods over the threshold — including the worst — and 328 of the 674 points over it (49%), 4.3× the next-largest file (src/main/java/com/williamfiset/algorithms/datastructures/utils/TreePrinter.java at 77). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · TreePrinter.getTreeDisplay (cognitive 92) · ×1
  • TreePrinter.getTreeDisplay (cognitive 92) src/main/java/com/williamfiset/algorithms/datastructures/utils/TreePrinter.java:23 — TreePrinter.getTreeDisplay has cognitive complexity 92 (threshold 15). Drivers by points: if/else 13 (38 pts), loops 10 (30 pts), ternaries 4 (23 pts), boolean chains 1 (nesting depth added 64). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · TspDynamicProgrammingIterative.solve (cognitive 48) · ×1
  • TspDynamicProgrammingIterative.solve (cognitive 48) src/main/java/com/williamfiset/algorithms/graphtheory/TspDynamicProgrammingIterative.java:88 — TspDynamicProgrammingIterative.solve has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 8 (15 pts), boolean chains 3 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RedBlackTree.deleteFix (cognitive 31) · ×1
  • RedBlackTree.deleteFix (cognitive 31) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/RedBlackTree.java:160 — RedBlackTree.deleteFix has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 6 (20 pts), if/else 4 (8 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Simplex.simplex (cognitive 28) · ×1
  • Simplex.simplex (cognitive 28) src/main/java/com/williamfiset/algorithms/linearalgebra/Simplex.java:39 — Simplex.simplex has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 6 (13 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 · ChineseRemainderTheorem.reduce (cognitive 27) · ×1
  • ChineseRemainderTheorem.reduce (cognitive 27) src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:63 — ChineseRemainderTheorem.reduce has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 6 (10 pts), boolean chains 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 · SuffixArrayFast.construct (cognitive 25) · ×1
  • SuffixArrayFast.construct (cognitive 25) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayFast.java:53 — SuffixArrayFast.construct has cognitive complexity 25 (threshold 15). Drivers by points: loops 10 (16 pts), if/else 3 (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 · CoinChange.coinChange (cognitive 25) · ×1
  • CoinChange.coinChange (cognitive 25) src/main/java/com/williamfiset/algorithms/dp/CoinChange.java:56 — CoinChange.coinChange has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (6 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SplayTree.splayUtil (cognitive 24) · ×1
  • SplayTree.splayUtil (cognitive 24) src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/SplayTree.java:198 — SplayTree.splayUtil has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 2 (4 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 · ModularLinearAlgebra.rref (cognitive 24) · ×1
  • ModularLinearAlgebra.rref (cognitive 24) src/main/java/com/williamfiset/algorithms/linearalgebra/ModularLinearAlgebra.java:32 — ModularLinearAlgebra.rref has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 5 (11 pts), boolean chains 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 · LineSegmentLineSegmentIntersection.lineSegmentLineSegmentIntersection (cognitive 23) · ×1
  • LineSegmentLineSegmentIntersection.lineSegmentLineSegmentIntersection (cognitive 23) src/main/java/com/williamfiset/algorithms/geometry/LineSegmentLineSegmentIntersection.java:41 — LineSegmentLineSegmentIntersection.lineSegmentLineSegmentIntersection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6, ternaries 2 (4 pts) (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 · Boruvkas.solve (cognitive 23) · ×1
  • Boruvkas.solve (cognitive 23) src/main/java/com/williamfiset/algorithms/graphtheory/Boruvkas.java:73 — Boruvkas.solve has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GaussianElimination.solve (cognitive 23) · ×1
  • GaussianElimination.solve (cognitive 23) src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java:35 — GaussianElimination.solve has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 5 (11 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 · MatrixInverse.solve (cognitive 23) · ×1
  • MatrixInverse.solve (cognitive 23) src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.java:52 — MatrixInverse.solve has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 5 (11 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 · HashTableOpenAddressingBase.put (cognitive 22) · ×1
  • HashTableOpenAddressingBase.put (cognitive 22) src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:134 — HashTableOpenAddressingBase.put has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SparseTable.init (cognitive 22) · ×1
  • SparseTable.init (cognitive 22) src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:70 — SparseTable.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (5 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 · AStar_GridHeuristic.astar (cognitive 22) · ×1
  • AStar_GridHeuristic.astar (cognitive 22) src/main/java/com/williamfiset/algorithms/graphtheory/AStar_GridHeuristic.java:57 — AStar_GridHeuristic.astar has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (4 pts), boolean chains 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 · FloydWarshallSolver.solve (cognitive 22) · ×1
  • FloydWarshallSolver.solve (cognitive 22) src/main/java/com/williamfiset/algorithms/graphtheory/FloydWarshallSolver.java:68 — FloydWarshallSolver.solve has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 3 (9 pts), boolean chains 1 (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 · CoinChange.coinChangeSpaceEfficient (cognitive 21) · ×1
  • CoinChange.coinChangeSpaceEfficient (cognitive 21) src/main/java/com/williamfiset/algorithms/dp/CoinChange.java:129 — CoinChange.coinChangeSpaceEfficient has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChinesePostmanProblem.<init> (cognitive 21) · ×1
  • ChinesePostmanProblem.<init> (cognitive 21) src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:35 — ChinesePostmanProblem.<init> has cognitive complexity 21 (threshold 15). Drivers by points: loops 9 (12 pts), if/else 4 (9 pts) (nesting depth added 8). 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 · Solution.f (cognitive 20) · ×1
  • Solution.f (cognitive 20) src/main/java/com/williamfiset/algorithms/dp/examples/dominoandtrominotiling/Solution.java:17 — Solution.f has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, boolean chains 9. 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 · EditDistance.micahEditDistance (cognitive 20) · ×1
  • EditDistance.micahEditDistance (cognitive 20) src/main/java/com/williamfiset/algorithms/dp/examples/editdistance/EditDistance.java:59 — EditDistance.micahEditDistance has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 2 (7 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 · ClosestPairOfPoints.closestPair (cognitive 20) · ×1
  • ClosestPairOfPoints.closestPair (cognitive 20) src/main/java/com/williamfiset/algorithms/geometry/ClosestPairOfPoints.java:54 — ClosestPairOfPoints.closestPair has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BellmanFordAdjacencyList.bellmanFord (cognitive 20) · ×1
  • BellmanFordAdjacencyList.bellmanFord (cognitive 20) src/main/java/com/williamfiset/algorithms/graphtheory/BellmanFordAdjacencyList.java:48 — BellmanFordAdjacencyList.bellmanFord has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 2 (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 · SteinerTree.floydWarshall (cognitive 20) · ×1
  • SteinerTree.floydWarshall (cognitive 20) src/main/java/com/williamfiset/algorithms/graphtheory/SteinerTree.java:92 — SteinerTree.floydWarshall has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 2 (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 · ZAlgorithm.calculateZ (cognitive 19) · ×1
  • ZAlgorithm.calculateZ (cognitive 19) src/main/java/com/williamfiset/algorithms/strings/ZAlgorithm.java:13 — ZAlgorithm.calculateZ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (8 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 · FibonacciHeap.consolidate (cognitive 18) · ×1
  • FibonacciHeap.consolidate (cognitive 18) src/main/java/com/williamfiset/algorithms/datastructures/fibonacciheap/FibonacciHeap.java:258 — FibonacciHeap.consolidate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (7 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 · AStar_GridHeuristic.dijkstra (cognitive 18) · ×1
  • AStar_GridHeuristic.dijkstra (cognitive 18) src/main/java/com/williamfiset/algorithms/graphtheory/AStar_GridHeuristic.java:216 — AStar_GridHeuristic.dijkstra has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 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 · DijkstrasShortestPathAdjacencyListWithDHeap.dijkstra (cognitive 18) · ×1
  • DijkstrasShortestPathAdjacencyListWithDHeap.dijkstra (cognitive 18) src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:73 — DijkstrasShortestPathAdjacencyListWithDHeap.dijkstra has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 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 · Node.add (cognitive 17) · ×1
  • Node.add (cognitive 17) src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java:88 — Node.add has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 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. This file is where this pass's cognitive complexity CONCENTRATES: src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java holds 2 of the 45 methods over the threshold — including the worst — and 328 of the 674 points over it (49%), 4.3× the next-largest file (src/main/java/com/williamfiset/algorithms/datastructures/utils/TreePrinter.java at 77). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · GenericSegmentTree.<init> (cognitive 17) · ×1
  • GenericSegmentTree.<init> (cognitive 17) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:141 — GenericSegmentTree.<init> has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 7 (12 pts), if/else 5 (nesting depth added 5). 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 · LongestCommonSubsequence.lcs (cognitive 17) · ×1
  • LongestCommonSubsequence.lcs (cognitive 17) src/main/java/com/williamfiset/algorithms/dp/LongestCommonSubsequence.java:47 — LongestCommonSubsequence.lcs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChineseRemainderTheorem.isPrime (cognitive 17) · ×1
  • ChineseRemainderTheorem.isPrime (cognitive 17) src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:199 — ChineseRemainderTheorem.isPrime has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 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 · FastFourierTransform.transform (cognitive 17) · ×1
  • FastFourierTransform.transform (cognitive 17) src/main/java/com/williamfiset/algorithms/math/FastFourierTransform.java:74 — FastFourierTransform.transform has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (8 pts), loops 4 (7 pts), if/else 1 (2 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 · PrimeFactorization.isPrime (cognitive 17) · ×1
  • PrimeFactorization.isPrime (cognitive 17) src/main/java/com/williamfiset/algorithms/math/PrimeFactorization.java:72 — PrimeFactorization.isPrime has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 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 · HashTableOpenAddressingBase.containsKey (cognitive 16) · ×1
  • HashTableOpenAddressingBase.containsKey (cognitive 16) src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:200 — HashTableOpenAddressingBase.containsKey has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 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. This shape REPEATS in the file: one other method here (HashTableOpenAddressingBase.get) 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 · HashTableOpenAddressingBase.get (cognitive 16) · ×1
  • HashTableOpenAddressingBase.get (cognitive 16) src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:248 — HashTableOpenAddressingBase.get has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 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. This shape REPEATS in the file: one other method here (HashTableOpenAddressingBase.containsKey) 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 · SuffixArrayMed.construct (cognitive 16) · ×1
  • SuffixArrayMed.construct (cognitive 16) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java:53 — SuffixArrayMed.construct has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (7 pts), if/else 2 (5 pts), ternaries 1 (3 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 · MinimumWeightPerfectMatching.solveIterative (cognitive 16) · ×1
  • MinimumWeightPerfectMatching.solveIterative (cognitive 16) src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:157 — MinimumWeightPerfectMatching.solveIterative has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (6 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 · WeightedMaximumCardinalityMatchingIterative.solve (cognitive 16) · ×1
  • WeightedMaximumCardinalityMatchingIterative.solve (cognitive 16) src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:73 — WeightedMaximumCardinalityMatchingIterative.solve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (6 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 · SteinerTree.minLengthSteinerTree (cognitive 16) · ×1
  • SteinerTree.minLengthSteinerTree (cognitive 16) src/main/java/com/williamfiset/algorithms/graphtheory/SteinerTree.java:26 — SteinerTree.minLengthSteinerTree has cognitive complexity 16 (threshold 15). Drivers by points: loops 8 (15 pts), if/else 1 (nesting depth added 7). 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 · SuffixArrayImpl.construct (cognitive 16) · ×1
  • SuffixArrayImpl.construct (cognitive 16) src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:239 — SuffixArrayImpl.construct has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (7 pts), if/else 2 (5 pts), ternaries 1 (3 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/Knapsack_01.java:43 — src/main/java/com/williamfiset/algorithms/dp/Knapsack_01.java:43-65 | src/main/java/com/williamfiset/algorithms/dp/Knapsack_01.java:89-121 — 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 (62 corresponding lines) · ×1
  • Edited copy of a member (62 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:157 — src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:157-218 | src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:73-135 — These two members are one piece of code written twice and then edited apart: 62 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 (51 corresponding lines) · ×1
  • Edited copy of a member (51 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java:53 — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java:53-103 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:239-296 — These two members are one piece of code written twice and then edited apart: 51 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 (32 corresponding lines) · ×1
  • Edited copy of a member (32 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/examples/MinSparseTable.java:53 — src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/examples/MinSparseTable.java:53-84 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/LowestCommonAncestorEulerTour.java:198-229 — These two members are one piece of code written twice and then edited apart: 32 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 (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) src/main/java/com/williamfiset/algorithms/strings/RabinKarp.java:73 — src/main/java/com/williamfiset/algorithms/strings/RabinKarp.java:73-107 | src/main/java/com/williamfiset/algorithms/strings/RabinKarp.java:112-145 — These two members are one piece of code written twice and then edited apart: 34 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 (67 corresponding lines) · ×1
  • Edited copy of a member (67 corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:223 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:223-289 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:220-296 — These two members are one piece of code written twice and then edited apart: 67 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) src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:200 — src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:200-239 | src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:248-288 — 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 (18 corresponding lines) · ×1
  • Edited copy of a member (18 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/EditDistanceRecursive.java:67 — src/main/java/com/williamfiset/algorithms/dp/EditDistanceRecursive.java:67-89 | src/main/java/com/williamfiset/algorithms/dp/examples/editdistance/EditDistance.java:38-55 — These two members are one piece of code written twice and then edited apart: 18 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 (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) src/main/java/com/williamfiset/algorithms/dp/DagDynamicProgramming.java:34 — src/main/java/com/williamfiset/algorithms/dp/DagDynamicProgramming.java:34-70 | src/main/java/com/williamfiset/algorithms/graphtheory/Kahns.java:28-65 — These two members are one piece of code written twice and then edited apart: 37 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 (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:177 — src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:177-206 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:142-171 — These two members are one piece of code written twice and then edited apart: 30 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 copies of one member (4 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 13+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:75 — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:75-87 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:82-94 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:116-128 | src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.java:86-98 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/BreadthFirstSearchAdjacencyList.java:122 — src/main/java/com/williamfiset/algorithms/graphtheory/BreadthFirstSearchAdjacencyList.java:122-141 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/LowestCommonAncestorEulerTour.java:262-284 — These two members are one piece of code written twice and then edited apart: 20 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 (27 corresponding lines) · ×1
  • Edited copy of a member (27 corresponding lines) src/main/java/com/williamfiset/algorithms/linearalgebra/LinearRecurrenceSolver.java:46 — src/main/java/com/williamfiset/algorithms/linearalgebra/LinearRecurrenceSolver.java:46-75 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixPower.java:34-60 — These two members are one piece of code written twice and then edited apart: 27 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 (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:85 — src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:85-112 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:284-312 — These two members are one piece of code written twice and then edited apart: 28 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 copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:90 — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:90-104 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:131-144 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:169-182 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) src/main/java/com/williamfiset/algorithms/other/Combinations.java:26 — src/main/java/com/williamfiset/algorithms/other/Combinations.java:26-54 | src/main/java/com/williamfiset/algorithms/other/CombinationsWithRepetition.java:24-52 — These two members are one piece of code written twice and then edited apart: 29 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 (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/examples/TreeHeight.java:89 — src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/examples/TreeHeight.java:89-113 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/examples/TreeSum.java:58-82 — These two members are one piece of code written twice and then edited apart: 25 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 copies of one member (7 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 13+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:321 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:321-333 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:101-116 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:92-107 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:102-117 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:98-115 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:111-126 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:91-106 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 13 lines, 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 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. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 13+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:408 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:408-421 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:423-435 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:437-449 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:451-467 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:469-485 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:487-499 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 13 lines, 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 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. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 19+ corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/CapacityScalingSolverAdjacencyList.java:68 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/CapacityScalingSolverAdjacencyList.java:68-89 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/FordFulkersonDfsSolverAdjacencyList.java:62-80 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:219-238 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/MinCostMaxFlowJohnsons.java:61 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/MinCostMaxFlowJohnsons.java:61-79 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/MinCostMaxFlowWithBellmanFord.java:32-51 — These two members are one piece of code written twice and then edited apart: 19 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) src/main/java/com/williamfiset/algorithms/datastructures/fenwicktree/FenwickTreeRangeQueryPointUpdate.java:27 — src/main/java/com/williamfiset/algorithms/datastructures/fenwicktree/FenwickTreeRangeQueryPointUpdate.java:27-42 | src/main/java/com/williamfiset/algorithms/datastructures/fenwicktree/FenwickTreeRangeUpdatePointQuery.java:23-41 — 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 copies of one member (4 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 11+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:162 — src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:162-172 | src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:174-184 | src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/examples/MinSparseTable.java:103-114 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/LowestCommonAncestorEulerTour.java:232-242 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/unionfind/UnionFind.java:93 — src/main/java/com/williamfiset/algorithms/datastructures/unionfind/UnionFind.java:93-111 | src/main/java/com/williamfiset/algorithms/graphtheory/Boruvkas.java:181-194 | src/main/java/com/williamfiset/algorithms/graphtheory/ConnectedComponentsUnionFind.java:146-160 | src/main/java/com/williamfiset/algorithms/graphtheory/KruskalsEdgeList.java:43-54 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 9+ corresponding lines) src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java:75 — src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java:75-85 | src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java:91-99 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.java:84-95 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.java:101-110 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×1
  • Edited copy of a member (13 corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:440 — src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:440-455 | src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java:90-102 — These two members are one piece of code written twice and then edited apart: 13 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 copies of one member (3 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 8+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:245 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:245-252 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:614-621 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:421-428 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 11+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/RangeQueryPointUpdateSegmentTree.java:270 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/RangeQueryPointUpdateSegmentTree.java:270-280 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/RangeQueryPointUpdateSegmentTree.java:282-292 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/RangeQueryPointUpdateSegmentTree.java:294-304 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/BipartiteGraphCheckAdjacencyList.java:141 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/BipartiteGraphCheckAdjacencyList.java:141-147 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/BipartiteGraphCheckAdjacencyList.java:171-178 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/BipartiteGraphCheckAdjacencyList.java:190-198 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 8+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:336 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:336-343 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:125-134 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:133-142 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:139-148 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 4+ corresponding lines) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/NetworkFlowSolverBase.java:92 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/NetworkFlowSolverBase.java:92-95 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:105-108 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:94-97 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:104-107 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:103-106 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/MiceAndOwls.java:168-171 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 4 lines, 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 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. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 3+ corresponding lines) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:197 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:197-199 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:319-321 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:386-388 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:566-568 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:373-375 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 3 lines, 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 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. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×1
  • Duplicated block (42 lines × 2) src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:211 — src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:211-252 | src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:348-389 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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–33 lines × 2) · ×1
  • Duplicated block (25–33 lines × 2) src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java:37 — src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java:37-69 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.java:54-78 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java` and `src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.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. 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 `src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java:37` 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 (29–31 lines × 2) · ×1
  • Duplicated block (29–31 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:230 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:230-258 | src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/BinarySearchTree.java:100-130 — 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 `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:230` 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 (30–31 lines × 2) · ×1
  • Duplicated block (30–31 lines × 2) src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:200 — src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:200-229 | src/main/java/com/williamfiset/algorithms/math/PrimeFactorization.java:73-103 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java` and `src/main/java/com/williamfiset/algorithms/math/PrimeFactorization.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 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 (25–29 lines × 3) · ×1
  • Duplicated block (25–29 lines × 3) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:310 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:310-334 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:315-341 | src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/BinarySearchTree.java:257-285 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java` and `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 123 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 `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:310` 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 (28–29 lines × 2) · ×1
  • Duplicated block (28–29 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/EdmondsKarpAdjacencyList.java:52 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/EdmondsKarpAdjacencyList.java:52-80 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:202-229 — 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 `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/EdmondsKarpAdjacencyList.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. 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 (24–25 lines × 2) · ×1
  • Duplicated block (24–25 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java:77 — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java:77-101 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:265-288 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java` and `src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.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 `src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java:77` 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 × 2) · ×1
  • Duplicated block (21–22 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java:54 — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java:54-75 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:240-260 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.java` and `src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.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 `src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayMed.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 (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:134 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java:134-152 | src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeapQuickRemovals.java:148-168 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeap.java` and `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeapQuickRemovals.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 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 (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:201 — src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:201-221 | src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:286-306 — 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 `src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.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.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) src/main/java/com/williamfiset/algorithms/dp/examples/narrowartgallery/NarrowArtGalleryRecursive.java:99 — src/main/java/com/williamfiset/algorithms/dp/examples/narrowartgallery/NarrowArtGalleryRecursive.java:99-116 | src/main/java/com/williamfiset/algorithms/dp/examples/narrowartgallery/NarrowArtGalleryRecursive.java:125-143 — 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 `src/main/java/com/williamfiset/algorithms/dp/examples/narrowartgallery/NarrowArtGalleryRecursive.java:99` 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 lines × 6) · ×1
  • Duplicated block (17 lines × 6) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:44 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:44-60 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:34-51 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:45-61 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:40-57 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:54-70 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:34-50 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 5 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. 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–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/MinCostMaxFlowJohnsons.java:65 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/MinCostMaxFlowJohnsons.java:65-79 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/MinCostMaxFlowWithBellmanFord.java:35-51 — 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 `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/MinCostMaxFlowJohnsons.java:65` 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, `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/MinCostMaxFlowJohnsons.java:62` calls `init` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/MinCostMaxFlowWithBellmanFord.java:32` 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 (16 lines × 5) · ×1
  • Duplicated block (16 lines × 5) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/CapacityScalingSolverAdjacencyList.java:109 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/CapacityScalingSolverAdjacencyList.java:109-124 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/CapacityScalingSolverAdjacencyList.java:135-150 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:110-125 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/EdmondsKarpAdjacencyList.java:99-114 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/FordFulkersonDfsSolverAdjacencyList.java:101-116 — there are 5 copies across 4 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/CapacityScalingSolverAdjacencyList.java:109` 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 (17 lines × 3) · ×1
  • Duplicated block (17 lines × 3) src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:75 — src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:75-91 | src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/examples/MinSparseTable.java:55-71 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/LowestCommonAncestorEulerTour.java:200-216 — 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 `src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.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.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:141 — src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:141-155 | src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:205-219 | src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:253-267 — 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 `src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:141` 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, `src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:138` calls `resizeTable` and `src/main/java/com/williamfiset/algorithms/datastructures/hashtable/HashTableOpenAddressingBase.java:202` 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–15 lines × 3) · ×1
  • Duplicated block (13–15 lines × 3) src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:100 — src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:100-112 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:192-206 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:157-171 — 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 `src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:100` 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 × 2) · ×1
  • Duplicated block (14 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/CapacityScalingSolverAdjacencyList.java:76 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/CapacityScalingSolverAdjacencyList.java:76-89 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:225-238 — 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 `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/CapacityScalingSolverAdjacencyList.java:76` 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 (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:60 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:60-71 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:184-196 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:60` 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 (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:56 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:56-67 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:175-186 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:289-300 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:425-436 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:232-243 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:56` 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 after the matched lines, `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:69` calls `size` and `src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:302` 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 (11–15 lines × 4) · ×1
  • Duplicated block (11–15 lines × 4) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayFast.java:88 — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayFast.java:88-102 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java:66-76 | src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.java:70-80 | src/main/java/com/williamfiset/algorithms/strings/SubstringVerificationSuffixArray.java:68-78 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java` and `src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.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. 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 (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:264 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:264-275 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:264-275 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:232-243 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java` as WHOLE FILES: this scan already matched 6 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 `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:263` calls `addEdge` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:261` 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 (2–12 lines × 3) · ×1
  • Duplicated block (2–12 lines × 3) src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:92 — src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:92-93 | src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/examples/MinSparseTable.java:73-84 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/LowestCommonAncestorEulerTour.java:218-229 — 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 `src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/examples/MinSparseTable.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. 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 (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:144 — src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:144-155 | src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:166-175 — 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 `src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:144` 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 (9–11 lines × 3) · ×1
  • Duplicated block (9–11 lines × 3) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:151 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:151-159 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:241-250 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:259-269 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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, `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:271` calls `getGraph`, `toString` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:160` 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–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/RootingTree.java:87 — src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/RootingTree.java:87-97 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeIsomorphism.java:146-155 — 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. 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–10 lines × 6) · ×1
  • Duplicated block (9–10 lines × 6) src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:313 — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:313-322 | src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:320-329 | src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/BinarySearchTree.java:230-238 | src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/BinarySearchTree.java:262-271 | src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/BinarySearchTree.java:312-320 | src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/BinarySearchTree.java:339-347 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java` and `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 123 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 `src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:313` 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–10 lines × 5) · ×1
  • Duplicated block (9–10 lines × 5) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:124 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:124-132 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:244-252 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:338-347 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:493-501 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:300-308 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:124` 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–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) src/main/java/com/williamfiset/algorithms/dp/examples/editdistance/EditDistance.java:90 — src/main/java/com/williamfiset/algorithms/dp/examples/editdistance/EditDistance.java:90-98 | src/main/java/com/williamfiset/algorithms/dp/examples/editdistance/EditDistance.java:113-122 — 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 (8–9 lines × 8) · ×1
  • Duplicated block (8–9 lines × 8) src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:133 — src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:133-140 | src/main/java/com/williamfiset/algorithms/graphtheory/BridgesAdjacencyList.java:135-142 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:131-138 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:148-156 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:169-177 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:188-195 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:208-215 | src/main/java/com/williamfiset/algorithms/graphtheory/TarjanSccSolverAdjacencyList.java:124-131 — there are 8 copies across 4 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 8 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:123` calls `example1`, `exampleFromCp4` and `src/main/java/com/williamfiset/algorithms/graphtheory/BridgesAdjacencyList.java:134` 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 × 6) · ×1
  • Duplicated block (8–9 lines × 6) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:149 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:149-156 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/FordFulkersonDfsSolverAdjacencyList.java:160-168 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:258-265 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:239-246 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:257-264 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:226-233 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:265` calls `addEdge` and `src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:269` 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 (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:137 — src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:137-145 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:158-166 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:175-183 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:197-205 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:218-231 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — 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 `src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:137` 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, `src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:134` calls `addEdge` and `src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:170` 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 (6–9 lines × 2) · ×1
  • Duplicated block (6–9 lines × 2) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:326 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:326-331 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/RangeQueryPointUpdateSegmentTree.java:173-181 — 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 `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:326` 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 (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) src/main/java/com/williamfiset/algorithms/strings/RabinKarp.java:75 — src/main/java/com/williamfiset/algorithms/strings/RabinKarp.java:75-83 | src/main/java/com/williamfiset/algorithms/strings/RabinKarp.java:114-121 — 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. 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 × 7) · ×1
  • Duplicated block (8 lines × 7) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:386 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:386-393 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:171-178 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:253-260 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:170-177 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:171-178 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:177-184 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:159-166 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 5 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. 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 (6–8 lines × 7) · ×1
  • Duplicated block (6–8 lines × 7) src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:528 — src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:528-533 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:145-151 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:173-179 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:195-201 | src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:230-237 | src/main/java/com/williamfiset/algorithms/graphtheory/LazyPrimsAdjacencyList.java:128-134 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:30-36 — there are 7 copies across 4 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 7 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/java/com/williamfiset/algorithms/graphtheory/EagerPrimsAdjacencyList.java:180` calls `addUndirectedEdge` and `src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:534` 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 (8 lines × 6) · ×1
  • Duplicated block (8 lines × 6) src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:137 — src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/Dinics.java:137-144 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/FordFulkersonDfsSolverAdjacencyList.java:147-154 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:253-260 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:228-235 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:245-252 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:214-221 — 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java:93 — src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java:93-99 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.java:103-110 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java` and `src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixInverse.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. 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 `src/main/java/com/williamfiset/algorithms/linearalgebra/GaussianElimination.java:93` 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 (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixDeterminantLaplaceExpansion.java:100 — src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixDeterminantLaplaceExpansion.java:100-107 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixDeterminantLaplaceExpansion.java:109-116 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixDeterminantLaplaceExpansion.java:117-123 — 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 `src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixDeterminantLaplaceExpansion.java:100` 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. 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 (7 lines × 8) · ×1
  • Duplicated block (7 lines × 8) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:300 — src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:300-306 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java:71-77 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:62-68 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQuerySumUpdateSegmentTree.java:72-78 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/RangeQueryPointUpdateSegmentTree.java:122-128 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryAssignUpdateSegmentTree.java:68-74 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQueryMultiplicationUpdateSegmentTree.java:81-87 | src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/SumQuerySumUpdateSegmentTree.java:61-67 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MaxQuerySumUpdateSegmentTree.java` and `src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java` as WHOLE FILES: this scan already matched 5 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. 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) src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixDeterminantLaplaceExpansion.java:128 — src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixDeterminantLaplaceExpansion.java:128-135 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixDeterminantLaplaceExpansion.java:137-144 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixDeterminantLaplaceExpansion.java:146-152 | src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixDeterminantLaplaceExpansion.java:153-158 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — 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 `src/main/java/com/williamfiset/algorithms/linearalgebra/MatrixDeterminantLaplaceExpansion.java:128` 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. 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 × 4) · ×1
  • Duplicated block (6 lines × 4) src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:144 — src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:144-149 | src/main/java/com/williamfiset/algorithms/math/ExtendedEuclideanAlgorithm.java:22-27 | src/main/java/com/williamfiset/algorithms/math/ModPow.java:58-63 | src/main/java/com/williamfiset/algorithms/math/ModularInverse.java:37-42 — 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 `src/main/java/com/williamfiset/algorithms/math/ChineseRemainderTheorem.java:144` 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 × 3) · ×1
  • Duplicated block (5–6 lines × 3) src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:97 — src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:97-101 | src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/examples/MinSparseTable.java:77-82 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/LowestCommonAncestorEulerTour.java:222-227 — 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 `src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/examples/MinSparseTable.java:77` 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 (3–6 lines × 3) · ×1
  • Duplicated block (3–6 lines × 3) src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:92 — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:92-97 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:132-137 | src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:172-174 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java` and `src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.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 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 `src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:92` 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, `src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:91` calls `buildLcpArray` and `src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:131` 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 (4–6 lines × 3) · ×1
  • Duplicated block (4–6 lines × 3) src/main/java/com/williamfiset/algorithms/dp/examples/narrowartgallery/NarrowArtGalleryRecursive.java:157 — src/main/java/com/williamfiset/algorithms/dp/examples/narrowartgallery/NarrowArtGalleryRecursive.java:157-162 | src/main/java/com/williamfiset/algorithms/dp/examples/narrowartgallery/NarrowArtGalleryRecursive.java:170-175 | src/main/java/com/williamfiset/algorithms/dp/examples/narrowartgallery/NarrowArtGalleryRecursive.java:178-181 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/java/com/williamfiset/algorithms/dp/examples/narrowartgallery/NarrowArtGalleryRecursive.java:163` calls `ok`, `f` and `src/main/java/com/williamfiset/algorithms/dp/examples/narrowartgallery/NarrowArtGalleryRecursive.java:176` 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 (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:135 — src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java:135-143 | src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:255-263 | src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:504-512 | src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:311-319 — before extracting anything, compare `src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/MinIndexedDHeap.java` and `src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) src/main/java/com/williamfiset/algorithms/geometry/CircularSegmentArea.java:53 — src/main/java/com/williamfiset/algorithms/geometry/CircularSegmentArea.java:53-70 | src/main/java/com/williamfiset/algorithms/geometry/TriangleArea.java:30-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 both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/java/com/williamfiset/algorithms/geometry/CircularSegmentArea.java:53` 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 `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 lines × 9) · ×1
  • Duplicated block (5 lines × 9) src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:103 — src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:103-107 | src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:111-115 | src/main/java/com/williamfiset/algorithms/graphtheory/TarjanSccSolverAdjacencyList.java:111-116 | src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/BipartiteGraphCheckAdjacencyList.java:85-89 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/LowestCommonAncestorEulerTour.java:165-169 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/RootingTree.java:101-105 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeCenter.java:58-62 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeDiameter.java:109-113 | src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms/TreeIsomorphism.java:180-184 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 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 9 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:111` calls `get`, `add` and `src/main/java/com/williamfiset/algorithms/graphtheory/Kosaraju.java:120` 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: GenericSegmentTree (LCOM4 6) src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:37 — GenericSegmentTree's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
IC1 · Incompleteness & stubs · Unfinished stub · ×1
  • Unfinished stub — throws a "not implemented" exception src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/RangeQueryPointUpdateSegmentTree.java:256 — `rangeUpdate` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
Minor — 132 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×116
  • Orphaned file src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/graphtheory/analysis/PrimsGraphRepresentationAnaylsis.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/GenericSegmentTree.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/datastructures/quadtree/QuadTree.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/graphtheory/examples/EagerPrimsExample.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/RangeQueryPointUpdateSegmentTree.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/BinarySearchTree.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/datastructures/segmenttree/MinQueryAssignUpdateSegmentTree.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/datastructures/fibonacciheap/FibonacciHeap.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/graphtheory/DijkstrasShortestPathAdjacencyListWithDHeap.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/datastructures/binarysearchtree/SplayTree.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/CapacityScalingExample.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/graphtheory/AStar_GridHeuristic.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/EdmondsKarpExample.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/datastructures/priorityqueue/BinaryHeapQuickRemovals.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/datastructures/sparsetable/SparseTable.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/MiceAndOwls.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/DinicsExample.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/graphtheory/networkflow/examples/FordFulkersonExample.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/datastructures/bloomfilter/StringSet.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/williamfiset/algorithms/strings/RabinKarp.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 91 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×10
  • Duplicated predicate src/main/java/com/williamfiset/algorithms/other/SlidingWindowMaximum.java:49 — `!deque.isEmpty() && deque.peekFirst() < lo` appears character-identically in 2 files — src/main/java/com/williamfiset/algorithms/other/SlidingWindowMaximum.java, src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java:465 — `(endNodes == 0 && startNodes == 0) || (endNodes == 1 && startNodes == 1)` appears character-identically in 2 files — src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java, src/main/java/com/williamfiset/algorithms/graphtheory/EulerianPathDirectedEdgesAdjacencyList.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java:82 — `(i + len < N) && (k + len < N) && T[i + len] == T[k + len]` appears character-identically in 4 files — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArray.java, src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java, src/main/java/com/williamfiset/algorithms/strings/LongestCommonSubstring.java, src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java:204 — `dp[newState] == null || newCost < dp[newState]` appears character-identically in 2 files — src/main/java/com/williamfiset/algorithms/dp/MinimumWeightPerfectMatching.java, src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingIterative.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java:46 — `graph == null || n <= 0 || graph.size() != n` appears character-identically in 2 files — src/main/java/com/williamfiset/algorithms/graphtheory/ArticulationPointsAdjacencyList.java, src/main/java/com/williamfiset/algorithms/graphtheory/BridgesAdjacencyList.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java:242 — `isOdd && (leftNode == artificialNodeId || rightNode == artificialNodeId)` appears character-identically in 2 files — src/main/java/com/williamfiset/algorithms/dp/WeightedMaximumCardinalityMatchingRecursive.java, src/main/java/com/williamfiset/algorithms/graphtheory/ChinesePostmanProblem.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:358 — `isValid && node.left.value.compareTo(val) < 0` appears character-identically in 2 files — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java, src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java:359 — `isValid && node.right.value.compareTo(val) > 0` appears character-identically in 2 files — src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursive.java, src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayFast.java:89 — `rank[sa[i - 1]] == rank[sa[i]] && sa[i - 1] + p < N && sa[i] + p < N && rank[sa[i - 1] + p] == rank[sa[i] + p]` appears character-identically in 4 files — src/main/java/com/williamfiset/algorithms/datastructures/suffixarray/SuffixArrayFast.java, src/main/java/com/williamfiset/algorithms/strings/LongestCommonPrefixArray.java, src/main/java/com/williamfiset/algorithms/strings/LongestRepeatedSubstring.java, src/main/java/com/williamfiset/algorithms/strings/SubstringVerificationSuffixArray.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/williamfiset/algorithms/geometry/LineCircleIntersection.js:67 — `Math.abs((x1-r)-x) < EPS || Math.abs((x1+r)-x) < EPS` appears character-identically in 2 files — src/main/java/com/williamfiset/algorithms/geometry/LineCircleIntersection.js, src/main/java/com/williamfiset/algorithms/geometry/LineSegmentCircleIntersection.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D24 · Comment Value · redundant comment · ×1
  • redundant comment src/main/java/com/williamfiset/algorithms/geometry/LineSegmentCircleIntersection.js:136 — "Finds the intersection(s) of a line segment and a circle" repeats the code it sits on: 4 of its 5 words (intersection, line, segment, circle) are already in `function lineSegmentCircleIntersection(segment, circle)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D34 · Knowledge Freshness · Concentrated knowledge decay · ×1
  • Concentrated knowledge decay — 116 of 145 significant files have no living knowledge, while the repository is still being changed at a low rate (1 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 116 separate risks. Counted over 145 of the 226 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them.
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 REDACTED:4 — 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) as a CI step. What was searched, so you can tell an absence from a miss: the 2 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.
X5 · Nullable reference types · Java packages are not null-marked everywhere · ×1
  • Java packages are not null-marked everywhere — 0/47 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.

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/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-fd33d027af5043ad95abf7fb26035f11/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/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-fd33d027af5043ad95abf7fb26035f11/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/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .7artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnone (no readable dependency manifest)—none (no readable dependency manifest): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).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—
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 Dependenciesnone (no readable dependency manifest)—none (no readable dependency manifest): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).0—

Run 01a1d548-6bd9-760e-88b3-cfcad54a54fc · 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