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

TheAlgorithms/Java

Measured 24 September 2026, 14:34 UTC

72% Strong
CriticalWeakAdequateStrongExemplary

Medium · 76,417 LoC · rebuild ~1.2 person-years · weakest lens: Maturity (65%)

Findings by grade

28 critical 274 serious 11 minor 46 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
24 September 2026, 14:34 UTC

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

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

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

Executive summary

Template / example. This repo declares itself a template, kata, sample or demo — code to read or copy, not operate — so the ship-it and operate-it dimensions (CI/CD, observability, ADRs, architecture docs, deployment security) are N/A and what remains is judged accordingly.

The system holds a strong overall standing at 72%, indicating a robust asset that is largely healthy but carries specific operational risks. With nearly 76,000 lines of production code and a comparable volume of tests, the platform represents a significant investment. Rebuilding this logic from scratch would require approximately 1.2 person-years and cost around €170,000, underscoring the value of maintaining and improving the existing foundation rather than replacing it.

The primary risk lies in knowledge and operational readiness. While the code structure is excellent, the team’s ability to onboard new engineers and safely operate the system is compromised by insufficient documentation and immature release processes. Without clear architectural guides or a standardized changelog, new team members face a steep learning curve, increasing the likelihood of human error during deployments. This gap exposes the business to potential delays and defects, as there is no formal mechanism to pause a release if a build fails, leaving the system vulnerable to unstable updates reaching users.

Conversely, the codebase itself is a genuine strength. The architecture is pristine, and the code health is exceptional, meaning changes are unlikely to cause unintended ripple effects or introduce bugs. This high quality reduces long-term maintenance costs and ensures that future feature development can proceed quickly and reliably. The low boilerplate content further suggests that the logic is purposeful and well-structured, avoiding the technical debt often associated with rapid, unstructured growth.

To maximize leverage, the immediate focus must be on expanding the README to include a getting-started guide, an architecture overview, and a project map. This single action addresses the most critical gap in team maturity and operational safety. By clarifying how the system works and how to interact with it, the organization can significantly reduce onboarding time and deployment anxiety. This foundational improvement should precede any other technical refinements, as it enables the team to work more effectively and safely across all other areas.

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

Raise Maturity 65 → 70 (the Healthy floor) ⇒ headline 72 → ~73.

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

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

  • D2 · Adwin.detectChange (cognitive 21) src/main/java/com/thealgorithms/streaming/Adwin.java
  • D2 · RegexMatching.regexRecursion (cognitive 18) src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java
  • D2 · RegexMatching.regexRecursion (cognitive 16) src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java
  • D2 · RegexMatching.regexRecursion (cognitive 16) src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java
  • D4 · Edited copy of a member (23 corresponding lines) src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java
  • D4 · Edited copy of a member (30 corresponding lines) src/main/java/com/thealgorithms/ciphers/AES.java
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) src/main/java/com/thealgorithms/graph/Dinic.java
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) src/main/java/com/thealgorithms/graph/Dinic.java
  • D4 · Duplicated block (30 lines × 2) src/main/java/com/thealgorithms/ciphers/HillCipher.java
  • D4 · Duplicated block (23 lines × 2) src/main/java/com/thealgorithms/datastructures/trees/BSTRecursiveGeneric.java
  • D4 · Duplicated block (21–23 lines × 2) src/main/java/com/thealgorithms/maths/AliquotSum.java
  • D4 · Duplicated block (20–22 lines × 2) src/main/java/com/thealgorithms/others/MosAlgorithm.java
  • D4 · Duplicated block (18–20 lines × 2) src/main/java/com/thealgorithms/graph/EdmondsKarp.java
  • D4 · Duplicated block (19 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java
  • D4 · Duplicated block (18–19 lines × 2) src/main/java/com/thealgorithms/datastructures/queues/SlidingWindowMaximum.java
  • D4 · Duplicated block (16–17 lines × 2) src/main/java/com/thealgorithms/graph/EdmondsKarp.java
  • D4 · Duplicated block (12–17 lines × 2) src/main/java/com/thealgorithms/maths/FindKthNumber.java
  • D4 · Duplicated block (17 lines × 2) src/main/java/com/thealgorithms/strings/Anagrams.java
  • D4 · Duplicated block (16 lines × 2) src/main/java/com/thealgorithms/slidingwindow/MaxSumKSizeSubarray.java
  • D4 · Duplicated block (15 lines × 3) src/main/java/com/thealgorithms/sorts/LinkListSort.java
  • D4 · Duplicated block (15 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java
  • D4 · Duplicated block (14–15 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java
  • D4 · Duplicated block (15 lines × 2) src/main/java/com/thealgorithms/datastructures/lists/CircleLinkedList.java
  • D4 · Duplicated block (15 lines × 2) src/main/java/com/thealgorithms/stacks/PostfixEvaluator.java
  • D4 · Duplicated block (14 lines × 2) src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java
  • D4 · Duplicated block (14 lines × 2) src/main/java/com/thealgorithms/maths/PadovanSequence.java
  • D4 · Duplicated block (13–14 lines × 2) src/main/java/com/thealgorithms/others/SkylineProblem.java
  • D4 · Duplicated block (14 lines × 2) src/main/java/com/thealgorithms/stacks/InfixToPostfix.java
  • D4 · Duplicated block (13 lines × 2) src/main/java/com/thealgorithms/ciphers/AES.java
  • D4 · Duplicated block (11–13 lines × 2) src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java
  • D4 · Duplicated block (13 lines × 2) src/main/java/com/thealgorithms/datastructures/trees/AVLTree.java
  • D4 · Duplicated block (12–13 lines × 2) src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java
  • D4 · Duplicated block (13 lines × 2) src/main/java/com/thealgorithms/matrix/QRDecomposition.java
  • D4 · Duplicated block (12 lines × 2) src/main/java/com/thealgorithms/ciphers/AES.java
  • D4 · Duplicated block (12 lines × 2) src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java
  • D4 · Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/conversions/RgbHsvConversion.java
  • D4 · Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java
  • D4 · Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java
  • D4 · Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/graph/Dinic.java
  • D4 · Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/greedyalgorithms/BandwidthAllocation.java
  • D4 · Duplicated block (9–11 lines × 2) src/main/java/com/thealgorithms/machinelearning/KNearestNeighbors.java
  • D4 · Duplicated block (10 lines × 3) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java
  • D4 · Duplicated block (9–10 lines × 3) src/main/java/com/thealgorithms/datastructures/trees/Trie.java
  • D4 · Duplicated block (10 lines × 2) src/main/java/com/thealgorithms/ciphers/AES.java
  • D4 · Duplicated block (10 lines × 2) src/main/java/com/thealgorithms/ciphers/AES.java
  • D4 · Duplicated block (10 lines × 2) src/main/java/com/thealgorithms/ciphers/Blowfish.java
  • D4 · Duplicated block (10 lines × 2) src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java
  • D4 · Duplicated block (10 lines × 2) src/main/java/com/thealgorithms/ciphers/Vigenere.java
  • D4 · Duplicated block (8–10 lines × 2) src/main/java/com/thealgorithms/conversions/OctalToDecimal.java
  • D4 · Duplicated block (10 lines × 2) src/main/java/com/thealgorithms/datastructures/heaps/IndexedPriorityQueue.java
  • D4 · Duplicated block (10 lines × 2) src/main/java/com/thealgorithms/others/BankersAlgorithm.java
  • D4 · Duplicated block (10 lines × 2) src/main/java/com/thealgorithms/stacks/MaximumMinimumWindow.java
  • D4 · Duplicated block (9 lines × 5) src/main/java/com/thealgorithms/graph/Dinic.java
  • D4 · Duplicated block (8–9 lines × 2) src/main/java/com/thealgorithms/ciphers/Caesar.java
  • D4 · Duplicated block (9 lines × 2) src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java
  • D4 · Duplicated block (8–9 lines × 2) src/main/java/com/thealgorithms/graph/Dinic.java
  • D4 · Duplicated block (8–9 lines × 2) src/main/java/com/thealgorithms/others/Verhoeff.java
  • D4 · Duplicated block (9 lines × 2) src/main/java/com/thealgorithms/searches/IterativeBinarySearch.java
  • D4 · Duplicated block (9 lines × 2) src/main/java/com/thealgorithms/sorts/ConcurrentMergeSort.java
  • D4 · Duplicated block (8–9 lines × 2) src/main/java/com/thealgorithms/sorts/IntrospectiveSort.java
  • D4 · Duplicated block (9 lines × 2) src/main/java/com/thealgorithms/sorts/LinkListSort.java
  • D4 · Duplicated block (9 lines × 2) src/main/java/com/thealgorithms/sorts/TreeSort.java
  • D4 · Duplicated block (9 lines × 2) src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java
  • D4 · Duplicated block (9 lines × 2) src/main/java/com/thealgorithms/strings/KMP.java
  • D4 · Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java
  • D4 · Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/graph/PushRelabel.java
  • D4 · Duplicated block (5–8 lines × 3) src/main/java/com/thealgorithms/randomized/RandomizedMatrixMultiplicationVerification.java
  • D4 · Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/sorts/OddEvenSort.java
  • D4 · Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/stacks/NextGreaterElement.java
  • D4 · Duplicated block (7 lines × 2) src/main/java/com/thealgorithms/ciphers/ColumnarTranspositionCipher.java
  • D4 · Duplicated block (7 lines × 2) src/main/java/com/thealgorithms/datastructures/graphs/EdmondsBlossomAlgorithm.java
  • D4 · Duplicated block (7 lines × 2) src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java
  • D4 · Duplicated block (7 lines × 2) src/main/java/com/thealgorithms/dynamicprogramming/EditDistance.java
  • D4 · Duplicated block (6–7 lines × 2) src/main/java/com/thealgorithms/dynamicprogramming/LongestCommonSubsequence.java
  • D4 · Duplicated block (7 lines × 2) src/main/java/com/thealgorithms/streaming/CusumDetector.java
  • D4 · Duplicated block (6 lines × 2) src/main/java/com/thealgorithms/datastructures/graphs/BellmanFord.java
  • D4 · Duplicated block (6 lines × 2) src/main/java/com/thealgorithms/graph/Dinic.java
  • D4 · Duplicated block (5 lines × 3) src/main/java/com/thealgorithms/graph/Dinic.java
  • D4 · Duplicated block (5 lines × 3) src/main/java/com/thealgorithms/graph/Dinic.java
  • D4 · Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/ciphers/PermutationCipher.java
  • D4 · Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/datastructures/graphs/BellmanFord.java
  • D4 · Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/datastructures/trees/LevelOrderTraversal.java
  • D4 · Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java
  • D4 · Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/maths/CircularConvolutionFFT.java
  • D4 · Duplicated block (2–5 lines × 3) src/main/java/com/thealgorithms/maths/EulerMethod.java
  • D4 · Duplicated block (9 lines × 3) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java
  • D4 · Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java
  • D4 · Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java
  • D4 · Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/datastructures/trees/BSTRecursive.java
  • D4 · Duplicated block (6 lines × 2) src/main/java/com/thealgorithms/graph/AccountMerge.java
  • D4 · Duplicated block (6 lines × 2) src/main/java/com/thealgorithms/graph/ConstrainedShortestPath.java
  • D4 · Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/maths/CircularConvolutionFFT.java
  • D4 · Duplicated block (6 lines × 2) src/main/java/com/thealgorithms/maths/Combinations.java
  • D4 · Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/matrix/QRDecomposition.java
  • D4 · Duplicated block (9 lines × 2) src/main/java/com/thealgorithms/matrix/QRDecomposition.java
  • D4 · Duplicated block (6 lines × 2) src/main/java/com/thealgorithms/others/Damm.java
  • D4 · Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/others/Damm.java
  • D4 · Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/sorts/CountingSort.java
  • D4 · Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/stacks/InfixToPostfix.java
  • D4 · Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/stacks/InfixToPostfix.java

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

Rebuild cost & value ~ Modeled — €57,000–€290,000
Cost to rebuild€57,000–€290,000 (0.6–1.8 person-years (952–3,021 h), ~1–3 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor1.0× (at 72% quality) — the last 20% of quality is most of the work
Size & shapeMedium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

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

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

Top priorities

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

1
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with Blowfish.java, LIFOCache.java, FIFOCache.java.
+4.6 pts · Low effort · Knowledge Freshness
2
Expand the README with getting-started, architecture overview and a project map.
+6.6 pts · Medium effort · Documentation (README)
3
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
+5.3 pts · Medium effort · Deployment & Rollback

Diagnosis — what's actually going on

Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Expand the README with getting-started, architecture overview and a project map. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Expand the README with getting-started, architecture overview and a project map.

Architecture — module dependency matrix

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

56 modules, 5 dependencies. Every dependency points down the layering — no cycles.

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

Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
depends on →1 .github.workflows.scripts2 com.thealgorithms.audiofilters3 com.thealgorithms.backtracking4 com.thealgorithms.bitmanipulation5 com.thealgorithms.ciphers6 com.thealgorithms.ciphers.a57 com.thealgorithms.compression8 com.thealgorithms.conversions9 com.thealgorithms.datastructures10 com.thealgorithms.datastructures.bags11 com.thealgorithms.datastructures.bloomfilter12 com.thealgorithms.datastructures.buffers13 com.thealgorithms.datastructures.caches14 com.thealgorithms.datastructures.crdt15 com.thealgorithms.datastructures.disjointsetunion16 com.thealgorithms.datastructures.dynamicarray17 com.thealgorithms.datastructures.graphs18 com.thealgorithms.datastructures.hashmap.hashing19 com.thealgorithms.datastructures.heaps20 com.thealgorithms.datastructures.lists21 com.thealgorithms.datastructures.queues22 com.thealgorithms.datastructures.stacks23 com.thealgorithms.datastructures.trees24 com.thealgorithms.devutils.entities25 com.thealgorithms.devutils.nodes26 com.thealgorithms.devutils.searches27 com.thealgorithms.divideandconquer28 com.thealgorithms.geometry29 com.thealgorithms.graph30 com.thealgorithms.greedyalgorithms31 com.thealgorithms.io32 com.thealgorithms.lineclipping.utils33 com.thealgorithms.machinelearning34 com.thealgorithms.maths35 com.thealgorithms.maths.Prime36 com.thealgorithms.matrix37 com.thealgorithms.dynamicprogramming38 com.thealgorithms.lineclipping39 com.thealgorithms.scheduling40 com.thealgorithms.searches
1 .github.workflows.scripts
2 com.thealgorithms.audiofilters
3 com.thealgorithms.backtracking
4 com.thealgorithms.bitmanipulation
5 com.thealgorithms.ciphers
6 com.thealgorithms.ciphers.a5
7 com.thealgorithms.compression
8 com.thealgorithms.conversions
9 com.thealgorithms.datastructures
10 com.thealgorithms.datastructures.bags
11 com.thealgorithms.datastructures.bloomfilter
12 com.thealgorithms.datastructures.buffers
13 com.thealgorithms.datastructures.caches
14 com.thealgorithms.datastructures.crdt
15 com.thealgorithms.datastructures.disjointsetunion
16 com.thealgorithms.datastructures.dynamicarray
17 com.thealgorithms.datastructures.graphs
18 com.thealgorithms.datastructures.hashmap.hashing
19 com.thealgorithms.datastructures.heaps
20 com.thealgorithms.datastructures.lists
21 com.thealgorithms.datastructures.queues
22 com.thealgorithms.datastructures.stacks
23 com.thealgorithms.datastructures.trees
24 com.thealgorithms.devutils.entities
25 com.thealgorithms.devutils.nodes
26 com.thealgorithms.devutils.searches
27 com.thealgorithms.divideandconquer
28 com.thealgorithms.geometry
29 com.thealgorithms.graph
30 com.thealgorithms.greedyalgorithms
31 com.thealgorithms.io
32 com.thealgorithms.lineclipping.utils
33 com.thealgorithms.machinelearning
34 com.thealgorithms.maths
35 com.thealgorithms.maths.Prime
36 com.thealgorithms.matrix
37 com.thealgorithms.dynamicprogramming1
38 com.thealgorithms.lineclipping2
39 com.thealgorithms.scheduling5
40 com.thealgorithms.searches214
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
…hub.workflows.scripts…gorithms.audiofilters…gorithms.backtracking…ithms.bitmanipulation…thealgorithms.ciphers…algorithms.ciphers.a5…lgorithms.compression…lgorithms.conversions…rithms.datastructures…s.datastructures.bags…tructures.bloomfilter…atastructures.buffers…datastructures.caches…s.datastructures.crdt…ures.disjointsetunion…ructures.dynamicarray…datastructures.graphs…tures.hashmap.hashing….datastructures.heaps….datastructures.lists…datastructures.queues…datastructures.stacks….datastructures.trees…hms.devutils.entities…rithms.devutils.nodes…hms.devutils.searches…thms.divideandconquer…healgorithms.geometry…m.thealgorithms.graph…thms.greedyalgorithmscom.thealgorithms.io…ms.lineclipping.utils…ithms.machinelearning…m.thealgorithms.maths…lgorithms.maths.Prime….thealgorithms.matrix…ms.dynamicprogramming…gorithms.lineclipping…algorithms.scheduling…healgorithms.searches…hub.workflows.scripts1…gorithms.audiofilters2…gorithms.backtracking3…ithms.bitmanipulation4…thealgorithms.ciphers5…algorithms.ciphers.a56…lgorithms.compression7…lgorithms.conversions8…rithms.datastructures9…s.datastructures.bags10…tructures.bloomfilter11…atastructures.buffers12…datastructures.caches13…s.datastructures.crdt14…ures.disjointsetunion15…ructures.dynamicarray16…datastructures.graphs17…tures.hashmap.hashing18….datastructures.heaps19….datastructures.lists20…datastructures.queues21…datastructures.stacks22….datastructures.trees23…hms.devutils.entities24…rithms.devutils.nodes25…hms.devutils.searches26…thms.divideandconquer27…healgorithms.geometry28…m.thealgorithms.graph29…thms.greedyalgorithms30com.thealgorithms.io31…ms.lineclipping.utils32…ithms.machinelearning33…m.thealgorithms.maths34…lgorithms.maths.Prime35….thealgorithms.matrix36…ms.dynamicprogramming37…gorithms.lineclipping38…algorithms.scheduling39…healgorithms.searches40125214+16 more modules (most-connected shown)

At a glance — Code Health · 92% · Exemplary ·

At a glance — Architecture · 100% · Exemplary ·

At a glance — Maturity · 65% · Adequate · gated by D34, M1 ·

At a glance — Readiness · 68% · Strong ·

At a glance — Security · 79% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2021 — Injection25REDACTED / Critical
A05:2021 — Security Misconfiguration3REDACTED / Critical
A04:2021 — Insecure Design2REDACTED / Critical

Roadmap

Begin by expanding the README to include getting-started instructions, an architecture overview, and a project map. Next, implement a draft release or approval gate to prevent bad builds from reaching users, and maintain a changelog to track release details. Finally, address knowledge decay by resolving the most significant orphaned files, specifically Blowfish.java, LIFOCache.java, and FIFOCache.java, followed by other concentrated decay findings.

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

Do thisHelpsEffortDimension
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with Blowfish.java, LIFOCache.java, FIFOCache.java.+4.6 ptsLowKnowledge Freshness
Expand the README with getting-started, architecture overview and a project map.+6.6 ptsMediumDocumentation (README)
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.+5.3 ptsMediumDeployment & Rollback
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+5.3 ptsMediumRelease Hygiene
Resolve the 1 Concentrated knowledge decay finding(s) in Knowledge Freshness.+2.0 ptsLowKnowledge Freshness
Resolve the 2 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED (2).+1.8 ptsLowData Compliance (PII/GDPR)
Resolve the 3 Off-boarding risk finding(s) in Bus Factor.+1.3 ptsLowBus Factor
Resolve the 2 REDACTED finding(s) charged to Static Analysis (SAST) — the other 23 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once.+1.0 ptsLowStatic Analysis (SAST)

File quality

Per-file score 0–10 — a quality signature. Of 180 files carrying findings, judged against the Template bar: 0% slop · 4% mixed · 96% near-clean.

FileScoreBandWorst signal
REDACTED4.4MixedStatic Analysis (SAST): REDACTED: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): REDACTED: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): REDACTED: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): REDACTED: REDACTED
REDACTED5.1MixedIaC & Container Security: REDACTED IaC: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): REDACTED: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): REDACTED: REDACTED
REDACTED5.8MixedData Compliance (PII/GDPR): REDACTED: REDACTED
src/main/java/com/thealgorithms/graph/Dinic.java7.0Near-cleanCognitive Complexity: Dinic.maxFlow (cognitive 18)
src/test/java/com/thealgorithms/maths/FibonacciJavaStreamsTest.java7.0Near-cleanTest Quality: No assertions: testCheck100thSequenceElement
src/test/java/com/thealgorithms/sorts/InsertionSortTest.java7.0Near-cleanTest Quality: No assertions: insertionSortClassicalForArrayWithDuplicateValuesShouldPass
src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java7.1Near-cleanCode Duplication: Duplicated block (15 lines × 2)
src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java7.1Near-cleanCognitive Complexity: RegexMatching.regexBU (cognitive 20)
src/main/java/com/thealgorithms/ciphers/AES.java7.1Near-cleanCode Duplication: Edited copy of a member (30 corresponding lines)
src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java7.1Near-cleanCode Duplication: Duplicated block (8 lines × 2)
src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java7.2Near-cleanCognitive Complexity: RedBlackBST.deleteFixup (cognitive 27)
src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java7.2Near-cleanCognitive Complexity: ClosestPair.closestPair (cognitive 25)
src/main/java/com/thealgorithms/stacks/InfixToPostfix.java7.2Near-cleanCognitive Complexity: InfixToPostfix.infix2PostFix (cognitive 20)
src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java7.2Near-cleanCode Duplication: Duplicated block (19 lines × 2)
src/test/java/com/thealgorithms/datastructures/trees/CreateBinaryTreeFromInorderPreorderTest.java7.2Near-cleanTest Quality: No assertions: testOnLeftSkewedTreeShouldCreateCorrectTree

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

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

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

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

Could not be resolved — 46

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

Methodology & how to trust this report

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

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

What we checked — 27 dimensions across the health lenses
D1D2D3D4D9D10D11D13D15D16D17D19D21D28D29D31D32D34D35AX10M1M3M4P1P3P4P6

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, 304 of 313 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a0d3d7-4a04-7b09-87b8-15d2319342a0.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT READ here — but this repository measures it: a coverage step in CI (`codecov/codecov-action`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.java), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored. To have the real number read, produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Dependency Hygiene ran out of its 5-minute budget before it had finished, so what it reports here is a floor rather than a complete count. The rows above are real and stand; what is not known is how many more there are. This is a limit of the analysis run, not a finding about this repository.
  • D14 License Compliance — evaluation did not complete — License Compliance not included (check did not complete) — excluded from the score.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: D22 has no public-API collector for any other ecosystem, and the remedy is to write one — no change to the scan image can close it.
  • D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (go.mod, a Gemfile's ruby directive, a REDACTED) is simply not read here yet.
  • AX3 Project dependency cycles — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which project references which — facts that live in .csproj references. This repository either commits no MSBuild project at all (its C# may still have been parsed as syntax-only projects, which carry no references between them) or its projects failed to load, so there was no graph to read. That is a gap in this analyzer's reach — not a finding that the repository is free of what this check looks for.
  • AX4 Dependency direction — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the direction each project reference points — facts that live in .csproj references. This repository either commits no MSBuild project at all (its C# may still have been parsed as syntax-only projects, which carry no references between them) or its projects failed to load, so there was no graph to read. That is a gap in this analyzer's reach — not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX8 Test isolation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which projects are test projects, and what they reference — facts that live in .csproj references. This repository either commits no MSBuild project at all (its C# may still have been parsed as syntax-only projects, which carry no references between them) or its projects failed to load, so there was no graph to read. That is a gap in this analyzer's reach — not a finding that the repository is free of what this check looks for.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P5 DR & Backup — 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. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

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

The LLM boundary

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

Dimensions

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

9 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Edmonds.findMSARecursive at 29.

Edmonds.findMSARecursive (cyclomatic 29)src/main/java/com/thealgorithms/graph/Edmonds.java:84
LongDivision.divide (cyclomatic 20)src/main/java/com/thealgorithms/maths/LongDivision.java:14
HungarianAlgorithm.solve (cyclomatic 19)src/main/java/com/thealgorithms/graph/HungarianAlgorithm.java:43
EdmondsBlossomAlgorithm.maximumMatching (cyclomatic 18)src/main/java/com/thealgorithms/datastructures/graphs/EdmondsBlossomAlgorithm.java:33
BinaryTree.remove (cyclomatic 17)src/main/java/com/thealgorithms/datastructures/trees/BinaryTree.java:133

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

What to do

  1. Resolve the 1 Edmonds.findMSARecursive (cyclomatic 29) finding(s) in Cyclomatic Complexity — start with Edmonds.java. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 LongDivision.divide (cyclomatic 20) finding(s) in Cyclomatic Complexity — start with LongDivision.java. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 HungarianAlgorithm.solve (cyclomatic 19) finding(s) in Cyclomatic Complexity — start with HungarianAlgorithm.java. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity6.7 / 10Adequate✓ Tool-verified

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

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

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

80 method(s) exceeded the cognitive complexity threshold of 15; the worst was EdmondsBlossomAlgorithm.maximumMatching at 54.

RegexMatching.regexRecursion (cognitive 16) · ×2src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java:30
EdmondsBlossomAlgorithm.maximumMatching (cognitive 54)src/main/java/com/thealgorithms/datastructures/graphs/EdmondsBlossomAlgorithm.java:33
Edmonds.findMSARecursive (cognitive 52)src/main/java/com/thealgorithms/graph/Edmonds.java:84
BinaryTree.remove (cognitive 49)src/main/java/com/thealgorithms/datastructures/trees/BinaryTree.java:133
HungarianAlgorithm.solve (cognitive 48)src/main/java/com/thealgorithms/graph/HungarianAlgorithm.java:43

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

What to do

  1. Resolve the 2 RegexMatching.regexRecursion (cognitive 16) finding(s) in Cognitive Complexity — start with RegexMatching.java (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 EdmondsBlossomAlgorithm.maximumMatching (cognitive 54) finding(s) in Cognitive Complexity — start with EdmondsBlossomAlgorithm.java. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Edmonds.findMSARecursive (cognitive 52) finding(s) in Cognitive Complexity — start with Edmonds.java. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes9.9 / 10Stronggated by 1 serious finding✓ 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.9 / 10 · rule-coverage 100% · ceiling Prevented

1 god class(es) detected.

TooManyMethods: Buildersrc/main/java/com/thealgorithms/maths/MathBuilder.java:49

What to do

  1. Resolve the 1 TooManyMethods finding(s) in God Classes — start with MathBuilder.java. — One of this dimension's main actionable groups (1 warning-level).
  2. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.3 / 10Stronggated by 110 serious findings✓ 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 9.3 / 10 · rule-coverage 100% · ceiling Verified

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

Duplicated block (8 lines × 2) · ×11src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java:30
Duplicated block (5 lines × 2) · ×11src/main/java/com/thealgorithms/ciphers/PermutationCipher.java:42
Duplicated block (10 lines × 2) · ×9src/main/java/com/thealgorithms/ciphers/AES.java:2589
Duplicated block (9 lines × 2) · ×9src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java:41
Duplicated block (6 lines × 2) · ×9src/main/java/com/thealgorithms/datastructures/graphs/BellmanFord.java:104

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

What to do

  1. Resolve the 11 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with PlayfairCipher.java, PushRelabel.java, OddEvenSort.java. — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 11 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with PermutationCipher.java, BellmanFord.java, LevelOrderTraversal.java. — One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 9 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with AES.java (2), Blowfish.java, PlayfairCipher.java. — One of this dimension's main actionable groups (9 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality9.8 / 10Stronggated by 71 serious findings✓ Tool-verified

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

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

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

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

No assertions: testSolveSuccessful · ×71src/test/java/com/thealgorithms/backtracking/KnightsTourTest.java:53

What to do

  1. Resolve the 71 No assertions finding(s) in Test Quality — start with FibonacciJavaStreamsTest.java (8), InsertionSortTest.java (7), CreateBinaryTreeFromInorderPreorderTest.java (4). — One of this dimension's main actionable groups (71 warning-level).
  2. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

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

0 flaky across 1 measured tier(s). Java/Kotlin (repository root, Maven): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_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.

D16 · Bus Factor8.9 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

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

43 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/main/java/com/thealgorithms/others/MemoryManagementAlgorithms.java. Counted over 407 of the 812 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)

What to do

  1. Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

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

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 deducted task-comment markers across 76417 LoC (0.0/KLoC) → score 10.0. 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.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation QualityExemplary◐ Sampled · advisory

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

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

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

The repository is well documented with a README for each data-structure module (strings, trees, stacks, queues, lists, heaps, hashmaps) that describes the algorithm, gives an example, and links to CONTRIBUTING.md. The architecture/design docs are absent but the per-module READMEs cover all four pillars: overview, installation/contribution guidelines, usage examples, and real-life applications. All module READMEs are clipped mid-sentence by the scanner; no single document is missing from the outline.

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

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

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

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)7.1 / 10Adequategated by 25 critical findings✓ 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 7.1 / 10 · rule-coverage 100% · ceiling Documented

25 finding(s): 0 critical, 25 high, 0 medium, 0 low. 23 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

What to do

  1. Resolve the 2 REDACTED finding(s) charged to Static Analysis (SAST) — the other 23 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (25 issue-level, 2 of them charged here).

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

D31 · IaC & Container Security9.5 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

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

3 finding(s): 0 critical, 1 high, 1 medium, 1 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

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

D32 · Data Compliance (PII/GDPR)5.0 / 10Adequate✓ Tool-verified

What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.

Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using Watchdog's own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.

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

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

REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).

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

D34 · Knowledge Freshness3.3 / 10Weak✓ 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 3.3 / 10 · rule-coverage 100% · ceiling Documented

273 of 407 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/thealgorithms/ciphers/Blowfish.java. Counted over 407 of the 812 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Most significant orphaned file · ×3src/main/java/com/thealgorithms/ciphers/Blowfish.java
Concentrated knowledge decay

What to do

  1. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with Blowfish.java, LIFOCache.java, FIFOCache.java. — One of this dimension's main actionable groups (3 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.

What to do

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

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

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

  • The root README is 89 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers.
  • 94 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.

What to do

  • Expand the README with getting-started, architecture overview and a project map.
  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Review the README against recent changes; refresh the parts that drifted.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

P1 · CI/CD 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.

P3 · Security & performance tooling7.0 / 10Strong✓ 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.

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

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

Reference — by lens

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

LensScoreRatingImpact
Code Health92%ExemplarySolid.
Architecture100%ExemplaryStrongest area.
Maturity65%Adequate — gated by D34, M1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness68%StrongSolid.
Security79%StrongSolid.
Unscored — 1 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.

  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
Not evidenced — 4 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.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 83 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 — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC2 Forms & labels — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC3 Page structure — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC4 Keyboard semantics — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC5 ARIA correctness — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC6 Visual & motion safety — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC7 A11y enforcement — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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.
  • D12 Dependency Hygiene — Dependency Hygiene incomplete (time budget)
  • D14 License Compliance — License Compliance not included (check did not complete)
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — N/A — this repo declares itself a template / kata / sample / demo; a formal ADR log is deferred to a real application built from it.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — Production source is present (.java) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D30 Dependency Vulnerabilities — osv: the scanner produced no output at all, so no dependency was actually scanned
  • D36 Supply-chain Provenance & Signing — The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release).
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D43 Malicious Dependencies — osv: the scanner produced no output at all, so no dependency was actually scanned
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
  • D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a CS/VB/GO/SCALA/SWIFT/DART class graph, and this repository's production source is .java, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 36 value object(s); 2 domain event(s)
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • M2 Architecture documentation — This repo declares itself a template / kata / sample / demo — formal architecture documentation (ADRs, C4 diagrams) is deferred to a real application built from it, so its absence is not a defect here.
  • P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
  • P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
  • P8 Schema migrations — not assessed — schema-migration practice is read from a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 28 finding(s)
D29 · Static Analysis (SAST) · REDACTED · ×25
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D32 · Data Compliance (PII/GDPR) · REDACTED · ×2
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · REDACTED IaC · ×1
  • REDACTED
Serious — 274 finding(s)
D10 · Test Quality · No assertions · ×71
  • No assertions: testSolveSuccessful src/test/java/com/thealgorithms/backtracking/KnightsTourTest.java:53 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testTraversals src/test/java/com/thealgorithms/bitmanipulation/BitRotateTest.java:200 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testLowestSetBitWithNegativeNumber src/test/java/com/thealgorithms/bitmanipulation/LowestSetBitTest.java:45 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testEncryptAllOnesInput src/test/java/com/thealgorithms/ciphers/a5/A5CipherTest.java:33 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testBlockShorterThanKey src/test/java/com/thealgorithms/ciphers/PermutationCipherTest.java:308 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testInvalidCompressedData src/test/java/com/thealgorithms/compression/LZWTest.java:81 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: matchesBruteForceMaximum src/test/java/com/thealgorithms/datastructures/buffers/SlidingWindowAggregatorTest.java:372 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: matchesBruteForceMinimum src/test/java/com/thealgorithms/datastructures/buffers/SlidingWindowAggregatorTest.java:378 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: matchesBruteForceSum src/test/java/com/thealgorithms/datastructures/buffers/SlidingWindowAggregatorTest.java:366 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testDefaultStrategyIsImmediateEvictionStrategy src/test/java/com/thealgorithms/datastructures/caches/LIFOCacheTest.java:211 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testSingleVertexGraph src/test/java/com/thealgorithms/datastructures/graphs/DijkstraAlgorithmTest.java:52 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testDisplay src/test/java/com/thealgorithms/datastructures/hashmap/hashing/HashMapTest.java:36 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testDirectMutationWithoutChangeKeyDoesNotReheapByDesign src/test/java/com/thealgorithms/datastructures/heaps/IndexedPriorityQueueTest.java:214 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testToString src/test/java/com/thealgorithms/datastructures/stacks/NodeStackTest.java:238 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testDeleteNonExistentKey src/test/java/com/thealgorithms/datastructures/trees/BTreeTest.java:59 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testInvalidNodeInEdge src/test/java/com/thealgorithms/datastructures/trees/CentroidDecompositionTest.java:184 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testOnLeftSkewedTreeShouldCreateCorrectTree src/test/java/com/thealgorithms/datastructures/trees/CreateBinaryTreeFromInorderPreorderTest.java:68 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testOnNormalTreeShouldCreateCorrectTree src/test/java/com/thealgorithms/datastructures/trees/CreateBinaryTreeFromInorderPreorderTest.java:83 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testOnRightSkewedTreeShouldCreateCorrectTree src/test/java/com/thealgorithms/datastructures/trees/CreateBinaryTreeFromInorderPreorderTest.java:53 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testOnSingleNodeTreeShouldCreateCorrectTree src/test/java/com/thealgorithms/datastructures/trees/CreateBinaryTreeFromInorderPreorderTest.java:38 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testFibBinet src/test/java/com/thealgorithms/dynamicprogramming/FibonacciTest.java:66 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testCollinearOverlapWithInteriorPoint src/test/java/com/thealgorithms/geometry/BentleyOttmannTest.java:283 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testConvexHullRecursive src/test/java/com/thealgorithms/geometry/ConvexHullTest.java:32 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: randomSmallGraphs src/test/java/com/thealgorithms/graph/GomoryHuTreeTest.java:47 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: triangleGraph src/test/java/com/thealgorithms/graph/GomoryHuTreeTest.java:30 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • + 46 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×11
  • Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java:30 — src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java:30-37 | src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java:55-62 — 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/thealgorithms/ciphers/PlayfairCipher.java:30` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/graph/PushRelabel.java:144 — src/main/java/com/thealgorithms/graph/PushRelabel.java:144-151 | src/main/java/com/thealgorithms/graph/YensKShortestPaths.java:113-120 — 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/thealgorithms/graph/PushRelabel.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.
  • Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/sorts/OddEvenSort.java:32 — src/main/java/com/thealgorithms/sorts/OddEvenSort.java:32-39 | src/main/java/com/thealgorithms/sorts/OddEvenSort.java:43-50 — 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/thealgorithms/sorts/OddEvenSort.java:32` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/stacks/NextGreaterElement.java:30 — src/main/java/com/thealgorithms/stacks/NextGreaterElement.java:30-37 | src/main/java/com/thealgorithms/stacks/StockSpanProblem.java:35-48 — 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/thealgorithms/stacks/NextGreaterElement.java:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:65 — src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:65-72 | src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:68-75 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java` and `src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (8 lines × 2) src/main/java/com/thealgorithms/datastructures/trees/BSTRecursive.java:140 — src/main/java/com/thealgorithms/datastructures/trees/BSTRecursive.java:140-147 | src/main/java/com/thealgorithms/datastructures/trees/BSTRecursiveGeneric.java:339-346 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `int` in one and `T` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/maths/CircularConvolutionFFT.java:23 — src/main/java/com/thealgorithms/maths/CircularConvolutionFFT.java:23-30 | src/main/java/com/thealgorithms/maths/ConvolutionFFT.java:23-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/matrix/QRDecomposition.java:131 — src/main/java/com/thealgorithms/matrix/QRDecomposition.java:131-138 | src/main/java/com/thealgorithms/matrix/utils/MatrixUtil.java:44-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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/thealgorithms/stacks/InfixToPostfix.java:81 — src/main/java/com/thealgorithms/stacks/InfixToPostfix.java:81-88 | src/main/java/com/thealgorithms/stacks/InfixToPrefix.java:95-102 — 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/thealgorithms/datastructures/caches/LRUCache.java:107 — src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java:107-114 | src/main/java/com/thealgorithms/datastructures/caches/MRUCache.java:95-102 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java` and `src/main/java/com/thealgorithms/datastructures/caches/MRUCache.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/thealgorithms/datastructures/heaps/MaxHeap.java:175 — src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java:175-182 | src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java:198-205 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java` and `src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 × 2) · ×11
  • Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/ciphers/PermutationCipher.java:42 — src/main/java/com/thealgorithms/ciphers/PermutationCipher.java:42-46 | src/main/java/com/thealgorithms/ciphers/PermutationCipher.java:71-75 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/java/com/thealgorithms/ciphers/PermutationCipher.java:42` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/datastructures/graphs/BellmanFord.java:96 — src/main/java/com/thealgorithms/datastructures/graphs/BellmanFord.java:96-100 | src/main/java/com/thealgorithms/datastructures/graphs/BellmanFord.java:150-154 — 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/thealgorithms/datastructures/graphs/BellmanFord.java:96` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/datastructures/trees/LevelOrderTraversal.java:21 — src/main/java/com/thealgorithms/datastructures/trees/LevelOrderTraversal.java:21-25 | src/main/java/com/thealgorithms/datastructures/trees/ZigzagTraversal.java:53-58 — 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/thealgorithms/datastructures/trees/LevelOrderTraversal.java:21` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java:128 — src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java:128-132 | src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java:137-141 — 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/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java:128` 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/thealgorithms/maths/CircularConvolutionFFT.java:53 — src/main/java/com/thealgorithms/maths/CircularConvolutionFFT.java:53-57 | src/main/java/com/thealgorithms/maths/ConvolutionFFT.java:57-61 — 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/thealgorithms/sorts/CountingSort.java:46 — src/main/java/com/thealgorithms/sorts/CountingSort.java:46-50 | src/main/java/com/thealgorithms/sorts/FlashSort.java:149-153 — 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/thealgorithms/stacks/InfixToPostfix.java:97 — src/main/java/com/thealgorithms/stacks/InfixToPostfix.java:97-101 | src/main/java/com/thealgorithms/stacks/InfixToPrefix.java:111-115 — 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 (5 lines × 2) src/main/java/com/thealgorithms/streaming/ComplementaryFilter.java:234 — src/main/java/com/thealgorithms/streaming/ComplementaryFilter.java:234-238 | src/main/java/com/thealgorithms/streaming/KalmanFilter.java:273-277 — 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/thealgorithms/datastructures/heaps/MaxHeap.java:124 — src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java:124-128 | src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java:101-105 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java` and `src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/dynamicprogramming/MinimumSumPartition.java:26 — src/main/java/com/thealgorithms/dynamicprogramming/MinimumSumPartition.java:26-30 | src/main/java/com/thealgorithms/sorts/BeadSort.java:20-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/misc/ThreeSumProblem.java:20 — src/main/java/com/thealgorithms/misc/ThreeSumProblem.java:20-24 | src/main/java/com/thealgorithms/misc/ThreeSumProblem.java:45-49 — 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/thealgorithms/misc/ThreeSumProblem.java:20` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×9
  • Duplicated block (10 lines × 2) src/main/java/com/thealgorithms/ciphers/AES.java:2589 — src/main/java/com/thealgorithms/ciphers/AES.java:2589-2598 | src/main/java/com/thealgorithms/ciphers/AES.java:2624-2633 — 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/thealgorithms/ciphers/AES.java:2589` 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 (10 lines × 2) src/main/java/com/thealgorithms/ciphers/AES.java:2639 — src/main/java/com/thealgorithms/ciphers/AES.java:2639-2648 | src/main/java/com/thealgorithms/ciphers/AES.java:2663-2672 — 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/thealgorithms/ciphers/AES.java:2639` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/main/java/com/thealgorithms/ciphers/Blowfish.java:1210 — src/main/java/com/thealgorithms/ciphers/Blowfish.java:1210-1219 | src/main/java/com/thealgorithms/ciphers/Blowfish.java:1234-1243 — 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/thealgorithms/ciphers/Blowfish.java:1210` 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 (10 lines × 2) src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java:17 — src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java:17-26 | src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java:42-51 — 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/thealgorithms/ciphers/PlayfairCipher.java:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/main/java/com/thealgorithms/ciphers/Vigenere.java:47 — src/main/java/com/thealgorithms/ciphers/Vigenere.java:47-56 | src/main/java/com/thealgorithms/ciphers/Vigenere.java:85-94 — 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/thealgorithms/ciphers/Vigenere.java:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/main/java/com/thealgorithms/datastructures/heaps/IndexedPriorityQueue.java:236 — src/main/java/com/thealgorithms/datastructures/heaps/IndexedPriorityQueue.java:236-245 | src/main/java/com/thealgorithms/datastructures/heaps/IndexedPriorityQueue.java:258-267 — 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/thealgorithms/others/BankersAlgorithm.java:137 — src/main/java/com/thealgorithms/others/BankersAlgorithm.java:137-146 | src/main/java/com/thealgorithms/others/BankersAlgorithm.java:148-157 — 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/thealgorithms/stacks/MaximumMinimumWindow.java:52 — src/main/java/com/thealgorithms/stacks/MaximumMinimumWindow.java:52-61 | src/main/java/com/thealgorithms/stacks/MaximumMinimumWindow.java:68-77 — 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/thealgorithms/stacks/MaximumMinimumWindow.java:52` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/main/java/com/thealgorithms/stacks/GreatestElementConstantTime.java:52 — src/main/java/com/thealgorithms/stacks/GreatestElementConstantTime.java:52-61 | src/main/java/com/thealgorithms/stacks/SmallestElementConstantTime.java:52-61 — 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) · ×9
  • Duplicated block (9 lines × 2) src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java:41 — src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java:41-49 | src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java:76-84 — 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/thealgorithms/ciphers/SimpleSubCipher.java:41` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) src/main/java/com/thealgorithms/searches/IterativeBinarySearch.java:40 — src/main/java/com/thealgorithms/searches/IterativeBinarySearch.java:40-48 | src/main/java/com/thealgorithms/searches/RotatedBinarySearch.java:24-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from 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/thealgorithms/searches/IterativeBinarySearch.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) src/main/java/com/thealgorithms/sorts/ConcurrentMergeSort.java:133 — src/main/java/com/thealgorithms/sorts/ConcurrentMergeSort.java:133-141 | src/main/java/com/thealgorithms/sorts/LinkListSort.java:199-207 — 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/thealgorithms/sorts/ConcurrentMergeSort.java:133` 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/thealgorithms/sorts/LinkListSort.java:38 — src/main/java/com/thealgorithms/sorts/LinkListSort.java:38-46 | src/main/java/com/thealgorithms/sorts/LinkListSort.java:97-105 — 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) src/main/java/com/thealgorithms/sorts/TreeSort.java:73 — src/main/java/com/thealgorithms/sorts/TreeSort.java:73-81 | src/main/java/com/thealgorithms/sorts/TreeSort.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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/java/com/thealgorithms/sorts/TreeSort.java:101` 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/thealgorithms/streaming/ExtendedKalmanFilter.java:316 — src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:316-324 | src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:331-339 — 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/thealgorithms/streaming/ExtendedKalmanFilter.java:331` 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/thealgorithms/strings/KMP.java:30 — src/main/java/com/thealgorithms/strings/KMP.java:30-38 | src/main/java/com/thealgorithms/strings/KMP.java:53-61 — 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/thealgorithms/strings/KMP.java:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/main/java/com/thealgorithms/matrix/QRDecomposition.java:140 — src/main/java/com/thealgorithms/matrix/QRDecomposition.java:140-148 | src/main/java/com/thealgorithms/matrix/utils/MatrixUtil.java:60-68 — 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 (9 lines × 2) src/main/java/com/thealgorithms/stacks/PostfixEvaluator.java:65 — src/main/java/com/thealgorithms/stacks/PostfixEvaluator.java:65-73 | src/main/java/com/thealgorithms/stacks/PrefixEvaluator.java:67-75 — 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 (6 lines × 2) · ×9
  • Duplicated block (6 lines × 2) src/main/java/com/thealgorithms/datastructures/graphs/BellmanFord.java:104 — src/main/java/com/thealgorithms/datastructures/graphs/BellmanFord.java:104-109 | src/main/java/com/thealgorithms/datastructures/graphs/BellmanFord.java:158-163 — 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/thealgorithms/datastructures/graphs/BellmanFord.java:104` 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/thealgorithms/graph/Dinic.java:61 — src/main/java/com/thealgorithms/graph/Dinic.java:61-66 | src/main/java/com/thealgorithms/graph/GomoryHuTree.java:83-88 — 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/thealgorithms/graph/AccountMerge.java:103 — src/main/java/com/thealgorithms/graph/AccountMerge.java:103-108 | src/main/java/com/thealgorithms/randomized/KargerMinCut.java:89-99 — 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/thealgorithms/graph/ConstrainedShortestPath.java:25 — src/main/java/com/thealgorithms/graph/ConstrainedShortestPath.java:25-30 | src/main/java/com/thealgorithms/graph/HierholzerEulerianPath.java:51-56 — 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/thealgorithms/maths/Combinations.java:16 — src/main/java/com/thealgorithms/maths/Combinations.java:16-21 | src/main/java/com/thealgorithms/recursion/FactorialRecursion.java:12-17 — 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/thealgorithms/others/Damm.java:106 — src/main/java/com/thealgorithms/others/Damm.java:106-111 | src/main/java/com/thealgorithms/others/Verhoeff.java:161-166 — 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/thealgorithms/datastructures/heaps/MaxHeap.java:97 — src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java:97-102 | src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java:74-79 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java` and `src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/thealgorithms/datastructures/heaps/MaxHeap.java:111 — src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java:111-116 | src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java:88-93 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java` and `src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/thealgorithms/strings/Lower.java:10 — src/main/java/com/thealgorithms/strings/Lower.java:10-15 | src/main/java/com/thealgorithms/strings/Upper.java:10-15 — 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 (7 lines × 2) · ×8
  • Duplicated block (7 lines × 2) src/main/java/com/thealgorithms/ciphers/ColumnarTranspositionCipher.java:36 — src/main/java/com/thealgorithms/ciphers/ColumnarTranspositionCipher.java:36-42 | src/main/java/com/thealgorithms/ciphers/ColumnarTranspositionCipher.java:61-67 — 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/thealgorithms/ciphers/ColumnarTranspositionCipher.java:36` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) src/main/java/com/thealgorithms/datastructures/graphs/EdmondsBlossomAlgorithm.java:185 — src/main/java/com/thealgorithms/datastructures/graphs/EdmondsBlossomAlgorithm.java:185-191 | src/main/java/com/thealgorithms/datastructures/graphs/EdmondsBlossomAlgorithm.java:194-200 — 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/thealgorithms/datastructures/graphs/EdmondsBlossomAlgorithm.java:185` 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 × 2) src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:102 — src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:102-108 | src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:118-124 — 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.
  • Duplicated block (7 lines × 2) src/main/java/com/thealgorithms/dynamicprogramming/EditDistance.java:30 — src/main/java/com/thealgorithms/dynamicprogramming/EditDistance.java:30-36 | src/main/java/com/thealgorithms/dynamicprogramming/NeedlemanWunsch.java:32-38 — 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/thealgorithms/dynamicprogramming/EditDistance.java:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/main/java/com/thealgorithms/streaming/CusumDetector.java:93 — src/main/java/com/thealgorithms/streaming/CusumDetector.java:93-99 | src/main/java/com/thealgorithms/streaming/EwmaChangeDetector.java:90-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/java/com/thealgorithms/streaming/CusumDetector.java:93` 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 × 2) src/main/java/com/thealgorithms/streaming/CusumDetector.java:144 — src/main/java/com/thealgorithms/streaming/CusumDetector.java:144-150 | src/main/java/com/thealgorithms/streaming/EwmaChangeDetector.java:144-150 — 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 (7 lines × 2) src/main/java/com/thealgorithms/streaming/HampelFilter.java:130 — src/main/java/com/thealgorithms/streaming/HampelFilter.java:130-136 | src/main/java/com/thealgorithms/streaming/MedianFilter.java:94-100 — 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 (7 lines × 2) src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java:188 — src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java:188-194 | src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java:211-217 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java` and `src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×7
  • Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/conversions/RgbHsvConversion.java:59 — src/main/java/com/thealgorithms/conversions/RgbHsvConversion.java:59-69 | src/main/java/com/thealgorithms/conversions/RgbHsvConversion.java:88-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.
  • Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:114 — src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:114-124 | src/main/java/com/thealgorithms/datastructures/caches/RRCache.java:113-123 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java` and `src/main/java/com/thealgorithms/datastructures/caches/RRCache.java` as WHOLE FILES: this scan already matched 3 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/thealgorithms/datastructures/caches/FIFOCache.java:114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:353 — src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:353-363 | src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:367-377 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java` and `src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/thealgorithms/datastructures/caches/FIFOCache.java:353` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/graph/Dinic.java:44 — src/main/java/com/thealgorithms/graph/Dinic.java:44-54 | src/main/java/com/thealgorithms/graph/PushRelabel.java:150-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/thealgorithms/graph/Dinic.java:44` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/greedyalgorithms/BandwidthAllocation.java:47 — src/main/java/com/thealgorithms/greedyalgorithms/BandwidthAllocation.java:47-57 | src/main/java/com/thealgorithms/greedyalgorithms/FractionalKnapsack.java:43-53 — 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/thealgorithms/greedyalgorithms/BandwidthAllocation.java:47` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (11 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java:174 — src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java:174-184 | src/main/java/com/thealgorithms/datastructures/caches/MRUCache.java:137-147 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java` and `src/main/java/com/thealgorithms/datastructures/caches/MRUCache.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/thealgorithms/others/Damm.java:84 — src/main/java/com/thealgorithms/others/Damm.java:84-94 | src/main/java/com/thealgorithms/others/Verhoeff.java:139-149 — 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 (8–9 lines × 2) · ×4
  • Duplicated block (8–9 lines × 2) src/main/java/com/thealgorithms/ciphers/Caesar.java:23 — src/main/java/com/thealgorithms/ciphers/Caesar.java:23-31 | src/main/java/com/thealgorithms/ciphers/Caesar.java:51-58 — 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/thealgorithms/ciphers/Caesar.java:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 2) src/main/java/com/thealgorithms/graph/Dinic.java:55 — src/main/java/com/thealgorithms/graph/Dinic.java:55-63 | src/main/java/com/thealgorithms/graph/PushRelabel.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.
  • Duplicated block (8–9 lines × 2) src/main/java/com/thealgorithms/others/Verhoeff.java:97 — src/main/java/com/thealgorithms/others/Verhoeff.java:97-105 | src/main/java/com/thealgorithms/others/Verhoeff.java:126-133 — 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–9 lines × 2) src/main/java/com/thealgorithms/sorts/IntrospectiveSort.java:86 — src/main/java/com/thealgorithms/sorts/IntrospectiveSort.java:86-93 | src/main/java/com/thealgorithms/sorts/SpreadSort.java:215-223 — 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/thealgorithms/sorts/IntrospectiveSort.java:86` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×3
  • Duplicated block (15 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:298 — src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:298-312 | src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:311-325 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java` and `src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/thealgorithms/datastructures/lists/CircleLinkedList.java:83 — src/main/java/com/thealgorithms/datastructures/lists/CircleLinkedList.java:83-97 | src/main/java/com/thealgorithms/datastructures/lists/CircularDoublyLinkedList.java:80-94 — 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 (15 lines × 2) src/main/java/com/thealgorithms/stacks/PostfixEvaluator.java:31 — src/main/java/com/thealgorithms/stacks/PostfixEvaluator.java:31-45 | src/main/java/com/thealgorithms/stacks/PrefixEvaluator.java:33-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/thealgorithms/stacks/PostfixEvaluator.java:31` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java:78 — src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java:78-91 | src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java:123-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. 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 (14 lines × 2) src/main/java/com/thealgorithms/maths/PadovanSequence.java:29 — src/main/java/com/thealgorithms/maths/PadovanSequence.java:29-42 | src/main/java/com/thealgorithms/maths/PerrinNumber.java:39-52 — 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/thealgorithms/maths/PadovanSequence.java:29` 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 (14 lines × 2) src/main/java/com/thealgorithms/stacks/InfixToPostfix.java:44 — src/main/java/com/thealgorithms/stacks/InfixToPostfix.java:44-57 | src/main/java/com/thealgorithms/stacks/InfixToPrefix.java:57-70 — 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/thealgorithms/stacks/InfixToPostfix.java:44` 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/thealgorithms/stacks/InfixToPrefix.java:55` calls `StringBuilder`, `reverse`, `toString` and `src/main/java/com/thealgorithms/stacks/InfixToPostfix.java:42` 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 (13 lines × 2) · ×3
  • Duplicated block (13 lines × 2) src/main/java/com/thealgorithms/ciphers/AES.java:2745 — src/main/java/com/thealgorithms/ciphers/AES.java:2745-2757 | src/main/java/com/thealgorithms/ciphers/AES.java:2761-2773 — 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/thealgorithms/ciphers/AES.java:2745` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/main/java/com/thealgorithms/datastructures/trees/AVLTree.java:201 — src/main/java/com/thealgorithms/datastructures/trees/AVLTree.java:201-213 | src/main/java/com/thealgorithms/datastructures/trees/AVLTree.java:226-238 — 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/thealgorithms/datastructures/trees/AVLTree.java:201` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) src/main/java/com/thealgorithms/matrix/QRDecomposition.java:117 — src/main/java/com/thealgorithms/matrix/QRDecomposition.java:117-129 | src/main/java/com/thealgorithms/matrix/utils/MatrixUtil.java:30-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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.
D2 · Cognitive Complexity · RegexMatching.regexRecursion (cognitive 16) · ×2
  • RegexMatching.regexRecursion (cognitive 16) src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java:30 — RegexMatching.regexRecursion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (RegexMatching.regexRecursion) 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.
  • RegexMatching.regexRecursion (cognitive 16) src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java:77 — RegexMatching.regexRecursion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (RegexMatching.regexRecursion) 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×2
  • Duplicated block (12 lines × 2) src/main/java/com/thealgorithms/ciphers/AES.java:2570 — src/main/java/com/thealgorithms/ciphers/AES.java:2570-2581 | src/main/java/com/thealgorithms/ciphers/AES.java:2605-2616 — 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 (12 lines × 2) src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java:87 — src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java:87-98 | src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java:114-125 — 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/thealgorithms/divideandconquer/ClosestPair.java:87` 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 lines × 3) · ×2
  • Duplicated block (5 lines × 3) src/main/java/com/thealgorithms/graph/Dinic.java:61 — src/main/java/com/thealgorithms/graph/Dinic.java:61-65 | src/main/java/com/thealgorithms/graph/GomoryHuTree.java:83-87 | src/main/java/com/thealgorithms/graph/PushRelabel.java:42-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (5 lines × 3) src/main/java/com/thealgorithms/graph/Dinic.java:81 — src/main/java/com/thealgorithms/graph/Dinic.java:81-85 | src/main/java/com/thealgorithms/graph/EdmondsKarp.java:90-95 | src/main/java/com/thealgorithms/graph/GomoryHuTree.java:112-116 — before extracting anything, compare `src/main/java/com/thealgorithms/graph/EdmondsKarp.java` and `src/main/java/com/thealgorithms/graph/GomoryHuTree.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/java/com/thealgorithms/graph/Dinic.java:81` 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.
D1 · Cyclomatic Complexity · Edmonds.findMSARecursive (cyclomatic 29) · ×1
  • Edmonds.findMSARecursive (cyclomatic 29) src/main/java/com/thealgorithms/graph/Edmonds.java:84 — Edmonds.findMSARecursive has cyclomatic complexity 29 (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 · LongDivision.divide (cyclomatic 20) · ×1
  • LongDivision.divide (cyclomatic 20) src/main/java/com/thealgorithms/maths/LongDivision.java:14 — LongDivision.divide has cyclomatic complexity 20 (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 · HungarianAlgorithm.solve (cyclomatic 19) · ×1
  • HungarianAlgorithm.solve (cyclomatic 19) src/main/java/com/thealgorithms/graph/HungarianAlgorithm.java:43 — HungarianAlgorithm.solve 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 · EdmondsBlossomAlgorithm.maximumMatching (cyclomatic 18) · ×1
  • EdmondsBlossomAlgorithm.maximumMatching (cyclomatic 18) src/main/java/com/thealgorithms/datastructures/graphs/EdmondsBlossomAlgorithm.java:33 — EdmondsBlossomAlgorithm.maximumMatching has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BinaryTree.remove (cyclomatic 17) · ×1
  • BinaryTree.remove (cyclomatic 17) src/main/java/com/thealgorithms/datastructures/trees/BinaryTree.java:133 — BinaryTree.remove 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.
D1 · Cyclomatic Complexity · BentleyOttmann.handleEvent (cyclomatic 17) · ×1
  • BentleyOttmann.handleEvent (cyclomatic 17) src/main/java/com/thealgorithms/geometry/BentleyOttmann.java:216 — BentleyOttmann.handleEvent 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.
D1 · Cyclomatic Complexity · HierholzerEulerianPath.rotateEulerianCircuitIfNeeded (cyclomatic 17) · ×1
  • HierholzerEulerianPath.rotateEulerianCircuitIfNeeded (cyclomatic 17) src/main/java/com/thealgorithms/graph/HierholzerEulerianPath.java:207 — HierholzerEulerianPath.rotateEulerianCircuitIfNeeded 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.
D1 · Cyclomatic Complexity · CRCAlgorithm.divideMessageWithP (cyclomatic 17) · ×1
  • CRCAlgorithm.divideMessageWithP (cyclomatic 17) src/main/java/com/thealgorithms/others/CRCAlgorithm.java:130 — CRCAlgorithm.divideMessageWithP has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · TravelingSalesman.dynamicProgramming (cyclomatic 16) · ×1
  • TravelingSalesman.dynamicProgramming (cyclomatic 16) src/main/java/com/thealgorithms/graph/TravelingSalesman.java:112 — TravelingSalesman.dynamicProgramming has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · EdmondsBlossomAlgorithm.maximumMatching (cognitive 54) · ×1
  • EdmondsBlossomAlgorithm.maximumMatching (cognitive 54) src/main/java/com/thealgorithms/datastructures/graphs/EdmondsBlossomAlgorithm.java:33 — EdmondsBlossomAlgorithm.maximumMatching has cognitive complexity 54 (threshold 15). Drivers by points: if/else 9 (38 pts), loops 7 (14 pts), boolean chains 2 (nesting depth added 36). 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 · Edmonds.findMSARecursive (cognitive 52) · ×1
  • Edmonds.findMSARecursive (cognitive 52) src/main/java/com/thealgorithms/graph/Edmonds.java:84 — Edmonds.findMSARecursive has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 10 (14 pts), boolean chains 4 (nesting depth added 23). 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 · BinaryTree.remove (cognitive 49) · ×1
  • BinaryTree.remove (cognitive 49) src/main/java/com/thealgorithms/datastructures/trees/BinaryTree.java:133 — BinaryTree.remove has cognitive complexity 49 (threshold 15). Drivers by points: if/else 22 (47 pts), boolean chains 2 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · HungarianAlgorithm.solve (cognitive 48) · ×1
  • HungarianAlgorithm.solve (cognitive 48) src/main/java/com/thealgorithms/graph/HungarianAlgorithm.java:43 — HungarianAlgorithm.solve has cognitive complexity 48 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 9 (17 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 28). 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 · HierholzerEulerianPath.rotateEulerianCircuitIfNeeded (cognitive 42) · ×1
  • HierholzerEulerianPath.rotateEulerianCircuitIfNeeded (cognitive 42) src/main/java/com/thealgorithms/graph/HierholzerEulerianPath.java:207 — HierholzerEulerianPath.rotateEulerianCircuitIfNeeded has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 5 (14 pts), boolean chains 2 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BentleyOttmann.getIntersection (cognitive 32) · ×1
  • BentleyOttmann.getIntersection (cognitive 32) src/main/java/com/thealgorithms/geometry/BentleyOttmann.java:343 — BentleyOttmann.getIntersection has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 4, loops 1 (4 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · YensKShortestPaths.kShortestPaths (cognitive 30) · ×1
  • YensKShortestPaths.kShortestPaths (cognitive 30) src/main/java/com/thealgorithms/graph/YensKShortestPaths.java:39 — YensKShortestPaths.kShortestPaths has cognitive complexity 30 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 5 (14 pts), boolean chains 1 (nesting depth added 17). 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 · CrosswordSolver.solveCrossword (cognitive 28) · ×1
  • CrosswordSolver.solveCrossword (cognitive 28) src/main/java/com/thealgorithms/backtracking/CrosswordSolver.java:99 — CrosswordSolver.solveCrossword has cognitive complexity 28 (threshold 15). Drivers by points: if/else 3 (16 pts), loops 4 (12 pts) (nesting depth added 21). 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 · LongDivision.divide (cognitive 28) · ×1
  • LongDivision.divide (cognitive 28) src/main/java/com/thealgorithms/maths/LongDivision.java:14 — LongDivision.divide has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 3 (8 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LZ77.compress (cognitive 27) · ×1
  • LZ77.compress (cognitive 27) src/main/java/com/thealgorithms/compression/LZ77.java:54 — LZ77.compress has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RedBlackBST.deleteFixup (cognitive 27) · ×1
  • RedBlackBST.deleteFixup (cognitive 27) src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:243 — RedBlackBST.deleteFixup has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BentleyOttmann.handleEvent (cognitive 27) · ×1
  • BentleyOttmann.handleEvent (cognitive 27) src/main/java/com/thealgorithms/geometry/BentleyOttmann.java:216 — BentleyOttmann.handleEvent has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 4, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ZeroOneBfs.shortestPaths (cognitive 27) · ×1
  • ZeroOneBfs.shortestPaths (cognitive 27) src/main/java/com/thealgorithms/graph/ZeroOneBfs.java:35 — ZeroOneBfs.shortestPaths has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BankersAlgorithm.checkSafeSystem (cognitive 27) · ×1
  • BankersAlgorithm.checkSafeSystem (cognitive 27) src/main/java/com/thealgorithms/others/BankersAlgorithm.java:53 — BankersAlgorithm.checkSafeSystem has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 5 (13 pts) (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 · CRCAlgorithm.divideMessageWithP (cognitive 27) · ×1
  • CRCAlgorithm.divideMessageWithP (cognitive 27) src/main/java/com/thealgorithms/others/CRCAlgorithm.java:130 — CRCAlgorithm.divideMessageWithP has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 5 (11 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StoerWagner.findMinCut (cognitive 26) · ×1
  • StoerWagner.findMinCut (cognitive 26) src/main/java/com/thealgorithms/graph/StoerWagner.java:19 — StoerWagner.findMinCut has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 6 (12 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WordLadder.ladderLength (cognitive 26) · ×1
  • WordLadder.ladderLength (cognitive 26) src/main/java/com/thealgorithms/strings/WordLadder.java:25 — WordLadder.ladderLength has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 4 (10 pts) (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 · SplayTree.splay (cognitive 25) · ×1
  • SplayTree.splay (cognitive 25) src/main/java/com/thealgorithms/datastructures/trees/SplayTree.java:194 — SplayTree.splay has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 2 (4 pts), boolean chains 1 (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 · ClosestPair.closestPair (cognitive 25) · ×1
  • ClosestPair.closestPair (cognitive 25) src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java:164 — ClosestPair.closestPair has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 4 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TravelingSalesman.dynamicProgramming (cognitive 25) · ×1
  • TravelingSalesman.dynamicProgramming (cognitive 25) src/main/java/com/thealgorithms/graph/TravelingSalesman.java:112 — TravelingSalesman.dynamicProgramming has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 6 (9 pts), boolean chains 3, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CircularScanScheduling.execute (cognitive 25) · ×1
  • CircularScanScheduling.execute (cognitive 25) src/main/java/com/thealgorithms/scheduling/diskscheduling/CircularScanScheduling.java:27 — CircularScanScheduling.execute has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (8 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 · RRScheduling.evaluateTurnAroundTime (cognitive 25) · ×1
  • RRScheduling.evaluateTurnAroundTime (cognitive 25) src/main/java/com/thealgorithms/scheduling/RRScheduling.java:30 — RRScheduling.evaluateTurnAroundTime has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (7 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 · LinkListSort.isSorted (cognitive 25) · ×1
  • LinkListSort.isSorted (cognitive 25) src/main/java/com/thealgorithms/sorts/LinkListSort.java:10 — LinkListSort.isSorted has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 6 (12 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CheckIfBinaryTreeBalanced.isBalancedIterative (cognitive 24) · ×1
  • CheckIfBinaryTreeBalanced.isBalancedIterative (cognitive 24) src/main/java/com/thealgorithms/datastructures/trees/CheckIfBinaryTreeBalanced.java:74 — CheckIfBinaryTreeBalanced.isBalancedIterative has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HierholzerEulerianPath.allNonZeroDegreeVerticesWeaklyConnected (cognitive 24) · ×1
  • HierholzerEulerianPath.allNonZeroDegreeVerticesWeaklyConnected (cognitive 24) src/main/java/com/thealgorithms/graph/HierholzerEulerianPath.java:269 — HierholzerEulerianPath.allNonZeroDegreeVerticesWeaklyConnected has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 5 (10 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 · CohenSutherland.cohenSutherlandClip (cognitive 24) · ×1
  • CohenSutherland.cohenSutherlandClip (cognitive 24) src/main/java/com/thealgorithms/lineclipping/CohenSutherland.java:68 — CohenSutherland.cohenSutherlandClip has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 1 (4 pts), boolean chains 1, 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 · LiangBarsky.clipLine (cognitive 24) · ×1
  • LiangBarsky.clipLine (cognitive 24) src/main/java/com/thealgorithms/lineclipping/LiangBarsky.java:56 — LiangBarsky.clipLine has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (22 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MosAlgorithm.solveRangeFrequencyQueries (cognitive 24) · ×1
  • MosAlgorithm.solveRangeFrequencyQueries (cognitive 24) src/main/java/com/thealgorithms/others/MosAlgorithm.java:116 — MosAlgorithm.solveRangeFrequencyQueries has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 6 (10 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 · DialsAlgorithm.run (cognitive 23) · ×1
  • DialsAlgorithm.run (cognitive 23) src/main/java/com/thealgorithms/datastructures/graphs/DialsAlgorithm.java:60 — DialsAlgorithm.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 4 (7 pts), boolean chains 2, ternaries 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 · BSTIterative.remove (cognitive 23) · ×1
  • BSTIterative.remove (cognitive 23) src/main/java/com/thealgorithms/datastructures/trees/BSTIterative.java:91 — BSTIterative.remove has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SkylineProblem.mergeSkyline (cognitive 23) · ×1
  • SkylineProblem.mergeSkyline (cognitive 23) src/main/java/com/thealgorithms/others/SkylineProblem.java:59 — SkylineProblem.mergeSkyline has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3, boolean chains 1 (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 · RandomizedMatrixMultiplicationVerification.verify (cognitive 23) · ×1
  • RandomizedMatrixMultiplicationVerification.verify (cognitive 23) src/main/java/com/thealgorithms/randomized/RandomizedMatrixMultiplicationVerification.java:19 — RandomizedMatrixMultiplicationVerification.verify has cognitive complexity 23 (threshold 15). Drivers by points: loops 9 (20 pts), if/else 1 (3 pts) (nesting depth added 13). 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 · RabinKarp.search (cognitive 23) · ×1
  • RabinKarp.search (cognitive 23) src/main/java/com/thealgorithms/strings/RabinKarp.java:22 — RabinKarp.search has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (6 pts), boolean chains 1 (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 · RailFenceCipher.decrypt (cognitive 22) · ×1
  • RailFenceCipher.decrypt (cognitive 22) src/main/java/com/thealgorithms/ciphers/RailFenceCipher.java:63 — RailFenceCipher.decrypt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 4 (5 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 · SameTreesCheck.check (cognitive 22) · ×1
  • SameTreesCheck.check (cognitive 22) src/main/java/com/thealgorithms/datastructures/trees/SameTreesCheck.java:38 — SameTreesCheck.check has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, 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 · DeterminantOfMatrix.determinant (cognitive 22) · ×1
  • DeterminantOfMatrix.determinant (cognitive 22) src/main/java/com/thealgorithms/maths/DeterminantOfMatrix.java:18 — DeterminantOfMatrix.determinant has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (9 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InfixToPrefix.infix2Prefix (cognitive 22) · ×1
  • InfixToPrefix.infix2Prefix (cognitive 22) src/main/java/com/thealgorithms/stacks/InfixToPrefix.java:37 — InfixToPrefix.infix2Prefix has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 7 (8 pts), boolean chains 2 (nesting depth added 9). 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 · MColoring.isColoringPossible (cognitive 21) · ×1
  • MColoring.isColoringPossible (cognitive 21) src/main/java/com/thealgorithms/backtracking/MColoring.java:38 — MColoring.isColoringPossible has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 4 (7 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SudokuSolver.solve (cognitive 21) · ×1
  • SudokuSolver.solve (cognitive 21) src/main/java/com/thealgorithms/backtracking/SudokuSolver.java:45 — SudokuSolver.solve has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (14 pts), loops 3 (7 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Base64.decode (cognitive 21) · ×1
  • Base64.decode (cognitive 21) src/main/java/com/thealgorithms/conversions/Base64.java:106 — Base64.decode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (4 pts), ternaries 2 (4 pts) (nesting depth added 8). 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 · LongestValidParentheses.getLongestValidParentheses (cognitive 21) · ×1
  • LongestValidParentheses.getLongestValidParentheses (cognitive 21) src/main/java/com/thealgorithms/dynamicprogramming/LongestValidParentheses.java:14 — LongestValidParentheses.getLongestValidParentheses has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (6 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PalindromicPartitioning.minimalPartitions (cognitive 21) · ×1
  • PalindromicPartitioning.minimalPartitions (cognitive 21) src/main/java/com/thealgorithms/dynamicprogramming/PalindromicPartitioning.java:28 — PalindromicPartitioning.minimalPartitions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Adwin.detectChange (cognitive 21) · ×1
  • Adwin.detectChange (cognitive 21) src/main/java/com/thealgorithms/streaming/Adwin.java:254 — Adwin.detectChange has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (6 pts), boolean chains 3 (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 · OptimalBinarySearchTree.findOptimalCost (cognitive 20) · ×1
  • OptimalBinarySearchTree.findOptimalCost (cognitive 20) src/main/java/com/thealgorithms/dynamicprogramming/OptimalBinarySearchTree.java:30 — OptimalBinarySearchTree.findOptimalCost has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 2 (8 pts), loops 4 (7 pts), if/else 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RegexMatching.regexBU (cognitive 20) · ×1
  • RegexMatching.regexBU (cognitive 20) src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java:169 — RegexMatching.regexBU has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EdmondsKarp.maxFlow (cognitive 20) · ×1
  • EdmondsKarp.maxFlow (cognitive 20) src/main/java/com/thealgorithms/graph/EdmondsKarp.java:35 — EdmondsKarp.maxFlow has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 5 (8 pts), boolean chains 3 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · YensKShortestPaths.dijkstra (cognitive 20) · ×1
  • YensKShortestPaths.dijkstra (cognitive 20) src/main/java/com/thealgorithms/graph/YensKShortestPaths.java:171 — YensKShortestPaths.dijkstra has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RabinKarpAlgorithm.search (cognitive 20) · ×1
  • RabinKarpAlgorithm.search (cognitive 20) src/main/java/com/thealgorithms/searches/RabinKarpAlgorithm.java:11 — RabinKarpAlgorithm.search has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (6 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 · InfixToPostfix.infix2PostFix (cognitive 20) · ×1
  • InfixToPostfix.infix2PostFix (cognitive 20) src/main/java/com/thealgorithms/stacks/InfixToPostfix.java:36 — InfixToPostfix.infix2PostFix has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 5 (6 pts), boolean chains 2 (nesting depth added 9). 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 · RottingOranges.run (cognitive 19) · ×1
  • RottingOranges.run (cognitive 19) src/main/java/com/thealgorithms/datastructures/graphs/RottingOranges.java:52 — RottingOranges.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (7 pts), boolean chains 2, ternaries 1 (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 · SortedLinkedList.delete (cognitive 19) · ×1
  • SortedLinkedList.delete (cognitive 19) src/main/java/com/thealgorithms/datastructures/lists/SortedLinkedList.java:74 — SortedLinkedList.delete has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (3 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 · RedBlackBST.insert (cognitive 19) · ×1
  • RedBlackBST.insert (cognitive 19) src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:65 — RedBlackBST.insert has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MedianOfTwoSortedArrays.findMedianSortedArrays (cognitive 19) · ×1
  • MedianOfTwoSortedArrays.findMedianSortedArrays (cognitive 19) src/main/java/com/thealgorithms/divideandconquer/MedianOfTwoSortedArrays.java:16 — MedianOfTwoSortedArrays.findMedianSortedArrays has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (8 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SolveSystem.solveSystem (cognitive 19) · ×1
  • SolveSystem.solveSystem (cognitive 19) src/main/java/com/thealgorithms/matrix/SolveSystem.java:22 — SolveSystem.solveSystem has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 4 (8 pts) (nesting depth added 9). 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 · SuffixArray.buildSuffixArray (cognitive 19) · ×1
  • SuffixArray.buildSuffixArray (cognitive 19) src/main/java/com/thealgorithms/strings/SuffixArray.java:18 — SuffixArray.buildSuffixArray has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (11 pts), loops 3 (4 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 8). 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 · HuffmanCoding.decode (cognitive 18) · ×1
  • HuffmanCoding.decode (cognitive 18) src/main/java/com/thealgorithms/compression/HuffmanCoding.java:203 — HuffmanCoding.decode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LFUCache.addNodeWithUpdatedFrequency (cognitive 18) · ×1
  • LFUCache.addNodeWithUpdatedFrequency (cognitive 18) src/main/java/com/thealgorithms/datastructures/caches/LFUCache.java:132 — LFUCache.addNodeWithUpdatedFrequency has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BellmanFord.go (cognitive 18) · ×1
  • BellmanFord.go (cognitive 18) src/main/java/com/thealgorithms/datastructures/graphs/BellmanFord.java:60 — BellmanFord.go has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 3 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · FordFulkerson.networkFlow (cognitive 18) · ×1
  • FordFulkerson.networkFlow (cognitive 18) src/main/java/com/thealgorithms/datastructures/graphs/FordFulkerson.java:30 — FordFulkerson.networkFlow has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 2 (6 pts), boolean chains 2 (nesting depth added 9). 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 · AVLTree.insert (cognitive 18) · ×1
  • AVLTree.insert (cognitive 18) src/main/java/com/thealgorithms/datastructures/trees/AVLTree.java:40 — AVLTree.insert has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 1 (3 pts), loops 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 · RedBlackBST.fixTree (cognitive 18) · ×1
  • RedBlackBST.fixTree (cognitive 18) src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:96 — RedBlackBST.fixTree has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClosestPair.bruteForce (cognitive 18) · ×1
  • ClosestPair.bruteForce (cognitive 18) src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java:250 — ClosestPair.bruteForce has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RegexMatching.regexRecursion (cognitive 18) · ×1
  • RegexMatching.regexRecursion (cognitive 18) src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java:122 — RegexMatching.regexRecursion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Dinic.maxFlow (cognitive 18) · ×1
  • Dinic.maxFlow (cognitive 18) src/main/java/com/thealgorithms/graph/Dinic.java:37 — Dinic.maxFlow has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (7 pts), boolean chains 3 (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 · InverseOfMatrix.gaussian (cognitive 18) · ×1
  • InverseOfMatrix.gaussian (cognitive 18) src/main/java/com/thealgorithms/matrix/InverseOfMatrix.java:52 — InverseOfMatrix.gaussian has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 2 (6 pts) (nesting depth added 9). 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 · RangeInSortedArray.alteredBinSearchIter (cognitive 18) · ×1
  • RangeInSortedArray.alteredBinSearchIter (cognitive 18) src/main/java/com/thealgorithms/misc/RangeInSortedArray.java:75 — RangeInSortedArray.alteredBinSearchIter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LookScheduling.execute (cognitive 18) · ×1
  • LookScheduling.execute (cognitive 18) src/main/java/com/thealgorithms/scheduling/diskscheduling/LookScheduling.java:30 — LookScheduling.execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SmoothSort.sort (cognitive 18) · ×1
  • SmoothSort.sort (cognitive 18) src/main/java/com/thealgorithms/sorts/SmoothSort.java:41 — SmoothSort.sort has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2, boolean chains 1 (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 · MaximumMinimumWindow.calculateMaxOfMin (cognitive 18) · ×1
  • MaximumMinimumWindow.calculateMaxOfMin (cognitive 18) src/main/java/com/thealgorithms/stacks/MaximumMinimumWindow.java:42 — MaximumMinimumWindow.calculateMaxOfMin has cognitive complexity 18 (threshold 15). Drivers by points: loops 10 (12 pts), if/else 2 (4 pts), boolean chains 2 (nesting depth added 4). 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 · BoundaryTraversal.iterativeBoundaryTraversal (cognitive 17) · ×1
  • BoundaryTraversal.iterativeBoundaryTraversal (cognitive 17) src/main/java/com/thealgorithms/datastructures/trees/BoundaryTraversal.java:123 — BoundaryTraversal.iterativeBoundaryTraversal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (4 pts), loops 3, boolean chains 2 (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 · AllConstruct.allConstruct (cognitive 17) · ×1
  • AllConstruct.allConstruct (cognitive 17) src/main/java/com/thealgorithms/dynamicprogramming/AllConstruct.java:32 — AllConstruct.allConstruct has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 10). 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 · AccountMerge.mergeAccounts (cognitive 16) · ×1
  • AccountMerge.mergeAccounts (cognitive 16) src/main/java/com/thealgorithms/graph/AccountMerge.java:32 — AccountMerge.mergeAccounts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (6 pts), boolean chains 2 (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 · ConstrainedShortestPath.solve (cognitive 16) · ×1
  • ConstrainedShortestPath.solve (cognitive 16) src/main/java/com/thealgorithms/graph/ConstrainedShortestPath.java:87 — ConstrainedShortestPath.solve has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 2 (7 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LUDecomposition.decompose (cognitive 16) · ×1
  • LUDecomposition.decompose (cognitive 16) src/main/java/com/thealgorithms/matrix/LUDecomposition.java:39 — LUDecomposition.decompose has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 2 (4 pts) (nesting depth added 9). 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 · PrintAMatrixInSpiralOrder.print (cognitive 16) · ×1
  • PrintAMatrixInSpiralOrder.print (cognitive 16) src/main/java/com/thealgorithms/matrix/PrintAMatrixInSpiralOrder.java:40 — PrintAMatrixInSpiralOrder.print has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 2 (4 pts), boolean chains 1 (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 · RotatedBinarySearch.find (cognitive 16) · ×1
  • RotatedBinarySearch.find (cognitive 16) src/main/java/com/thealgorithms/searches/RotatedBinarySearch.java:23 — RotatedBinarySearch.find has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DuplicateBrackets.check (cognitive 16) · ×1
  • DuplicateBrackets.check (cognitive 16) src/main/java/com/thealgorithms/stacks/DuplicateBrackets.java:20 — DuplicateBrackets.check has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KasaiAlgorithm.kasai (cognitive 16) · ×1
  • KasaiAlgorithm.kasai (cognitive 16) src/main/java/com/thealgorithms/strings/KasaiAlgorithm.java:29 — KasaiAlgorithm.kasai has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 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.
D3 · God Classes · TooManyMethods · ×1
  • TooManyMethods: Builder src/main/java/com/thealgorithms/maths/MathBuilder.java:49 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D31 · IaC & Container Security · Medium IaC · ×1
  • REDACTED
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java:39 — src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java:39-62 | src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java:13-37 — 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 (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) src/main/java/com/thealgorithms/ciphers/AES.java:2569 — src/main/java/com/thealgorithms/ciphers/AES.java:2569-2598 | src/main/java/com/thealgorithms/ciphers/AES.java:2604-2633 — 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 · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) src/main/java/com/thealgorithms/graph/Dinic.java:37 — src/main/java/com/thealgorithms/graph/Dinic.java:37-76 | src/main/java/com/thealgorithms/graph/EdmondsKarp.java:35-84 | src/main/java/com/thealgorithms/graph/GomoryHuTree.java:54-69 | src/main/java/com/thealgorithms/graph/HungarianAlgorithm.java:131-149 | src/main/java/com/thealgorithms/graph/PushRelabel.java:143-161 | src/main/java/com/thealgorithms/graph/YensKShortestPaths.java:112-134 — 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/main/java/com/thealgorithms/graph/Dinic.java:37 — src/main/java/com/thealgorithms/graph/Dinic.java:37-76 | src/main/java/com/thealgorithms/graph/EdmondsKarp.java:35-84 | src/main/java/com/thealgorithms/graph/GomoryHuTree.java:80-107 | src/main/java/com/thealgorithms/graph/PushRelabel.java:34-83 — 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 · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) src/main/java/com/thealgorithms/ciphers/HillCipher.java:7 — src/main/java/com/thealgorithms/ciphers/HillCipher.java:7-36 | src/main/java/com/thealgorithms/ciphers/HillCipher.java:40-69 — 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. 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 (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) src/main/java/com/thealgorithms/datastructures/trees/BSTRecursiveGeneric.java:71 — src/main/java/com/thealgorithms/datastructures/trees/BSTRecursiveGeneric.java:71-93 | src/main/java/com/thealgorithms/datastructures/trees/BSTRecursiveGeneric.java:103-125 — 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 (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) src/main/java/com/thealgorithms/maths/AliquotSum.java:40 — src/main/java/com/thealgorithms/maths/AliquotSum.java:40-60 | src/main/java/com/thealgorithms/maths/PerfectNumber.java:45-67 — 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 (20–22 lines × 2) · ×1
  • Duplicated block (20–22 lines × 2) src/main/java/com/thealgorithms/others/MosAlgorithm.java:51 — src/main/java/com/thealgorithms/others/MosAlgorithm.java:51-72 | src/main/java/com/thealgorithms/others/MosAlgorithm.java:117-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/thealgorithms/others/MosAlgorithm.java:51` 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 (18–20 lines × 2) · ×1
  • Duplicated block (18–20 lines × 2) src/main/java/com/thealgorithms/graph/EdmondsKarp.java:87 — src/main/java/com/thealgorithms/graph/EdmondsKarp.java:87-106 | src/main/java/com/thealgorithms/graph/GomoryHuTree.java:110-127 — before extracting anything, compare `src/main/java/com/thealgorithms/graph/EdmondsKarp.java` and `src/main/java/com/thealgorithms/graph/GomoryHuTree.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java:122 — src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java:122-140 | src/main/java/com/thealgorithms/datastructures/caches/MRUCache.java:155-173 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java` and `src/main/java/com/thealgorithms/datastructures/caches/MRUCache.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) src/main/java/com/thealgorithms/datastructures/queues/SlidingWindowMaximum.java:44 — src/main/java/com/thealgorithms/datastructures/queues/SlidingWindowMaximum.java:44-62 | src/main/java/com/thealgorithms/slidingwindow/MaximumSlidingWindow.java:38-55 — 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/thealgorithms/datastructures/queues/SlidingWindowMaximum.java:44` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) src/main/java/com/thealgorithms/graph/EdmondsKarp.java:65 — src/main/java/com/thealgorithms/graph/EdmondsKarp.java:65-81 | src/main/java/com/thealgorithms/graph/GomoryHuTree.java:87-102 — before extracting anything, compare `src/main/java/com/thealgorithms/graph/EdmondsKarp.java` and `src/main/java/com/thealgorithms/graph/GomoryHuTree.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–17 lines × 2) · ×1
  • Duplicated block (12–17 lines × 2) src/main/java/com/thealgorithms/maths/FindKthNumber.java:44 — src/main/java/com/thealgorithms/maths/FindKthNumber.java:44-60 | src/main/java/com/thealgorithms/randomized/RandomizedQuickSort.java:39-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/java/com/thealgorithms/randomized/RandomizedQuickSort.java:39` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) src/main/java/com/thealgorithms/strings/Anagrams.java:77 — src/main/java/com/thealgorithms/strings/Anagrams.java:77-93 | src/main/java/com/thealgorithms/strings/Anagrams.java:134-150 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) src/main/java/com/thealgorithms/slidingwindow/MaxSumKSizeSubarray.java:29 — src/main/java/com/thealgorithms/slidingwindow/MaxSumKSizeSubarray.java:29-44 | src/main/java/com/thealgorithms/slidingwindow/MinSumKSizeSubarray.java:31-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/java/com/thealgorithms/slidingwindow/MaxSumKSizeSubarray.java:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) src/main/java/com/thealgorithms/sorts/LinkListSort.java:21 — src/main/java/com/thealgorithms/sorts/LinkListSort.java:21-35 | src/main/java/com/thealgorithms/sorts/LinkListSort.java:50-64 | src/main/java/com/thealgorithms/sorts/LinkListSort.java:80-94 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/java/com/thealgorithms/sorts/LinkListSort.java:79` calls `Task2` and `src/main/java/com/thealgorithms/sorts/LinkListSort.java:49` 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 (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java:153 — src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java:153-167 | src/main/java/com/thealgorithms/datastructures/caches/MRUCache.java:117-130 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java` and `src/main/java/com/thealgorithms/datastructures/caches/MRUCache.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/thealgorithms/datastructures/caches/LRUCache.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.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) src/main/java/com/thealgorithms/others/SkylineProblem.java:68 — src/main/java/com/thealgorithms/others/SkylineProblem.java:68-80 | src/main/java/com/thealgorithms/others/SkylineProblem.java:82-95 — 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/thealgorithms/others/SkylineProblem.java:82` 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 (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java:23 — src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java:23-35 | src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java:60-70 — 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/thealgorithms/ciphers/SimpleSubCipher.java:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java:223 — src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java:223-234 | src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java:280-292 — 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/thealgorithms/divideandconquer/ClosestPair.java:280` 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 (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) src/main/java/com/thealgorithms/machinelearning/KNearestNeighbors.java:64 — src/main/java/com/thealgorithms/machinelearning/KNearestNeighbors.java:64-74 | src/main/java/com/thealgorithms/others/Huffman.java:81-89 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:388 — src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:388-397 | src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:402-411 | src/main/java/com/thealgorithms/datastructures/caches/RRCache.java:328-337 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java` and `src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/thealgorithms/datastructures/caches/FIFOCache.java:388` 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–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) src/main/java/com/thealgorithms/datastructures/trees/Trie.java:90 — src/main/java/com/thealgorithms/datastructures/trees/Trie.java:90-98 | src/main/java/com/thealgorithms/datastructures/trees/Trie.java:115-123 | src/main/java/com/thealgorithms/datastructures/trees/Trie.java:168-177 — 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.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) src/main/java/com/thealgorithms/conversions/OctalToDecimal.java:23 — src/main/java/com/thealgorithms/conversions/OctalToDecimal.java:23-32 | src/main/java/com/thealgorithms/conversions/OctalToHexadecimal.java:24-31 — 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/thealgorithms/conversions/OctalToDecimal.java:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) src/main/java/com/thealgorithms/graph/Dinic.java:43 — src/main/java/com/thealgorithms/graph/Dinic.java:43-51 | src/main/java/com/thealgorithms/graph/EdmondsKarp.java:42-50 | src/main/java/com/thealgorithms/graph/GomoryHuTree.java:60-68 | src/main/java/com/thealgorithms/graph/HungarianAlgorithm.java:140-148 | src/main/java/com/thealgorithms/graph/PushRelabel.java:149-157 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/java/com/thealgorithms/graph/Dinic.java:43` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/java/com/thealgorithms/graph/PushRelabel.java:159` calls `IllegalArgumentException` and `src/main/java/com/thealgorithms/graph/HungarianAlgorithm.java:149` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5–8 lines × 3) · ×1
  • Duplicated block (5–8 lines × 3) src/main/java/com/thealgorithms/randomized/RandomizedMatrixMultiplicationVerification.java:32 — src/main/java/com/thealgorithms/randomized/RandomizedMatrixMultiplicationVerification.java:32-39 | src/main/java/com/thealgorithms/randomized/RandomizedMatrixMultiplicationVerification.java:40-47 | src/main/java/com/thealgorithms/randomized/RandomizedMatrixMultiplicationVerification.java:48-52 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) src/main/java/com/thealgorithms/dynamicprogramming/LongestCommonSubsequence.java:54 — src/main/java/com/thealgorithms/dynamicprogramming/LongestCommonSubsequence.java:54-60 | src/main/java/com/thealgorithms/dynamicprogramming/ShortestCommonSupersequenceLength.java:58-63 — 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/thealgorithms/dynamicprogramming/LongestCommonSubsequence.java:54` 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 (2–5 lines × 3) · ×1
  • Duplicated block (2–5 lines × 3) src/main/java/com/thealgorithms/maths/EulerMethod.java:30 — src/main/java/com/thealgorithms/maths/EulerMethod.java:30-34 | src/main/java/com/thealgorithms/maths/EulerMethod.java:37-41 | src/main/java/com/thealgorithms/maths/EulerMethod.java:43-44 — 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/thealgorithms/maths/EulerMethod.java:36` calls `eulerFull` and `src/main/java/com/thealgorithms/maths/EulerMethod.java:44` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:254 — src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:254-262 | src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:267-275 | src/main/java/com/thealgorithms/datastructures/caches/RRCache.java:240-248 — before extracting anything, compare `src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java` and `src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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.
M1 · Documentation (README) · README may be stale · ×1
  • README may be stale — 94 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
P12 · CI test-gate honesty · Coverage collected but not gated · ×1
  • Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
Minor — 11 finding(s)
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 7 significant file(s) lose their only recent owner: src/main/java/com/thealgorithms/others/MemoryManagementAlgorithms.java, src/main/java/com/thealgorithms/divideandconquer/SkylineAlgorithm.java, src/main/java/com/thealgorithms/datastructures/queues/PriorityQueues.java, src/main/java/com/thealgorithms/datastructures/trees/AVLSimple.java, src/main/java/com/thealgorithms/datastructures/trees/CeilInBinarySearchTree.java, src/main/java/com/thealgorithms/dynamicprogramming/BoundaryFill.java, src/main/java/com/thealgorithms/devutils/nodes/SimpleTreeNode.java. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 4 significant file(s) lose their only recent owner: src/main/java/com/thealgorithms/sorts/LibrarySort.java, src/main/java/com/thealgorithms/machinelearning/MultinomialNaiveBayesClassifier.java, src/main/java/com/thealgorithms/machinelearning/LinearRegression.java, src/main/java/com/thealgorithms/maths/SociableNumber.java. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: src/main/java/com/thealgorithms/compression/HuffmanCoding.java, src/main/java/com/thealgorithms/ciphers/ElGamalCipher.java, src/main/java/com/thealgorithms/prefixsum/DifferenceArray.java. Pair on, review, or document these before any departure.
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file src/main/java/com/thealgorithms/ciphers/Blowfish.java — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 23 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (43 single-owned of 407 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 407 of the 812 production source files in this repository met that bar). They are anonymized user #4 (2 file(s)), anonymized user #5 (2 file(s)), anonymized user #6 (2 file(s)), anonymized user #7 (2 file(s)), anonymized user #8 (2 file(s)), anonymized user #9 (2 file(s)) (+17 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
D31 · IaC & Container Security · Low IaC · ×1
  • REDACTED
D34 · Knowledge Freshness · Concentrated knowledge decay · ×1
  • Concentrated knowledge decay — 273 of 407 significant files have no living knowledge, while the repository is still being changed at a low rate (77 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 273 separate risks. Counted over 407 of the 812 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.
M1 · Documentation (README) · Thin README · ×1
  • Thin README — The root README is 89 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-c927d1bf0dc44ab1aa439d6876d00b34/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-c927d1bf0dc44ab1aa439d6876d00b34/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .25artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive .0—
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .3artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep --config /opt/semgrep-rules/gdpr.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .2artifacts/raw/semgrep-gdpr.json
D36 · Supply-chain Provenance & Signingprovenance—provenance: not applicable — The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release).0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive .0—

Run 01a0d3d7-4a04-7b09-87b8-15d2319342a0 · 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