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

TheAlgorithms/Java

Measured 13 November 2026, 13:04 UTC, at code version 2f04e81

CAI score 67out of 100 Strong
CriticalWeakAdequateStrongExemplary
Up 4 since the last survey

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

A medium codebase: 79,153 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 1.1 person-years · Weakest lens: Code Health, 60

Findings by how serious they are

28 critical 378 serious 346 minor

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

This survey was produced by

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

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

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

47of 47 dimensions measured by tools.
737of 752 findings point to an exact file and line, so you can open each one in the code. The other 15 concern the repository as a whole, such as missing documentation.
47dimensions across 5 lenses, read from 79,153 lines of product code in 1 project.
Chapters

Executive summary

TheAlgorithms/Java meets our standard for a template or a sample. It scores 67 out of 100 and is rated Strong, and all 28 of its critical findings are security problems.

Code Health, at 60, is the weakest lens and counts most in the score. The best first step is declaring which values may be missing, worth about 6 points. Handling the errors the code catches and ignores comes next, worth about 4 points. Raising Code Health to 63 would lift the score to about 69.

Twenty-three pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Two secrets can leak from the build pipeline, and one setting leaves the servers or containers unsafe. Pinning each tool to an exact version, limiting each secret to its own step and correcting the unsafe settings would close these risks. Keeping the personal data out of the places it leaks to is also needed.

The product code is 79,153 lines, about €160,000 to rebuild.

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

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

If Code Health rose from 60 to 63, the lowest score rated Strong, the score would rise from 67 to about 69.

Code composition: what the lines of code are
Product code 60%Tests 40%
New since the last survey: 164 findings

These 164 critical or serious findings weren't in the previous survey, on 24 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Code Duplication · Edited copy of a member (52 corresponding lines) src/main/java/com/thealgorithms/searches/RabinKarpAlgorithm.java
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/ciphers/AES.java
  • Code Duplication · Edited copy of a member (37 corresponding lines) src/main/java/com/thealgorithms/stacks/InfixToPostfix.java
  • Code Duplication · Edited copy of a member (56 corresponding lines) src/main/java/com/thealgorithms/others/MosAlgorithm.java
  • Code Duplication · Edited copies of one member (3 members, 30+ corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java
  • Code Duplication · Edited copy of a member (30 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/BSTRecursive.java
  • Code Duplication · Edited copy of a member (30 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/NeedlemanWunsch.java
  • Code Duplication · Edited copy of a member (26 corresponding lines) src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java
  • Code Duplication · Edited copy of a member (28 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/LevelOrderTraversal.java
  • Code Duplication · Edited copy of a member (22 corresponding lines) src/main/java/com/thealgorithms/ciphers/Vigenere.java
  • Code Duplication · Edited copy of a member (30 corresponding lines) src/main/java/com/thealgorithms/datastructures/queues/SlidingWindowMaximum.java
  • Code Duplication · Edited copy of a member (24 corresponding lines) src/main/java/com/thealgorithms/greedyalgorithms/BandwidthAllocation.java
  • Code Duplication · Edited copy of a member (29 corresponding lines) src/main/java/com/thealgorithms/streaming/TDigest.java
  • Code Duplication · Edited copy of a member (34 corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java
  • Code Duplication · Edited copy of a member (23 corresponding lines) src/main/java/com/thealgorithms/ciphers/HillCipher.java
  • Code Duplication · Edited copy of a member (42 corresponding lines) src/main/java/com/thealgorithms/scheduling/diskscheduling/CircularLookScheduling.java
  • Code Duplication · Edited copy of a member (21 corresponding lines) src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java
  • Code Duplication · Edited copy of a member (20 corresponding lines) src/main/java/com/thealgorithms/ciphers/Caesar.java
  • Code Duplication · Edited copy of a member (24 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java
  • Code Duplication · Edited copy of a member (24 corresponding lines) src/main/java/com/thealgorithms/misc/RangeInSortedArray.java
  • Code Duplication · Edited copy of a member (22 corresponding lines) src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java
  • Code Duplication · Edited copy of a member (22 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/SubsetCount.java
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/KDTree.java
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/matrix/utils/MatrixUtil.java
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/DiceThrow.java
  • Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) src/main/java/com/thealgorithms/sorts/AdaptiveMergeSort.java
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/ciphers/Autokey.java
  • Code Duplication · Edited copy of a member (21 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/PostOrderTraversal.java
  • Code Duplication · Edited copy of a member (20 corresponding lines) src/main/java/com/thealgorithms/sorts/LinkListSort.java
  • Code Duplication · Edited copy of a member (18 corresponding lines) src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java
  • Code Duplication · Edited copy of a member (18 corresponding lines) src/main/java/com/thealgorithms/maths/CircularConvolutionFFT.java
  • Code Duplication · Edited copy of a member (21 corresponding lines) src/main/java/com/thealgorithms/ciphers/PermutationCipher.java
  • Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/stacks/PostfixEvaluator.java
  • Code Duplication · Edited copy of a member (18 corresponding lines) src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java
  • Code Duplication · Edited copy of a member (21 corresponding lines) src/main/java/com/thealgorithms/datastructures/graphs/ConnectedComponent.java
  • Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) src/main/java/com/thealgorithms/stacks/NextGreaterElement.java
  • Code Duplication · Edited copy of a member (24 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/AVLTree.java
  • Code Duplication · Edited copy of a member (18 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/SegmentTree2D.java
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/streaming/CusumDetector.java
  • Code Duplication · Edited copy of a member (26 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/CatalanNumber.java
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/physics/CoulombsLaw.java
  • Code Duplication · Edited copy of a member (21 corresponding lines) src/main/java/com/thealgorithms/slidingwindow/MaxSumKSizeSubarray.java
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/main/java/com/thealgorithms/ciphers/ColumnarTranspositionCipher.java
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/main/java/com/thealgorithms/conversions/OctalToDecimal.java
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/SegmentTree2D.java
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/main/java/com/thealgorithms/maths/AbsoluteMax.java
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/CreateBinaryTreeFromInorderPreorder.java
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/maths/SigmoidActivation.java
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/others/Huffman.java
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/main/java/com/thealgorithms/conversions/MorseCodeConverter.java
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/WaveletTree.java
  • Code Duplication · Edited copy of a member (20 corresponding lines) src/main/java/com/thealgorithms/maths/JacobsthalNumber.java
  • Code Duplication · Edited copy of a member (30 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/MaximumSumOfNonAdjacentElements.java
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/main/java/com/thealgorithms/slidingwindow/LongestSubstringWithoutRepeatingCharacters.java
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java
  • Code Duplication · Edited copy of a member (20 corresponding lines) src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/randomized/RandomizedQuickSort.java
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/datastructures/heaps/IndexedPriorityQueue.java
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/main/java/com/thealgorithms/ciphers/Blowfish.java
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/bitmanipulation/GenerateSubsets.java
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/main/java/com/thealgorithms/conversions/HexToOct.java
  • Code Duplication · Edited copies of one member (5 members, 14+ corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/datastructures/graphs/MatrixGraphs.java
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/sorts/WaveSort.java
  • Code Duplication · Edited copies of one member (7 members, 9+ corresponding lines) src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMapCuckooHashing.java
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/HeavyLightDecomposition.java
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/main/java/com/thealgorithms/maths/FindMaxRecursion.java
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/others/Verhoeff.java
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/graph/AccountMerge.java
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/datastructures/lists/CircleLinkedList.java
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/Knapsack.java
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/maths/ChebyshevIteration.java
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/AVLSimple.java
  • Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) src/main/java/com/thealgorithms/searches/BinarySearch.java
  • Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) src/main/java/com/thealgorithms/sorts/FlashSort.java
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/datastructures/crdt/PNCounter.java
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/backtracking/MazeRecursion.java
  • Code Duplication · Edited copy of a member (18 corresponding lines) src/main/java/com/thealgorithms/datastructures/queues/ThreadSafeQueue.java
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/KDTree.java
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java
  • Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) src/main/java/com/thealgorithms/datastructures/lists/TortoiseHareAlgo.java
  • Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java
  • Code Duplication · Edited copy of a member (18 corresponding lines) src/main/java/com/thealgorithms/maths/NumberPersistence.java
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/datastructures/queues/ThreadSafeQueue.java
  • Code Duplication · Edited copies of one member (5 members, 17+ corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/Fibonacci.java
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/main/java/com/thealgorithms/sorts/BubbleSort.java
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/datastructures/disjointsetunion/DisjointSetUnion.java
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/BSTRecursive.java
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/maths/PalindromePrime.java
  • Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) src/main/java/com/thealgorithms/maths/AliquotSum.java
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMap.java
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/ciphers/ADFGVXCipher.java

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

Fixed since the last survey: 11 findings

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

  • Code Duplication · Edited copy of a member (23 corresponding lines) src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java
  • Code Duplication · Duplicated block (23 lines × 2) src/main/java/com/thealgorithms/datastructures/trees/BSTRecursiveGeneric.java
  • Code Duplication · Duplicated block (13 lines × 2) src/main/java/com/thealgorithms/ciphers/AES.java
  • Code Duplication · Duplicated block (9–11 lines × 3) src/main/java/com/thealgorithms/machinelearning/KNearestNeighbors.java
  • Code Duplication · Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/conversions/RgbHsvConversion.java
  • Code Duplication · Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java
  • Code Duplication · Duplicated block (7 lines × 2) src/main/java/com/thealgorithms/streaming/CusumDetector.java
  • Code Duplication · Duplicated block (6 lines × 2) src/main/java/com/thealgorithms/streaming/CusumDetector.java
  • Code Duplication · Duplicated block (11 lines × 2) src/main/java/com/thealgorithms/others/Damm.java
  • Cohesion (LCOM4) · Low cohesion: Builder (LCOM4 4) src/main/java/com/thealgorithms/datastructures/caches/RRCache.java
  • Documentation (README) · README may be stale
Rebuild cost: about €160,000 · Estimate
Cost to rebuild€54,000 to €270,000, for 896 to 2,843 hours of work, about 1.1 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.9 at a score of 67. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 79,153 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced.
Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).
Raises the score by about 6 points · Medium effort · Nullable reference types
2
Swallowed exception (caught, then discarded)
Raises the score by about 4 points · Medium effort · Exception handling
3
Expand the README with getting-started, architecture overview and a project map.
Raises the score by about 2 points · Medium effort · Documentation (README)

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €160,000 to build again, about 1.1 person-years of work. Its weakest lens is Code Health, at 60 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture: which parts of the code depend on which

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

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

The table shows the 40 modules with the most connections; 16 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 .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
Uses a module listed above itPart of a loopThe module itself
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.github.workflows.scripts1com.thealgorithms.audiofilters2com.thealgorithms.backtracking3com.thealgorithms.bitmanipulation4com.thealgorithms.ciphers5com.thealgorithms.ciphers.a56com.thealgorithms.compression7com.thealgorithms.conversions8com.thealgorithms.datastructures9com.thealgorithms.datastructures.bags10com.thealgorithms.datastructures.bloomfilter11com.thealgorithms.datastructures.buffers12com.thealgorithms.datastructures.caches13com.thealgorithms.datastructures.crdt14com.thealgorithms.datastructures.disjointsetunion15com.thealgorithms.datastructures.dynamicarray16com.thealgorithms.datastructures.graphs17com.thealgorithms.datastructures.hashmap.hashing18com.thealgorithms.datastructures.heaps19com.thealgorithms.datastructures.lists20com.thealgorithms.datastructures.queues21com.thealgorithms.datastructures.stacks22com.thealgorithms.datastructures.trees23com.thealgorithms.devutils.entities24com.thealgorithms.devutils.nodes25com.thealgorithms.devutils.searches26com.thealgorithms.divideandconquer27com.thealgorithms.geometry28com.thealgorithms.graph29com.thealgorithms.greedyalgorithms30com.thealgorithms.io31com.thealgorithms.lineclipping.utils32com.thealgorithms.machinelearning33com.thealgorithms.maths34com.thealgorithms.maths.Prime35com.thealgorithms.matrix36com.thealgorithms.dynamicprogramming37com.thealgorithms.lineclipping38com.thealgorithms.scheduling39com.thealgorithms.searches40125214+16 more modules (most-connected shown)

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

At a glance — Architecture · 100% · Exemplary ·

At a glance — Maturity · 72% · Adequate · gated by D34 ·

At a glance — Readiness · 67% · Strong ·

At a glance — Security · 83% · Checked 5 of 11 ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection25High / Critical
A02:2025 — Security Misconfiguration3High / Critical
A01:2025 — Broken Access Control2High / Critical

Roadmap

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

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

Do thisHelpsEffortDimension
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).+6.0 ptsMediumNullable reference types
Swallowed exception (caught, then discarded)+4.1 ptsMediumException handling
Expand the README with getting-started, architecture overview and a project map.+2.0 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.+1.7 ptsMediumDeployment & Rollback
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+1.7 ptsMediumRelease Hygiene
Resolve the 314 Orphaned file finding(s) in Knowledge Freshness — start with FIFOCache.java, RRCache.java, BentleyOttmann.java.+2.7 ptsHighKnowledge Freshness
Resolve the 5 Off-boarding risk finding(s) in Bus Factor.+0.6 ptsLowBus Factor
Resolve the 2 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED (2).+0.6 ptsLowData Compliance (PII/GDPR)

File quality

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

FileScoreBandWorst signal
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedIaC & Container Security: High IaC: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedData Compliance (PII/GDPR): High: REDACTED
src/main/java/com/thealgorithms/datastructures/trees/BinaryTree.java6.3Near-cleanCyclomatic Complexity: BinaryTree.remove (cyclomatic 17)
src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java7.0Near-cleanCode Duplication: Members sharing a duplicated core (4 members, 50+ identical tokens)
src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java7.0Near-cleanCode Duplication: Edited copy of a member (34 corresponding lines)
src/main/java/com/thealgorithms/graph/Dinic.java7.0Near-cleanCognitive Complexity: Dinic.maxFlow (cognitive 18)
src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java7.0Near-cleanCode Duplication: Edited copy of a member (21 corresponding lines)
src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java7.1Near-cleanCognitive Complexity: RedBlackBST.deleteFixup (cognitive 27)
src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java7.1Near-cleanCognitive Complexity: RegexMatching.regexBU (cognitive 20)
src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java7.1Near-cleanCode Duplication: Edited copy of a member (19 corresponding lines)
src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java7.1Near-cleanCognitive Complexity: ClosestPair.closestPair (cognitive 25)
src/main/java/com/thealgorithms/stacks/InfixToPostfix.java7.1Near-cleanCognitive Complexity: InfixToPostfix.infix2PostFix (cognitive 16)
src/main/java/com/thealgorithms/ciphers/AES.java7.1Near-cleanCode Duplication: Edited copy of a member (30 corresponding lines)
src/main/java/com/thealgorithms/geometry/BentleyOttmann.java7.2Near-cleanCyclomatic Complexity: BentleyOttmann.handleEvent (cyclomatic 17)

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

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

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

Could not be resolved — 18

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

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 47 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

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

What we checked — 47 dimensions across the health lenses
D1D2D3D4D6D10D11D12D13D14D15D16D17D27D28D29D30D31D32D34D35D43D44AX10AX3AX4AX6IC1M1M3M4P1P2P3P4P6X14X16X18X20X25X27X28X29X3X30X5

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

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1d502-a0ca-7c10-8883-0a2767cea1b1.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT 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.
  • D12 Dependency Hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Currency was graded against Maven Central, but whether an artifact is DEPRECATED is not: Maven Central publishes no deprecation marker, exactly as rubygems.org does not. Whether one is UNMAINTAINED is not graded either — no registry publishes a maintenance status, and release age does not stand in for one. Two of this dimension's four signals are therefore unread on a Maven tree, and its score reflects currency alone.
  • D19 Documentation Quality — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (79153 LoC, 875 module-visible types across 55 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — -------------------- 4 | 5 | >>> RUN test ! -f "$LLVM_SCRIPT" \ 6 | >>> && wget https://apt.llvm.org/llvm.sh -O "$LLVM_SCRIPT" \ 7 | >>> && chmod +x "$LLVM_SCRIPT" 8 | -------------------- ERROR: failed to solve: process "/bin/sh -c test ! -f \"$LLVM_SCRIPT\" && wget https://apt.llvm.org/llvm.sh -O \"$LLVM_SCRIPT\" && chmod +x \"$LLVM_SCRIPT\"" did not complete successfully: exit code: 4; runtime evidence skipped.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Java is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — we run 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.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • 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").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • 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.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • 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.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • 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.

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. Bring the 9 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with Edmonds.findMSARecursive (cyclomatic 29), LongDivision.divide (cyclomatic 20), HungarianAlgorithm.solve (cyclomatic 19). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 9 together lifts Cyclomatic Complexity from 8.6 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

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

78 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
HungarianAlgorithm.solve (cognitive 48)src/main/java/com/thealgorithms/graph/HungarianAlgorithm.java:43
HierholzerEulerianPath.rotateEulerianCircuitIfNeeded (cognitive 42)src/main/java/com/thealgorithms/graph/HierholzerEulerianPath.java:207

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

What to do

  1. Bring the 6 bodies over 30 down to 30 or less in Cognitive Complexity — start with EdmondsBlossomAlgorithm.maximumMatching (cognitive 54), Edmonds.findMSARecursive (cognitive 52), HungarianAlgorithm.solve (cognitive 48). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 6 together lifts Cognitive Complexity from 6.7 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

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

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

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

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

2 god class(es) detected.

TooManyMethods: Builder · ×2src/main/java/com/thealgorithms/maths/MathBuilder.java:49

What to do

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

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

D4 · Code Duplication9.3 / 10Stronggated by 279 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

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

Edited copy of a member (9 corresponding lines) · ×12src/main/java/com/thealgorithms/datastructures/crdt/PNCounter.java:74
Duplicated block (7 lines × 2) · ×12src/main/java/com/thealgorithms/backtracking/MazeRecursion.java:24
Duplicated block (6 lines × 2) · ×12src/main/java/com/thealgorithms/datastructures/graphs/BellmanFord.java:104
Edited copy of a member (11 corresponding lines) · ×11src/main/java/com/thealgorithms/maths/SigmoidActivation.java:40
Edited copy of a member (10 corresponding lines) · ×11src/main/java/com/thealgorithms/datastructures/trees/HeavyLightDecomposition.java:91

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

What to do

  1. Resolve the 12 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with ExtendedKalmanFilter.java (2), PNCounter.java, UnscentedKalmanFilter.java. — One of this dimension's main actionable groups (12 warning-level).
  2. Resolve the 12 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with ExtendedKalmanFilter.java (3), HorsSignature.java (2), MazeRecursion.java. — One of this dimension's main actionable groups (12 warning-level).
  3. Resolve the 12 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with MaxHeap.java (2), BellmanFord.java, Dinic.java. — One of this dimension's main actionable groups (12 warning-level).

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

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

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

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

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

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

2 of 223 classes have LCOM4 above 3.

Low cohesion: SinglyLinkedList (LCOM4 6) · ×2src/main/java/com/thealgorithms/datastructures/lists/SinglyLinkedList.java:10

What to do

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

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

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

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

No assertions: testDisplay · ×3src/test/java/com/thealgorithms/datastructures/hashmap/hashing/HashMapTest.java:36

What to do

  1. Resolve the 3 No assertions finding(s) in Test Quality — start with HashMapTest.java, CircularLookSchedulingTest.java, FlashSortTest.java. — One of this dimension's main actionable groups (3 warning-level).

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.

D12 · Dependency Hygiene9.8 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

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

5 outdated artifact(s) of 16 resolved by the build, graded against Maven Central. The poms themselves state a version for only 4 of 5 declaration(s) — the rest are parent- or BOM-managed, which is why this is read from the resolved graph rather than from the manifests. Whether any of these is DEPRECATED is not graded — Maven Central publishes no deprecation marker, exactly as rubygems.org does not. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Known CVEs in this graph are D30's question, read from the manifest there.

Outdated (test): net.bytebuddy:byte-buddy · ×4
Outdated (compile): org.apache.commons:commons-lang3

✓ On the Gold path — maintain.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

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

0 of 4 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 1 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. 1 further coordinate(s) are declared with no version at the declaration site — inherited from a parent POM, a BOM or an unresolved Gradle version reference — and are NOT graded: this verdict covers what the checkout pins, not the full transitive graph.

✓ On the Gold path — maintain.

Detailed fixes: d14_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.5 / 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.5 / 10 · rule-coverage 100% · ceiling Documented

64 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/main/java/com/thealgorithms/ciphers/AES.java. Counted over 417 of the 825 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 · ×5
Further sole-owners (lower concentration)

What to do

  1. Resolve the 5 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (5 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 79153 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.

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)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
REDACTED

What to do

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

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

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

No known-vulnerable dependencies in any ecosystem this repository declares.

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.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 High 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 our 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 Freshness2.4 / 10Critical✓ Tool-verified

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

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

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

317 of 417 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/AES.java. Counted over 417 of the 825 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×314src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:1
Most significant orphaned file · ×3src/main/java/com/thealgorithms/ciphers/AES.java:1
Concentrated knowledge decay

What to do

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

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

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

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 5 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

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

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

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

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

  • The root README is 92 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, in the README and in the repository documents it links, it found no a build/run or getting-started section, no a testing 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. — README.md:1

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.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

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

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

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

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

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

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

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

P2 · Observability7.0 / 10Strong✓ Tool-verified

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

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

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.
X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

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

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

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

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

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

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

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

Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen.

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

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

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

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

X29 · Per-element action decided by a fixed element7.0 / 10Strong✓ Tool-verified

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

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

  • This loop runs once per element of `cost`, and the statement it guards acts on the element it is on — `cost[i]`. The test deciding whether that statement runs does not: `j >= 0 && j < cols` reads `cost[0]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts — the fixed one at line 46, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out. — src/main/java/com/thealgorithms/graph/HungarianAlgorithm.java:123

What to do

  • Each finding names the test and the statement it guards, which index the same collection at two different subscripts — one fixed, one the loop variable. Confirm from the two, then decide which subscript the test meant. If it was meant to be per-element, give it the loop variable so each element is judged on itself. If it really is one answer for the whole collection, hoist the test OUT of the loop, where a reader can see it is asked once and where it is not re-evaluated on every pass — leaving it inside, reading a fixed element, is the one arrangement that cannot be right under either reading.
X3 · Exception handling5.6 / 10Adequate✓ Tool-verified

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

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

  • `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — src/main/java/com/thealgorithms/maths/MathBuilder.java:44, src/main/java/com/thealgorithms/datastructures/lists/CursorLinkedList.java:88

What to do

  • Swallowed exception (caught, then discarded)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

What to do

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

Reference — by lens

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

LensScoreRatingImpact
Code Health60%Adequate — gated by X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture100%ExemplaryStrongest area.
Maturity72%Adequate — gated by D34Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness67%StrongSolid.
Security83%Checked 5 of 11Solid.
Unscored — 3 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.
  • X10 Duplicated predicate — 12 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
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 — 62 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: this repository's Java imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • 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.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — -------------------- 4 | 5 | >>> RUN test ! -f "$LLVM_SCRIPT" \ 6 | >>> && wget https://apt.llvm.org/llvm.sh -O "$LLVM_SCRIPT" \ 7 | >>> && chmod +x "$LLVM_SCRIPT" 8 | -------------------- ERROR: failed to solve: process "/bin/sh -c test ! -f \"$LLVM_SCRIPT\" && wget https://apt.llvm.org/llvm.sh -O \"$LLVM_SCRIPT\" && chmod +x \"$LLVM_SCRIPT\"" did not complete successfully: exit code: 4; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • 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.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D19 Documentation Quality — D19 reads .NET projects and npm packages as units; 1 folder(s) declared by pom.xml were not judged for an overview, an example or the map.
  • 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.
  • D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Java, Python not measured.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .java, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D36 Supply-chain Provenance & Signing — The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files).
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D5 Coupling — Not applicable — this Maven build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • 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): 38 value object(s); 2 domain event(s); its domain events are published by services or handlers — no domain entity raises one
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • 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.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a pom.xml, Gradle or sbt build, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — not 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 — 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
  • X13 Undrained process stream — 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
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not 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
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no C# was loaded; this repository's Java was read, and no request in it can be cancelled by a caller — a Java request off Android takes no token: it is cancelled through the handle it returns (Future.cancel, Call.cancel, a Disposable), ambiently (io.grpc.Context) or by interrupting its thread, not through a parameter
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Java was read, and it logs through none that an assembled message defeats: java.util.logging's level methods, log4j 1, commons-logging, JBoss Logging and Flogger take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J or log4j 2 (`org.slf4j.Logger`, `org.apache.logging.log4j.Logger`, Lombok's `@Slf4j`) would be judged.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D32 · Data Compliance (PII/GDPR) · REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×1
  • REDACTED
Serious — 378 finding(s)
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×12
  • Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/datastructures/crdt/PNCounter.java:74 — src/main/java/com/thealgorithms/datastructures/crdt/PNCounter.java:74-84 | src/main/java/com/thealgorithms/datastructures/crdt/PNCounter.java:91-99 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:401 — src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:401-409 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:509-517 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:96 — src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:96-104 | src/main/java/com/thealgorithms/datastructures/caches/RRCache.java:89-98 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/matrix/MatrixRank.java:58 — src/main/java/com/thealgorithms/matrix/MatrixRank.java:58-66 | src/main/java/com/thealgorithms/matrix/MirrorOfMatrix.java:23-35 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/sorts/AdaptiveMergeSort.java:14 — src/main/java/com/thealgorithms/sorts/AdaptiveMergeSort.java:14-22 | src/main/java/com/thealgorithms/sorts/ConcurrentMergeSort.java:104-113 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/nearestRightKey.java:10 — src/main/java/com/thealgorithms/datastructures/trees/nearestRightKey.java:10-18 | src/main/java/com/thealgorithms/maths/KeithNumber.java:89-100 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:299 — src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:299-308 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:386-394 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/OptimalJobScheduling.java:95 — src/main/java/com/thealgorithms/dynamicprogramming/OptimalJobScheduling.java:95-106 | src/main/java/com/thealgorithms/sorts/FlashSort.java:119-127 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/others/ArrayRightRotation.java:42 — src/main/java/com/thealgorithms/others/ArrayRightRotation.java:42-50 | src/main/java/com/thealgorithms/strings/Rotation.java:53-61 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:342 — src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:342-350 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:481-489 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/scheduling/AgingScheduling.java:52 — src/main/java/com/thealgorithms/scheduling/AgingScheduling.java:52-61 | src/main/java/com/thealgorithms/scheduling/SelfAdjustingScheduling.java:50-58 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/main/java/com/thealgorithms/others/MemoryManagementAlgorithms.java:50 — src/main/java/com/thealgorithms/others/MemoryManagementAlgorithms.java:50-58 | src/main/java/com/thealgorithms/sorts/DarkSort.java:50-58 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×12
  • Duplicated block (7 lines × 2) src/main/java/com/thealgorithms/backtracking/MazeRecursion.java:24 — src/main/java/com/thealgorithms/backtracking/MazeRecursion.java:24-30 | src/main/java/com/thealgorithms/backtracking/MazeRecursion.java:43-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. 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/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/ExtendedKalmanFilter.java:405 — src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:405-411 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:544-550 — before extracting anything, compare `src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java` and `src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 69 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/streaming/ExtendedKalmanFilter.java:405` 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/streaming/ExtendedKalmanFilter.java:415 — src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:415-421 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:554-560 — before extracting anything, compare `src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java` and `src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 69 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/streaming/ExtendedKalmanFilter.java:415` 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/ciphers/HorsSignature.java:196 — src/main/java/com/thealgorithms/ciphers/HorsSignature.java:196-202 | src/main/java/com/thealgorithms/ciphers/WinternitzSignature.java:198-204 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) src/main/java/com/thealgorithms/ciphers/HorsSignature.java:204 — src/main/java/com/thealgorithms/ciphers/HorsSignature.java:204-210 | src/main/java/com/thealgorithms/ciphers/WinternitzSignature.java:220-226 — 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/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/ExtendedKalmanFilter.java:352 — src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:352-358 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:491-497 — before extracting anything, compare `src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java` and `src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 69 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 (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 (6 lines × 2) · ×12
  • 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/divideandconquer/StrassenMatrixMultiplication.java:127 — src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java:127-132 | src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java:136-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 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/searches/LowerBound.java:32 — src/main/java/com/thealgorithms/searches/LowerBound.java:32-37 | src/main/java/com/thealgorithms/searches/UpperBound.java:32-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:237 — src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:237-242 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:308-313 — before extracting anything, compare `src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java` and `src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 69 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: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 · Edited copy of a member (11 corresponding lines) · ×11
  • Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/maths/SigmoidActivation.java:40 — src/main/java/com/thealgorithms/maths/SigmoidActivation.java:40-50 | src/main/java/com/thealgorithms/maths/SigmoidActivation.java:63-73 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/datastructures/graphs/MatrixGraphs.java:183 — src/main/java/com/thealgorithms/datastructures/graphs/MatrixGraphs.java:183-194 | src/main/java/com/thealgorithms/datastructures/graphs/MatrixGraphs.java:204-214 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/sorts/WaveSort.java:16 — src/main/java/com/thealgorithms/sorts/WaveSort.java:16-26 | src/main/java/com/thealgorithms/sorts/WaveSort.java:35-45 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/maths/ChebyshevIteration.java:122 — src/main/java/com/thealgorithms/maths/ChebyshevIteration.java:122-133 | src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:391-401 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/ciphers/ADFGVXCipher.java:80 — src/main/java/com/thealgorithms/ciphers/ADFGVXCipher.java:80-90 | src/main/java/com/thealgorithms/ciphers/BaconianCipher.java:57-70 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/backtracking/ArrayCombination.java:41 — src/main/java/com/thealgorithms/backtracking/ArrayCombination.java:41-53 | src/main/java/com/thealgorithms/graph/TravelingSalesman.java:93-103 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/BSTRecursive.java:104 — src/main/java/com/thealgorithms/datastructures/trees/BSTRecursive.java:104-114 | src/main/java/com/thealgorithms/datastructures/trees/BSTRecursiveGeneric.java:266-276 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/datastructures/graphs/JohnsonsAlgorithm.java:189 — src/main/java/com/thealgorithms/datastructures/graphs/JohnsonsAlgorithm.java:189-199 | src/main/java/com/thealgorithms/datastructures/graphs/PrimMST.java:14-26 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/CoinChange.java:18 — src/main/java/com/thealgorithms/dynamicprogramming/CoinChange.java:18-29 | src/main/java/com/thealgorithms/dynamicprogramming/NewManShanksPrime.java:37-47 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/bitmanipulation/BcdConversion.java:67 — src/main/java/com/thealgorithms/bitmanipulation/BcdConversion.java:67-81 | src/main/java/com/thealgorithms/bitmanipulation/Xs3Conversion.java:47-57 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/main/java/com/thealgorithms/divideandconquer/BinaryExponentiation.java:30 — src/main/java/com/thealgorithms/divideandconquer/BinaryExponentiation.java:30-41 | src/main/java/com/thealgorithms/maths/BinaryPow.java:15-25 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×11
  • Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/HeavyLightDecomposition.java:91 — src/main/java/com/thealgorithms/datastructures/trees/HeavyLightDecomposition.java:91-100 | src/main/java/com/thealgorithms/datastructures/trees/HeavyLightDecomposition.java:102-114 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/AVLSimple.java:125 — src/main/java/com/thealgorithms/datastructures/trees/AVLSimple.java:125-134 | src/main/java/com/thealgorithms/datastructures/trees/AVLSimple.java:136-145 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/backtracking/MazeRecursion.java:23 — src/main/java/com/thealgorithms/backtracking/MazeRecursion.java:23-32 | src/main/java/com/thealgorithms/backtracking/MazeRecursion.java:42-51 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/BSTRecursive.java:86 — src/main/java/com/thealgorithms/datastructures/trees/BSTRecursive.java:86-95 | src/main/java/com/thealgorithms/datastructures/trees/BSTRecursiveGeneric.java:174-183 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMap.java:161 — src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMap.java:161-170 | src/main/java/com/thealgorithms/datastructures/hashmap/hashing/ImmutableHashMap.java:61-72 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/maths/LinearDiophantineEquationsSolver.java:188 — src/main/java/com/thealgorithms/maths/LinearDiophantineEquationsSolver.java:188-197 | src/main/java/com/thealgorithms/maths/LinearDiophantineEquationsSolver.java:247-256 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/ciphers/XORCipher.java:65 — src/main/java/com/thealgorithms/ciphers/XORCipher.java:65-74 | src/main/java/com/thealgorithms/ciphers/XORCipher.java:85-94 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/compression/BurrowsWheelerTransform.java:84 — src/main/java/com/thealgorithms/compression/BurrowsWheelerTransform.java:84-93 | src/main/java/com/thealgorithms/searches/BM25InvertedIndex.java:80-89 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/GenericTree.java:97 — src/main/java/com/thealgorithms/datastructures/trees/GenericTree.java:97-106 | src/main/java/com/thealgorithms/datastructures/trees/GenericTree.java:138-148 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArrayList.java:93 — src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArrayList.java:93-102 | src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java:145-154 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/main/java/com/thealgorithms/datastructures/stacks/ReverseStack.java:67 — src/main/java/com/thealgorithms/datastructures/stacks/ReverseStack.java:67-76 | src/main/java/com/thealgorithms/stacks/SortStack.java:50-59 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×11
  • 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/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/ciphers/ColumnarTranspositionCipher.java:35 — src/main/java/com/thealgorithms/ciphers/ColumnarTranspositionCipher.java:35-42 | src/main/java/com/thealgorithms/ciphers/ColumnarTranspositionCipher.java:60-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:35` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:369 — src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:369-376 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:520-527 — before extracting anything, compare `src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java` and `src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 69 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 (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/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:150-154 — 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.
  • Duplicated block (5 lines × 2) src/main/java/com/thealgorithms/streaming/TDigest.java:223 — src/main/java/com/thealgorithms/streaming/TDigest.java:223-227 | src/main/java/com/thealgorithms/streaming/TDigest.java:262-266 — 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/TDigest.java:223` 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 · Edited copy of a member (19 corresponding lines) · ×9
  • Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/ciphers/AES.java:2638 — src/main/java/com/thealgorithms/ciphers/AES.java:2638-2656 | src/main/java/com/thealgorithms/ciphers/AES.java:2662-2680 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/matrix/utils/MatrixUtil.java:70 — src/main/java/com/thealgorithms/matrix/utils/MatrixUtil.java:70-88 | src/main/java/com/thealgorithms/matrix/utils/MatrixUtil.java:98-124 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java:148 — src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java:148-167 | src/main/java/com/thealgorithms/datastructures/caches/MRUCache.java:112-130 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/ciphers/Autokey.java:15 — src/main/java/com/thealgorithms/ciphers/Autokey.java:15-33 | src/main/java/com/thealgorithms/ciphers/Autokey.java:36-54 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/stacks/PostfixEvaluator.java:27 — src/main/java/com/thealgorithms/stacks/PostfixEvaluator.java:27-45 | src/main/java/com/thealgorithms/stacks/PrefixEvaluator.java:27-47 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/physics/CoulombsLaw.java:33 — src/main/java/com/thealgorithms/physics/CoulombsLaw.java:33-56 | src/main/java/com/thealgorithms/physics/Gravitation.java:32-50 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/others/Huffman.java:141 — src/main/java/com/thealgorithms/others/Huffman.java:141-159 | src/main/java/com/thealgorithms/others/Huffman.java:168-186 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMapCuckooHashing.java:145 — src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMapCuckooHashing.java:145-165 | src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMapCuckooHashing.java:188-206 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java:41 — src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java:41-59 | src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java:40-64 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · 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/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/ciphers/SimpleSubCipher.java:40 — src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java:40-49 | src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java:75-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:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/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 · Edited copy of a member (16 corresponding lines) · ×8
  • Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/KDTree.java:326 — src/main/java/com/thealgorithms/datastructures/trees/KDTree.java:326-341 | src/main/java/com/thealgorithms/datastructures/trees/KDTree.java:362-377 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/streaming/CusumDetector.java:87 — src/main/java/com/thealgorithms/streaming/CusumDetector.java:87-102 | src/main/java/com/thealgorithms/streaming/EwmaChangeDetector.java:85-100 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:212 — src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:212-228 | src/main/java/com/thealgorithms/datastructures/caches/RRCache.java:201-216 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/graph/AccountMerge.java:110 — src/main/java/com/thealgorithms/graph/AccountMerge.java:110-125 | src/main/java/com/thealgorithms/searches/UnionFind.java:65-82 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java:112 — src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java:112-128 | src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArrayList.java:109-124 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/datastructures/queues/ThreadSafeQueue.java:75 — src/main/java/com/thealgorithms/datastructures/queues/ThreadSafeQueue.java:75-90 | src/main/java/com/thealgorithms/datastructures/queues/ThreadSafeQueue.java:123-138 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/datastructures/disjointsetunion/DisjointSetUnion.java:47 — src/main/java/com/thealgorithms/datastructures/disjointsetunion/DisjointSetUnion.java:47-64 | src/main/java/com/thealgorithms/datastructures/disjointsetunion/DisjointSetUnionBySize.java:63-78 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/main/java/com/thealgorithms/datastructures/queues/Deque.java:77 — src/main/java/com/thealgorithms/datastructures/queues/Deque.java:77-92 | src/main/java/com/thealgorithms/datastructures/queues/Deque.java:100-115 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×8
  • Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/SegmentTree2D.java:83 — src/main/java/com/thealgorithms/datastructures/trees/SegmentTree2D.java:83-96 | src/main/java/com/thealgorithms/datastructures/trees/SegmentTree2D.java:172-186 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/randomized/RandomizedQuickSort.java:37 — src/main/java/com/thealgorithms/randomized/RandomizedQuickSort.java:37-50 | src/main/java/com/thealgorithms/sorts/IntrospectiveSort.java:60-73 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/datastructures/heaps/IndexedPriorityQueue.java:235 — src/main/java/com/thealgorithms/datastructures/heaps/IndexedPriorityQueue.java:235-248 | src/main/java/com/thealgorithms/datastructures/heaps/IndexedPriorityQueue.java:255-274 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/bitmanipulation/GenerateSubsets.java:28 — src/main/java/com/thealgorithms/bitmanipulation/GenerateSubsets.java:28-43 | src/main/java/com/thealgorithms/others/FloydTriangle.java:16-29 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/others/Verhoeff.java:95 — src/main/java/com/thealgorithms/others/Verhoeff.java:95-108 | src/main/java/com/thealgorithms/others/Verhoeff.java:120-137 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/datastructures/lists/CircleLinkedList.java:107 — src/main/java/com/thealgorithms/datastructures/lists/CircleLinkedList.java:107-126 | src/main/java/com/thealgorithms/datastructures/lists/CircularDoublyLinkedList.java:104-117 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/Knapsack.java:52 — src/main/java/com/thealgorithms/dynamicprogramming/Knapsack.java:52-65 | src/main/java/com/thealgorithms/dynamicprogramming/SubsetSum.java:15-32 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/main/java/com/thealgorithms/maths/PalindromePrime.java:21 — src/main/java/com/thealgorithms/maths/PalindromePrime.java:21-38 | src/main/java/com/thealgorithms/maths/Prime/PrimeCheck.java:35-48 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×8
  • Edited copy of a member (7 corresponding lines) src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java:126 — src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java:126-132 | src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java:135-141 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/main/java/com/thealgorithms/ciphers/XORCipher.java:48 — src/main/java/com/thealgorithms/ciphers/XORCipher.java:48-54 | src/main/java/com/thealgorithms/ciphers/OneTimePadCipher.java:82-88 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/main/java/com/thealgorithms/scheduling/GangScheduling.java:54 — src/main/java/com/thealgorithms/scheduling/GangScheduling.java:54-60 | src/main/java/com/thealgorithms/scheduling/MultiAgentScheduling.java:65-71 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/main/java/com/thealgorithms/streaming/Adwin.java:119 — src/main/java/com/thealgorithms/streaming/Adwin.java:119-125 | src/main/java/com/thealgorithms/streaming/HampelFilter.java:146-153 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/main/java/com/thealgorithms/maths/CatalanNumbers.java:37 — src/main/java/com/thealgorithms/maths/CatalanNumbers.java:37-43 | src/main/java/com/thealgorithms/maths/Factorial.java:9-18 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/main/java/com/thealgorithms/machinelearning/KNearestNeighbors.java:115 — src/main/java/com/thealgorithms/machinelearning/KNearestNeighbors.java:115-124 | src/main/java/com/thealgorithms/matrix/QRDecomposition.java:88-94 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/main/java/com/thealgorithms/misc/ShuffleArray.java:49 — src/main/java/com/thealgorithms/misc/ShuffleArray.java:49-55 | src/main/java/com/thealgorithms/sorts/SortUtils.java:19-25 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/main/java/com/thealgorithms/maths/PerfectSquare.java:17 — src/main/java/com/thealgorithms/maths/PerfectSquare.java:17-23 | src/main/java/com/thealgorithms/maths/SumOfSquares.java:50-56 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×7
  • Edited copy of a member (15 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/DiceThrow.java:23 — src/main/java/com/thealgorithms/dynamicprogramming/DiceThrow.java:23-46 | src/main/java/com/thealgorithms/dynamicprogramming/UniquePaths.java:56-70 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/WaveletTree.java:168 — src/main/java/com/thealgorithms/datastructures/trees/WaveletTree.java:168-182 | src/main/java/com/thealgorithms/datastructures/trees/WaveletTree.java:184-198 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/main/java/com/thealgorithms/ciphers/Blowfish.java:1205 — src/main/java/com/thealgorithms/ciphers/Blowfish.java:1205-1219 | src/main/java/com/thealgorithms/ciphers/Blowfish.java:1229-1243 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/main/java/com/thealgorithms/conversions/HexToOct.java:19 — src/main/java/com/thealgorithms/conversions/HexToOct.java:19-34 | src/main/java/com/thealgorithms/conversions/HexaDecimalToDecimal.java:30-44 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/main/java/com/thealgorithms/maths/FindMaxRecursion.java:15 — src/main/java/com/thealgorithms/maths/FindMaxRecursion.java:15-29 | src/main/java/com/thealgorithms/maths/FindMinRecursion.java:17-31 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/main/java/com/thealgorithms/maths/GCD.java:34 — src/main/java/com/thealgorithms/maths/GCD.java:34-49 | src/main/java/com/thealgorithms/maths/GCDRecursion.java:26-40 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/LongestIncreasingSubsequenceNLogN.java:23 — src/main/java/com/thealgorithms/dynamicprogramming/LongestIncreasingSubsequenceNLogN.java:23-41 | src/main/java/com/thealgorithms/searches/HowManyTimesRotated.java:45-59 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×7
  • Edited copy of a member (13 corresponding lines) src/main/java/com/thealgorithms/ciphers/ColumnarTranspositionCipher.java:30 — src/main/java/com/thealgorithms/ciphers/ColumnarTranspositionCipher.java:30-42 | src/main/java/com/thealgorithms/ciphers/ColumnarTranspositionCipher.java:54-67 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/CreateBinaryTreeFromInorderPreorder.java:41 — src/main/java/com/thealgorithms/datastructures/trees/CreateBinaryTreeFromInorderPreorder.java:41-56 | src/main/java/com/thealgorithms/datastructures/trees/CreateBinaryTreeFromInorderPreorder.java:58-70 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/main/java/com/thealgorithms/conversions/MorseCodeConverter.java:64 — src/main/java/com/thealgorithms/conversions/MorseCodeConverter.java:64-76 | src/main/java/com/thealgorithms/conversions/MorseCodeConverter.java:85-97 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:323 — src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:323-335 | src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:336-349 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/main/java/com/thealgorithms/graph/StronglyConnectedComponentOptimized.java:18 — src/main/java/com/thealgorithms/graph/StronglyConnectedComponentOptimized.java:18-30 | src/main/java/com/thealgorithms/graph/StronglyConnectedComponentOptimized.java:32-44 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/LongestIncreasingSubsequenceNLogN.java:49 — src/main/java/com/thealgorithms/dynamicprogramming/LongestIncreasingSubsequenceNLogN.java:49-74 | src/main/java/com/thealgorithms/greedyalgorithms/StockProfitCalculator.java:21-33 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/main/java/com/thealgorithms/maths/KrishnamurthyNumber.java:55 — src/main/java/com/thealgorithms/maths/KrishnamurthyNumber.java:55-70 | src/main/java/com/thealgorithms/maths/PalindromeNumber.java:24-36 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×7
  • Edited copy of a member (8 corresponding lines) src/main/java/com/thealgorithms/sorts/CountingSort.java:52 — src/main/java/com/thealgorithms/sorts/CountingSort.java:52-59 | src/main/java/com/thealgorithms/sorts/RadixSort.java:85-93 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:29 — src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:29-36 | src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:38-45 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java:63 — src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java:63-70 | src/main/java/com/thealgorithms/datastructures/caches/MRUCache.java:49-56 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/main/java/com/thealgorithms/searches/FibonacciSearch.java:81 — src/main/java/com/thealgorithms/searches/FibonacciSearch.java:81-88 | src/main/java/com/thealgorithms/sorts/LinkListSort.java:126-135 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/main/java/com/thealgorithms/others/MemoryManagementAlgorithms.java:185 — src/main/java/com/thealgorithms/others/MemoryManagementAlgorithms.java:185-193 | src/main/java/com/thealgorithms/searches/SentinelLinearSearch.java:92-99 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/main/java/com/thealgorithms/bitmanipulation/CountBitsFlip.java:38 — src/main/java/com/thealgorithms/bitmanipulation/CountBitsFlip.java:38-51 | src/main/java/com/thealgorithms/others/BrianKernighanAlgorithm.java:31-38 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/main/java/com/thealgorithms/bitmanipulation/ParityCheck.java:26 — src/main/java/com/thealgorithms/bitmanipulation/ParityCheck.java:26-33 | src/main/java/com/thealgorithms/maths/EvilNumber.java:16-23 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×7
  • 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:76 — src/main/java/com/thealgorithms/sorts/TreeSort.java:76-84 | src/main/java/com/thealgorithms/sorts/TreeSort.java:104-113 — 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: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 (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/sorts/OddEvenSort.java:31 — src/main/java/com/thealgorithms/sorts/OddEvenSort.java:31-39 | src/main/java/com/thealgorithms/sorts/OddEvenSort.java:42-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) src/main/java/com/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 · Edited copy of a member (18 corresponding lines) · ×6
  • Edited copy of a member (18 corresponding lines) src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java:81 — src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java:81-98 | src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java:108-125 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/main/java/com/thealgorithms/maths/CircularConvolutionFFT.java:44 — src/main/java/com/thealgorithms/maths/CircularConvolutionFFT.java:44-61 | src/main/java/com/thealgorithms/maths/ConvolutionFFT.java:48-68 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java:157 — src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java:157-174 | src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArrayList.java:151-168 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/SegmentTree2D.java:41 — src/main/java/com/thealgorithms/datastructures/trees/SegmentTree2D.java:41-58 | src/main/java/com/thealgorithms/datastructures/trees/SegmentTree2D.java:136-156 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/main/java/com/thealgorithms/datastructures/queues/ThreadSafeQueue.java:50 — src/main/java/com/thealgorithms/datastructures/queues/ThreadSafeQueue.java:50-67 | src/main/java/com/thealgorithms/datastructures/queues/ThreadSafeQueue.java:98-116 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/main/java/com/thealgorithms/maths/NumberPersistence.java:32 — src/main/java/com/thealgorithms/maths/NumberPersistence.java:32-49 | src/main/java/com/thealgorithms/maths/NumberPersistence.java:61-78 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×6
  • Edited copy of a member (12 corresponding lines) src/main/java/com/thealgorithms/maths/AbsoluteMax.java:14 — src/main/java/com/thealgorithms/maths/AbsoluteMax.java:14-25 | src/main/java/com/thealgorithms/maths/AbsoluteMin.java:13-26 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/KDTree.java:36 — src/main/java/com/thealgorithms/datastructures/trees/KDTree.java:36-47 | src/main/java/com/thealgorithms/datastructures/trees/KDTree.java:55-67 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/main/java/com/thealgorithms/sorts/BubbleSort.java:25 — src/main/java/com/thealgorithms/sorts/BubbleSort.java:25-39 | src/main/java/com/thealgorithms/sorts/BubbleSortRecursive.java:23-34 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/main/java/com/thealgorithms/maths/FindMax.java:14 — src/main/java/com/thealgorithms/maths/FindMax.java:14-26 | src/main/java/com/thealgorithms/maths/FindMin.java:14-25 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/main/java/com/thealgorithms/datastructures/lists/SelfOrganizingLinkedList.java:42 — src/main/java/com/thealgorithms/datastructures/lists/SelfOrganizingLinkedList.java:42-54 | src/main/java/com/thealgorithms/datastructures/lists/TortoiseHareAlgo.java:20-31 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/BSTRecursiveGeneric.java:226 — src/main/java/com/thealgorithms/datastructures/trees/BSTRecursiveGeneric.java:226-237 | src/main/java/com/thealgorithms/datastructures/trees/BSTRecursiveGeneric.java:246-257 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×6
  • 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/streaming/ExtendedKalmanFilter.java:379 — src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:379-389 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:530-540 — before extracting anything, compare `src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java` and `src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) 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.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×5
  • 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.
  • Edited copy of a member (30 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/BSTRecursive.java:47 — src/main/java/com/thealgorithms/datastructures/trees/BSTRecursive.java:47-76 | src/main/java/com/thealgorithms/datastructures/trees/BSTRecursiveGeneric.java:135-164 — 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.
  • Edited copy of a member (30 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/NeedlemanWunsch.java:27 — src/main/java/com/thealgorithms/dynamicprogramming/NeedlemanWunsch.java:27-59 | src/main/java/com/thealgorithms/dynamicprogramming/SmithWaterman.java:26-55 — 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.
  • Edited copy of a member (30 corresponding lines) src/main/java/com/thealgorithms/datastructures/queues/SlidingWindowMaximum.java:33 — src/main/java/com/thealgorithms/datastructures/queues/SlidingWindowMaximum.java:33-62 | src/main/java/com/thealgorithms/slidingwindow/MaximumSlidingWindow.java:26-55 — 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.
  • Edited copy of a member (30 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/MaximumSumOfNonAdjacentElements.java:21 — src/main/java/com/thealgorithms/dynamicprogramming/MaximumSumOfNonAdjacentElements.java:21-50 | src/main/java/com/thealgorithms/dynamicprogramming/MaximumSumOfNonAdjacentElements.java:60-94 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×5
  • Edited copy of a member (21 corresponding lines) src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java:67 — src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java:67-87 | src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java:113-137 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/PostOrderTraversal.java:38 — src/main/java/com/thealgorithms/datastructures/trees/PostOrderTraversal.java:38-58 | src/main/java/com/thealgorithms/datastructures/trees/PreOrderTraversal.java:37-57 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) src/main/java/com/thealgorithms/ciphers/PermutationCipher.java:29 — src/main/java/com/thealgorithms/ciphers/PermutationCipher.java:29-51 | src/main/java/com/thealgorithms/ciphers/PermutationCipher.java:61-81 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) src/main/java/com/thealgorithms/datastructures/graphs/ConnectedComponent.java:49 — src/main/java/com/thealgorithms/datastructures/graphs/ConnectedComponent.java:49-69 | src/main/java/com/thealgorithms/datastructures/graphs/Graphs.java:77-99 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) src/main/java/com/thealgorithms/slidingwindow/MaxSumKSizeSubarray.java:28 — src/main/java/com/thealgorithms/slidingwindow/MaxSumKSizeSubarray.java:28-49 | src/main/java/com/thealgorithms/slidingwindow/MinSumKSizeSubarray.java:30-50 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 7+ corresponding lines) src/main/java/com/thealgorithms/machinelearning/KNearestNeighbors.java:189 — src/main/java/com/thealgorithms/machinelearning/KNearestNeighbors.java:189-202 | src/main/java/com/thealgorithms/machinelearning/MultinomialNaiveBayesClassifier.java:136-142 | src/main/java/com/thealgorithms/machinelearning/Perceptron.java:119-130 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) src/main/java/com/thealgorithms/sorts/BucketSort.java:49 — src/main/java/com/thealgorithms/sorts/BucketSort.java:49-55 | src/main/java/com/thealgorithms/sorts/PigeonholeSort.java:55-61 | src/main/java/com/thealgorithms/strings/AhoCorasick.java:152-158 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) src/main/java/com/thealgorithms/maths/ChebyshevIteration.java:138 — src/main/java/com/thealgorithms/maths/ChebyshevIteration.java:138-145 | src/main/java/com/thealgorithms/matrix/QRDecomposition.java:96-102 | src/main/java/com/thealgorithms/scheduling/HighestResponseRatioNextScheduling.java:112-118 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) src/main/java/com/thealgorithms/matrix/QRDecomposition.java:104 — src/main/java/com/thealgorithms/matrix/QRDecomposition.java:104-110 | src/main/java/com/thealgorithms/matrix/utils/MatrixUtil.java:126-132 | src/main/java/com/thealgorithms/streaming/KalmanFilter.java:159-165 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) src/main/java/com/thealgorithms/ciphers/ColumnarTranspositionCipher.java:161 — src/main/java/com/thealgorithms/ciphers/ColumnarTranspositionCipher.java:161-167 | src/main/java/com/thealgorithms/maths/ChebyshevIteration.java:150-157 | src/main/java/com/thealgorithms/matrix/QRDecomposition.java:73-80 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×4
  • Edited copy of a member (24 corresponding lines) src/main/java/com/thealgorithms/greedyalgorithms/BandwidthAllocation.java:34 — src/main/java/com/thealgorithms/greedyalgorithms/BandwidthAllocation.java:34-57 | src/main/java/com/thealgorithms/greedyalgorithms/FractionalKnapsack.java:29-53 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:137 — src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:137-160 | src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:162-186 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) src/main/java/com/thealgorithms/misc/RangeInSortedArray.java:39 — src/main/java/com/thealgorithms/misc/RangeInSortedArray.java:39-63 | src/main/java/com/thealgorithms/misc/RangeInSortedArray.java:75-98 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/AVLTree.java:190 — src/main/java/com/thealgorithms/datastructures/trees/AVLTree.java:190-213 | src/main/java/com/thealgorithms/datastructures/trees/AVLTree.java:215-238 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×4
  • Edited copy of a member (20 corresponding lines) src/main/java/com/thealgorithms/ciphers/Caesar.java:22 — src/main/java/com/thealgorithms/ciphers/Caesar.java:22-42 | src/main/java/com/thealgorithms/ciphers/Caesar.java:50-69 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/main/java/com/thealgorithms/sorts/LinkListSort.java:149 — src/main/java/com/thealgorithms/sorts/LinkListSort.java:149-169 | src/main/java/com/thealgorithms/sorts/LinkListSort.java:262-281 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/main/java/com/thealgorithms/maths/JacobsthalNumber.java:24 — src/main/java/com/thealgorithms/maths/JacobsthalNumber.java:24-43 | src/main/java/com/thealgorithms/maths/PerrinNumber.java:28-52 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java:59 — src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java:59-80 | src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArrayList.java:49-68 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×4
  • 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.
  • Duplicated block (14 lines × 2) src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:327 — src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:327-340 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:466-479 — before extracting anything, compare `src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java` and `src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 69 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 (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.
D10 · Test Quality · No assertions · ×3
  • No assertions: testDisplay src/test/java/com/thealgorithms/datastructures/hashmap/hashing/HashMapTest.java:36 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, 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: testCircularLookSchedulingPrintStatus src/test/java/com/thealgorithms/scheduling/diskscheduling/CircularLookSchedulingTest.java:43 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, 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: dynamicTestsForSorting src/test/java/com/thealgorithms/sorts/FlashSortTest.java:50 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×3
  • Edited copy of a member (22 corresponding lines) src/main/java/com/thealgorithms/ciphers/Vigenere.java:46 — src/main/java/com/thealgorithms/ciphers/Vigenere.java:46-67 | src/main/java/com/thealgorithms/ciphers/Vigenere.java:84-105 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java:200 — src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java:200-221 | src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java:223-244 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/SubsetCount.java:21 — src/main/java/com/thealgorithms/dynamicprogramming/SubsetCount.java:21-46 | src/main/java/com/thealgorithms/dynamicprogramming/SubsetCount.java:55-76 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×3
  • Edited copy of a member (6 corresponding lines) src/main/java/com/thealgorithms/maths/Means.java:76 — src/main/java/com/thealgorithms/maths/Means.java:76-81 | src/main/java/com/thealgorithms/maths/Means.java:125-130 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java:45 — src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java:45-50 | src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMap.java:22-29 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/main/java/com/thealgorithms/datastructures/lists/SkipList.java:304 — src/main/java/com/thealgorithms/datastructures/lists/SkipList.java:304-309 | src/main/java/com/thealgorithms/sorts/FlashSort.java:30-35 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (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 (13 lines × 2) · ×3
  • 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.
  • Duplicated block (13 lines × 2) src/main/java/com/thealgorithms/searches/IterativeBinarySearch.java:36 — src/main/java/com/thealgorithms/searches/IterativeBinarySearch.java:36-48 | src/main/java/com/thealgorithms/searches/RotatedBinarySearch.java:30-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from 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:36` 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.
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.
D3 · God Classes · TooManyMethods · ×2
  • 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.
  • TooManyMethods: UnscentedKalmanFilter src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:62 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
  • 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:315 — src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:315-324 | src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:326-340 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:454-463 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:465-479 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×2
  • Edited copy of a member (26 corresponding lines) src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java:22 — src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java:22-49 | src/main/java/com/thealgorithms/ciphers/SimpleSubCipher.java:59-84 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/CatalanNumber.java:26 — src/main/java/com/thealgorithms/dynamicprogramming/CatalanNumber.java:26-53 | src/main/java/com/thealgorithms/dynamicprogramming/RodCutting.java:21-46 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 17+ corresponding lines) src/main/java/com/thealgorithms/stacks/NextGreaterElement.java:29 — src/main/java/com/thealgorithms/stacks/NextGreaterElement.java:29-45 | src/main/java/com/thealgorithms/stacks/NextSmallerElement.java:30-58 | src/main/java/com/thealgorithms/stacks/StockSpanProblem.java:34-66 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) src/main/java/com/thealgorithms/searches/BinarySearch.java:99 — src/main/java/com/thealgorithms/searches/BinarySearch.java:99-133 | src/main/java/com/thealgorithms/searches/LowerBound.java:48-64 | src/main/java/com/thealgorithms/searches/UpperBound.java:48-64 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×2
  • Edited copy of a member (17 corresponding lines) src/main/java/com/thealgorithms/conversions/OctalToDecimal.java:22 — src/main/java/com/thealgorithms/conversions/OctalToDecimal.java:22-41 | src/main/java/com/thealgorithms/conversions/OctalToHexadecimal.java:23-39 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) src/main/java/com/thealgorithms/slidingwindow/LongestSubstringWithoutRepeatingCharacters.java:29 — src/main/java/com/thealgorithms/slidingwindow/LongestSubstringWithoutRepeatingCharacters.java:29-45 | src/main/java/com/thealgorithms/strings/LongestNonRepetitiveSubstring.java:25-47 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 14+ corresponding lines) src/main/java/com/thealgorithms/maths/AliquotSum.java:36 — src/main/java/com/thealgorithms/maths/AliquotSum.java:36-62 | src/main/java/com/thealgorithms/maths/FriendlyNumber.java:19-32 | src/main/java/com/thealgorithms/maths/PerfectNumber.java:41-70 | src/main/java/com/thealgorithms/maths/SociableNumber.java:27-43 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 14+ corresponding lines) src/main/java/com/thealgorithms/others/MemoryManagementAlgorithms.java:97 — src/main/java/com/thealgorithms/others/MemoryManagementAlgorithms.java:97-110 | src/main/java/com/thealgorithms/others/MemoryManagementAlgorithms.java:155-168 | src/main/java/com/thealgorithms/others/MemoryManagementAlgorithms.java:207-220 | src/main/java/com/thealgorithms/others/MemoryManagementAlgorithms.java:268-281 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×2
  • Edited copy of a member (3 corresponding lines) src/main/java/com/thealgorithms/geometry/BentleyOttmann.java:412 — src/main/java/com/thealgorithms/geometry/BentleyOttmann.java:412-414 | src/main/java/com/thealgorithms/geometry/Point.java:22-24 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) src/main/java/com/thealgorithms/stacks/PostfixToInfix.java:29 — src/main/java/com/thealgorithms/stacks/PostfixToInfix.java:29-31 | src/main/java/com/thealgorithms/stacks/PrefixToInfix.java:22-24 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 9+ corresponding lines) src/main/java/com/thealgorithms/conversions/HexToOct.java:42 — src/main/java/com/thealgorithms/conversions/HexToOct.java:42-54 | src/main/java/com/thealgorithms/conversions/OctalToBinary.java:68-81 | src/main/java/com/thealgorithms/maths/HappyNumber.java:48-56 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) src/main/java/com/thealgorithms/maths/Area.java:98 — src/main/java/com/thealgorithms/maths/Area.java:98-106 | src/main/java/com/thealgorithms/physics/DampedOscillator.java:48-57 | src/main/java/com/thealgorithms/physics/SimplePendulumRK4.java:24-33 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: SinglyLinkedList (LCOM4 6) src/main/java/com/thealgorithms/datastructures/lists/SinglyLinkedList.java:10 — SinglyLinkedList's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: BinaryTree (LCOM4 5) src/main/java/com/thealgorithms/datastructures/trees/BinaryTree.java:17 — BinaryTree's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×2
  • Swallowed exception (caught, then discarded) src/main/java/com/thealgorithms/maths/MathBuilder.java:44 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/main/java/com/thealgorithms/datastructures/lists/CursorLinkedList.java:88 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
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 · 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 · BinaryTree.remove (cognitive 40) · ×1
  • BinaryTree.remove (cognitive 40) src/main/java/com/thealgorithms/datastructures/trees/BinaryTree.java:133 — BinaryTree.remove has cognitive complexity 40 (threshold 15). Drivers by points: if/else 22 (38 pts), boolean chains 2 (nesting depth added 16). 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.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 · 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 · LongDivision.divide (cognitive 27) · ×1
  • LongDivision.divide (cognitive 27) src/main/java/com/thealgorithms/maths/LongDivision.java:14 — LongDivision.divide has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 3 (7 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 7). 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 · 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 · 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 · SplayTree.splay (cognitive 24) · ×1
  • SplayTree.splay (cognitive 24) src/main/java/com/thealgorithms/datastructures/trees/SplayTree.java:194 — SplayTree.splay has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 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 · 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 · 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 · 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 · CohenSutherland.cohenSutherlandClip (cognitive 21) · ×1
  • CohenSutherland.cohenSutherlandClip (cognitive 21) src/main/java/com/thealgorithms/lineclipping/CohenSutherland.java:68 — CohenSutherland.cohenSutherlandClip has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 1 (3 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 · RabinKarpAlgorithm.search (cognitive 21) · ×1
  • RabinKarpAlgorithm.search (cognitive 21) src/main/java/com/thealgorithms/searches/RabinKarpAlgorithm.java:11 — RabinKarpAlgorithm.search has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 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 · 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 · BSTIterative.remove (cognitive 20) · ×1
  • BSTIterative.remove (cognitive 20) src/main/java/com/thealgorithms/datastructures/trees/BSTIterative.java:91 — BSTIterative.remove has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 5). 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 · 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 · 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 · 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 · RedBlackBST.insert (cognitive 18) · ×1
  • RedBlackBST.insert (cognitive 18) src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:65 — RedBlackBST.insert has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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 · LiangBarsky.clipLine (cognitive 18) · ×1
  • LiangBarsky.clipLine (cognitive 18) src/main/java/com/thealgorithms/lineclipping/LiangBarsky.java:56 — LiangBarsky.clipLine has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, 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 · 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 · 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 · RotatedBinarySearch.find (cognitive 18) · ×1
  • RotatedBinarySearch.find (cognitive 18) src/main/java/com/thealgorithms/searches/RotatedBinarySearch.java:29 — RotatedBinarySearch.find has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, 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 · 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 · InfixToPrefix.infix2Prefix (cognitive 18) · ×1
  • InfixToPrefix.infix2Prefix (cognitive 18) src/main/java/com/thealgorithms/stacks/InfixToPrefix.java:37 — InfixToPrefix.infix2Prefix has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), loops 4 (8 pts), boolean chains 2 (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 · 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 · 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 · InfixToPostfix.infix2PostFix (cognitive 16) · ×1
  • InfixToPostfix.infix2PostFix (cognitive 16) src/main/java/com/thealgorithms/stacks/InfixToPostfix.java:36 — InfixToPostfix.infix2PostFix has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 5 (6 pts), boolean chains 2 (nesting depth added 5). 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 · 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.
D31 · IaC & Container Security · Medium IaC · ×1
  • REDACTED
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 · Edited copy of a member (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) src/main/java/com/thealgorithms/searches/RabinKarpAlgorithm.java:11 — src/main/java/com/thealgorithms/searches/RabinKarpAlgorithm.java:11-71 | src/main/java/com/thealgorithms/strings/RabinKarp.java:22-73 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) src/main/java/com/thealgorithms/stacks/InfixToPostfix.java:36 — src/main/java/com/thealgorithms/stacks/InfixToPostfix.java:36-72 | src/main/java/com/thealgorithms/stacks/InfixToPrefix.java:37-86 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) src/main/java/com/thealgorithms/others/MosAlgorithm.java:50 — src/main/java/com/thealgorithms/others/MosAlgorithm.java:50-105 | src/main/java/com/thealgorithms/others/MosAlgorithm.java:116-177 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 30+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 30+ corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java:30 — src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java:30-62 | src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java:77-106 | src/main/java/com/thealgorithms/dynamicprogramming/RegexMatching.java:122-155 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/LevelOrderTraversal.java:12 — src/main/java/com/thealgorithms/datastructures/trees/LevelOrderTraversal.java:12-39 | src/main/java/com/thealgorithms/datastructures/trees/ZigzagTraversal.java:40-76 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) src/main/java/com/thealgorithms/streaming/TDigest.java:203 — src/main/java/com/thealgorithms/streaming/TDigest.java:203-235 | src/main/java/com/thealgorithms/streaming/TDigest.java:246-274 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:164 — src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:164-198 | src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:170-203 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) src/main/java/com/thealgorithms/ciphers/HillCipher.java:80 — src/main/java/com/thealgorithms/ciphers/HillCipher.java:80-102 | src/main/java/com/thealgorithms/maths/DeterminantOfMatrix.java:18-46 — 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 (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) src/main/java/com/thealgorithms/scheduling/diskscheduling/CircularLookScheduling.java:29 — src/main/java/com/thealgorithms/scheduling/diskscheduling/CircularLookScheduling.java:29-71 | src/main/java/com/thealgorithms/scheduling/diskscheduling/ScanScheduling.java:32-73 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) src/main/java/com/thealgorithms/sorts/AdaptiveMergeSort.java:24 — src/main/java/com/thealgorithms/sorts/AdaptiveMergeSort.java:24-39 | src/main/java/com/thealgorithms/sorts/MergeSort.java:58-74 | src/main/java/com/thealgorithms/sorts/TimSort.java:34-50 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 24+ corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:113 — src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:113-136 | src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:118-142 | src/main/java/com/thealgorithms/datastructures/caches/RRCache.java:112-135 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 14+ corresponding lines) src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:348 — src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:348-363 | src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:384-397 | src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:362-377 | src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java:398-411 | src/main/java/com/thealgorithms/datastructures/caches/RRCache.java:324-337 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 9+ corresponding lines) src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:368 — src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:368-376 | src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:403-411 | src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java:413-421 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:499-507 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:519-527 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:542-550 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:552-560 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 11+ corresponding lines) src/main/java/com/thealgorithms/sorts/FlashSort.java:195 — src/main/java/com/thealgorithms/sorts/FlashSort.java:195-206 | src/main/java/com/thealgorithms/sorts/InsertionSort.java:44-60 | src/main/java/com/thealgorithms/sorts/IntrospectiveSort.java:83-93 | src/main/java/com/thealgorithms/sorts/SpreadSort.java:213-223 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 13+ corresponding lines) src/main/java/com/thealgorithms/datastructures/lists/TortoiseHareAlgo.java:50 — src/main/java/com/thealgorithms/datastructures/lists/TortoiseHareAlgo.java:50-62 | src/main/java/com/thealgorithms/datastructures/queues/Deque.java:162-174 | src/main/java/com/thealgorithms/datastructures/queues/LinkedQueue.java:184-200 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 10+ corresponding lines) src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java:96 — src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java:96-108 | src/main/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplication.java:111-123 | src/main/java/com/thealgorithms/dynamicprogramming/MatrixChainRecursiveTopDownMemoisation.java:29-38 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 17+ corresponding lines) src/main/java/com/thealgorithms/dynamicprogramming/Fibonacci.java:93 — src/main/java/com/thealgorithms/dynamicprogramming/Fibonacci.java:93-109 | src/main/java/com/thealgorithms/dynamicprogramming/Tribonacci.java:17-37 | src/main/java/com/thealgorithms/maths/LeonardoNumber.java:60-78 | src/main/java/com/thealgorithms/maths/LucasSeries.java:49-68 | src/main/java/com/thealgorithms/maths/PadovanSequence.java:24-42 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 13+ corresponding lines) src/main/java/com/thealgorithms/datastructures/trees/Trie.java:89 — src/main/java/com/thealgorithms/datastructures/trees/Trie.java:89-101 | src/main/java/com/thealgorithms/datastructures/trees/Trie.java:114-131 | src/main/java/com/thealgorithms/datastructures/trees/Trie.java:167-180 | src/main/java/com/thealgorithms/datastructures/trees/Trie.java:188-201 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 12+ corresponding lines) src/main/java/com/thealgorithms/datastructures/lists/MiddleOfLinkedList.java:31 — src/main/java/com/thealgorithms/datastructures/lists/MiddleOfLinkedList.java:31-45 | src/main/java/com/thealgorithms/datastructures/lists/SinglyLinkedList.java:64-75 | src/main/java/com/thealgorithms/datastructures/lists/TortoiseHareAlgo.java:33-47 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 11+ corresponding lines) src/main/java/com/thealgorithms/bitmanipulation/BcdConversion.java:37 — src/main/java/com/thealgorithms/bitmanipulation/BcdConversion.java:37-52 | src/main/java/com/thealgorithms/bitmanipulation/Xs3Conversion.java:29-39 | src/main/java/com/thealgorithms/conversions/DecimalToBinary.java:37-48 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 9+ corresponding lines) src/main/java/com/thealgorithms/sorts/CycleSort.java:48 — src/main/java/com/thealgorithms/sorts/CycleSort.java:48-56 | src/main/java/com/thealgorithms/sorts/InsertionSort.java:100-108 | src/main/java/com/thealgorithms/sorts/SelectionSort.java:40-48 | src/main/java/com/thealgorithms/sorts/SwapSort.java:34-43 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 6+ corresponding lines) src/main/java/com/thealgorithms/streaming/Adwin.java:87 — src/main/java/com/thealgorithms/streaming/Adwin.java:87-93 | src/main/java/com/thealgorithms/streaming/ComplementaryFilter.java:81-86 | src/main/java/com/thealgorithms/streaming/GeneralizedEsd.java:78-83 | src/main/java/com/thealgorithms/streaming/P2QuantileEstimator.java:71-76 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×1
  • Edited copy of a member (4 corresponding lines) src/main/java/com/thealgorithms/others/Damm.java:96 — src/main/java/com/thealgorithms/others/Damm.java:96-99 | src/main/java/com/thealgorithms/others/Verhoeff.java:151-154 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · 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 (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 (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) src/main/java/com/thealgorithms/machinelearning/KNearestNeighbors.java:191 — src/main/java/com/thealgorithms/machinelearning/KNearestNeighbors.java:191-202 | src/main/java/com/thealgorithms/machinelearning/Perceptron.java:121-130 — 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/machinelearning/Perceptron.java:121` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/java/com/thealgorithms/machinelearning/Perceptron.java:120` calls `ensureFitted` and `src/main/java/com/thealgorithms/machinelearning/KNearestNeighbors.java:189` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 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 (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java:15 — src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java:15-37 | src/main/java/com/thealgorithms/ciphers/PlayfairCipher.java:40-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:15` 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 (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 (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) 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 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:455-463 | src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java:470-478 — before extracting anything, compare `src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java` and `src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 69 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/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.
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.
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.
X29 · Per-element action decided by a fixed element · Per-element action decided by a fixed element · ×1
  • Per-element action decided by a fixed element src/main/java/com/thealgorithms/graph/HungarianAlgorithm.java:123 — This loop runs once per element of `cost`, and the statement it guards acts on the element it is on — `cost[i]`. The test deciding whether that statement runs does not: `j >= 0 && j < cols` reads `cost[0]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts — the fixed one at line 46, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out.
Minor — 341 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×314
  • Orphaned file src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/datastructures/caches/RRCache.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/geometry/BentleyOttmann.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/datastructures/heaps/FibonacciHeap.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/conversions/WordsToNumber.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/datastructures/lists/SinglyLinkedList.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/others/MemoryManagementAlgorithms.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/datastructures/lists/DoublyLinkedList.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/ciphers/DES.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/datastructures/graphs/MatrixGraphs.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/datastructures/trees/BSTRecursiveGeneric.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/datastructures/heaps/IndexedPriorityQueue.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/others/PageRank.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/datastructures/graphs/EdmondsBlossomAlgorithm.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/graph/YensKShortestPaths.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/datastructures/trees/RedBlackBST.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/datastructures/trees/BinaryTree.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/datastructures/trees/SplayTree.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/maths/LinearDiophantineEquationsSolver.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/compression/HuffmanCoding.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/graph/HierholzerEulerianPath.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/datastructures/trees/Treap.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/main/java/com/thealgorithms/others/KochSnowflake.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 289 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×12
  • Duplicated predicate src/main/java/com/thealgorithms/streaming/CusumDetector.java:89 — `!(standardDeviation > 0.0) || !Double.isFinite(standardDeviation)` appears character-identically in 2 files — src/main/java/com/thealgorithms/streaming/CusumDetector.java, src/main/java/com/thealgorithms/streaming/EwmaChangeDetector.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/thealgorithms/streaming/ComplementaryFilter.java:235 — `!(value > 0.0) || !Double.isFinite(value)` appears character-identically in 2 files — src/main/java/com/thealgorithms/streaming/ComplementaryFilter.java, src/main/java/com/thealgorithms/streaming/KalmanFilter.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/thealgorithms/searches/ExponentialSearch.java:34 — `array == null || array.length == 0 || key == null` appears character-identically in 7 files — src/main/java/com/thealgorithms/searches/ExponentialSearch.java, src/main/java/com/thealgorithms/searches/IterativeBinarySearch.java, src/main/java/com/thealgorithms/searches/IterativeTernarySearch.java, src/main/java/com/thealgorithms/searches/JumpSearch.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/thealgorithms/graph/Dinic.java:38 — `capacity == null || capacity.length == 0` appears character-identically in 3 files — src/main/java/com/thealgorithms/graph/Dinic.java, src/main/java/com/thealgorithms/graph/EdmondsKarp.java, src/main/java/com/thealgorithms/graph/PushRelabel.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/thealgorithms/graph/Dinic.java:43 — `capacity[i] == null || capacity[i].length != n` appears character-identically in 2 files — src/main/java/com/thealgorithms/graph/Dinic.java, src/main/java/com/thealgorithms/graph/PushRelabel.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/thealgorithms/machinelearning/KNearestNeighbors.java:68 — `features.length == 0 || labels.length == 0` appears character-identically in 2 files — src/main/java/com/thealgorithms/machinelearning/KNearestNeighbors.java, src/main/java/com/thealgorithms/machinelearning/Perceptron.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/thealgorithms/matrix/StochasticMatrix.java:70 — `matrix == null || matrix.length == 0 || matrix[0].length == 0` appears character-identically in 3 files — src/main/java/com/thealgorithms/matrix/StochasticMatrix.java, src/main/java/com/thealgorithms/misc/Sparsity.java, src/main/java/com/thealgorithms/prefixsum/PrefixSum2D.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java:176 — `oldEntry != null && !oldEntry.isExpired()` appears character-identically in 2 files — src/main/java/com/thealgorithms/datastructures/caches/FIFOCache.java, src/main/java/com/thealgorithms/datastructures/caches/LIFOCache.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/thealgorithms/graph/Dinic.java:52 — `source < 0 || sink < 0 || source >= n || sink >= n` appears character-identically in 2 files — src/main/java/com/thealgorithms/graph/Dinic.java, src/main/java/com/thealgorithms/graph/PushRelabel.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/thealgorithms/stacks/PostfixToInfix.java:30 — `token == '+' || token == '-' || token == '/' || token == '*' || token == '^'` appears character-identically in 2 files — src/main/java/com/thealgorithms/stacks/PostfixToInfix.java, src/main/java/com/thealgorithms/stacks/PrefixToInfix.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/thealgorithms/compression/ArithmeticCoding.java:55 — `uncompressed == null || uncompressed.isEmpty()` appears character-identically in 2 files — src/main/java/com/thealgorithms/compression/ArithmeticCoding.java, src/main/java/com/thealgorithms/compression/LZW.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/java/com/thealgorithms/ciphers/HorsSignature.java:190 — `value == null || value.length != HASH_BYTES` appears character-identically in 2 files — src/main/java/com/thealgorithms/ciphers/HorsSignature.java, src/main/java/com/thealgorithms/ciphers/WinternitzSignature.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D16 · Bus Factor · Off-boarding risk · ×5
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 16 significant file(s) lose their only recent owner: src/main/java/com/thealgorithms/streaming/UnscentedKalmanFilter.java, src/main/java/com/thealgorithms/streaming/TDigest.java, src/main/java/com/thealgorithms/streaming/ExtendedKalmanFilter.java, src/main/java/com/thealgorithms/datastructures/buffers/SlidingWindowAggregator.java, src/main/java/com/thealgorithms/streaming/GeneralizedEsd.java, src/main/java/com/thealgorithms/streaming/Adwin.java, src/main/java/com/thealgorithms/streaming/P2QuantileEstimator.java, src/main/java/com/thealgorithms/streaming/KalmanFilter.java (+8 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 5 significant file(s) lose their only recent owner: src/main/java/com/thealgorithms/ciphers/AES.java, src/main/java/com/thealgorithms/others/MemoryManagementAlgorithms.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. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 4 significant file(s) lose their only recent owner: src/main/java/com/thealgorithms/ciphers/MerkleSignatureScheme.java, src/main/java/com/thealgorithms/ciphers/WinternitzSignature.java, src/main/java/com/thealgorithms/ciphers/HorsSignature.java, src/main/java/com/thealgorithms/ciphers/LWEEncryption.java. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 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 #5 — If anonymized user #5 becomes unavailable, 4 significant file(s) lose their only recent owner: src/main/java/com/thealgorithms/sorts/FlashSort.java, src/main/java/com/thealgorithms/strings/HorspoolSearch.java, src/main/java/com/thealgorithms/sorts/TreeSort.java, src/main/java/com/thealgorithms/searches/RabinKarpAlgorithm.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/AES.java:1 — 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/ciphers/Blowfish.java:1 — 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:1 — 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) — 26 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 (64 single-owned of 417 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 417 of the 825 production source files in this repository met that bar). They are anonymized user #6 (2 file(s)), anonymized user #7 (2 file(s)), anonymized user #8 (2 file(s)), anonymized user #9 (2 file(s)), anonymized user #10 (2 file(s)), anonymized user #11 (1 file(s)) (+20 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/main/java/com/thealgorithms/dynamicprogramming/OptimalBinarySearchTree.java, src/main/java/com/thealgorithms/stacks/StockSpanProblem.java, src/main/java/com/thealgorithms/datastructures/queues/ThreadSafeQueue.java, src/main/java/com/thealgorithms/matrix/QRDecomposition.java, src/main/java/com/thealgorithms/searches/BinarySearch2dArray.java, src/main/java/com/thealgorithms/searches/TernarySearch.java, src/main/java/com/thealgorithms/graph/TarjanBridges.java, src/main/java/com/thealgorithms/strings/KasaiAlgorithm.java (+23 more).
D31 · IaC & Container Security · Low IaC · ×1
  • REDACTED
D34 · Knowledge Freshness · Concentrated knowledge decay · ×1
  • Concentrated knowledge decay — 317 of 417 significant files have no living knowledge, while the repository is still being changed at a low rate (95 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 317 separate risks. Counted over 417 of the 825 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 README.md:1 — The root README is 92 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, in the README and in the repository documents it links, it found no a build/run or getting-started section, no a testing 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.)
X5 · Nullable reference types · Java packages are not null-marked everywhere · ×1
  • Java packages are not null-marked everywhere — 0/55 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×1
  • Silent fallback default on parse failure src/main/java/com/thealgorithms/maths/LongDivision.java:73 — `divide` returns `-2147483648` when `NumberFormatException` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
Minor — 5 finding(s)
D12 · Dependency Hygiene · Outdated (test) · ×4
  • Outdated (test): net.bytebuddy:byte-buddy — net.bytebuddy:byte-buddy 1.18.3 → 1.18.17 available.
  • Outdated (test): org.objenesis:objenesis — org.objenesis:objenesis 3.3 → 3.6 available.
  • Outdated (test): org.jspecify:jspecify — org.jspecify:jspecify 1.0.0 → 1.0.1 available.
  • Outdated (test): net.bytebuddy:byte-buddy-agent — net.bytebuddy:byte-buddy-agent 1.17.7 → 1.18.17 available.
D12 · Dependency Hygiene · Outdated (compile) · ×1
  • Outdated (compile): org.apache.commons:commons-lang3 — org.apache.commons:commons-lang3 3.21.0 → 3.22.0 available.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a760bfbf782b46c18a449b8e519c6531/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a760bfbf782b46c18a449b8e519c6531/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .25artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json
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 --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .2artifacts/raw/semgrep-gdpr.json
D36 · Supply-chain Provenance & Signingprovenance—provenance: not applicable — The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files).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 --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a1d502-a0ca-7c10-8883-0a2767cea1b1 · 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