All Algorithms implemented in Java
This report presents the forensic synthetic code analysis of TheAlgorithms/Java, a Java project with 66,008 GitHub stars. SynthScan v2.0 examined 141,226 lines of code across 1606 source files, recording 70 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 4.3 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 70 distinct pattern matches across 5 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | …a/com/thealgorithms/conversions/TimeConverterTest.java | 58 | return Stream.of(org.junit.jupiter.params.provider.Arguments.of(1.0, "hours", "minutes"), org.junit.jupiter.para | CODE |
| CRITICAL⚡ | …orithms/datastructures/buffers/CircularBufferTest.java | 70 | org.junit.jupiter.api.Assertions.assertThrows(IllegalArgumentException.class, () -> new CircularBuffer<>(0)); | CODE |
| CRITICAL⚡ | …orithms/datastructures/buffers/CircularBufferTest.java | 71 | org.junit.jupiter.api.Assertions.assertThrows(IllegalArgumentException.class, () -> new CircularBuffer<>(-1)); | CODE |
| CRITICAL⚡ | …orithms/datastructures/buffers/CircularBufferTest.java | 74 | org.junit.jupiter.api.Assertions.assertThrows(IllegalArgumentException.class, () -> buffer.put(null)); | CODE |
| CRITICAL⚡ | …orithms/datastructures/buffers/CircularBufferTest.java | 127 | org.junit.jupiter.api.Assertions.assertFalse(buffer.isFull()); | CODE |
| CRITICAL⚡ | …orithms/datastructures/buffers/CircularBufferTest.java | 130 | org.junit.jupiter.api.Assertions.assertFalse(buffer.isEmpty()); | CODE |
| CRITICAL⚡ | …orithms/datastructures/buffers/CircularBufferTest.java | 131 | org.junit.jupiter.api.Assertions.assertFalse(buffer.isFull()); | CODE |
| CRITICAL⚡ | …orithms/datastructures/buffers/CircularBufferTest.java | 137 | org.junit.jupiter.api.Assertions.assertFalse(buffer.isFull()); | CODE |
| CRITICAL | …orithms/datastructures/buffers/CircularBufferTest.java | 160 | org.junit.jupiter.api.Assertions.assertThrows(IllegalArgumentException.class, () -> buffer.put(null), "Itera | CODE |
| CRITICAL | …orithms/datastructures/buffers/CircularBufferTest.java | 190 | org.junit.jupiter.api.Assertions.assertFalse(buffer.put("two")); // not empty | CODE |
| CRITICAL | …orithms/datastructures/buffers/CircularBufferTest.java | 191 | org.junit.jupiter.api.Assertions.assertFalse(buffer.put("three")); // overwrite | CODE |
| CRITICAL | …thealgorithms/datastructures/stacks/NodeStackTest.java | 72 | org.junit.jupiter.api.Assertions.assertFalse(stack.isEmpty(), "Stack should not be empty after a push operation. | CODE |
| CRITICAL | …thealgorithms/datastructures/stacks/NodeStackTest.java | 99 | org.junit.jupiter.api.Assertions.assertNull(stringStack.pop(), "Should pop null value"); | CODE |
| CRITICAL | …thealgorithms/datastructures/stacks/NodeStackTest.java | 101 | org.junit.jupiter.api.Assertions.assertNull(stringStack.pop(), "Should pop null value"); | CODE |
| CRITICAL | …thealgorithms/datastructures/stacks/NodeStackTest.java | 134 | org.junit.jupiter.api.Assertions.assertFalse(intStack.isEmpty(), "Peek should not make stack empty"); | CODE |
| CRITICAL | …thealgorithms/datastructures/stacks/NodeStackTest.java | 216 | org.junit.jupiter.api.Assertions.assertFalse(intStack.isEmpty()); | CODE |
| CRITICAL | …thealgorithms/datastructures/stacks/NodeStackTest.java | 226 | org.junit.jupiter.api.Assertions.assertFalse(intStack.isEmpty(), "Stack with one element should not be empty"); | CODE |
| CRITICAL | …ithms/datastructures/stacks/StackOfLinkedListTest.java | 44 | org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, () -> stack.pop(), "Popping from an | CODE |
| CRITICAL | …ithms/datastructures/stacks/StackOfLinkedListTest.java | 49 | org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, () -> stack.peek(), "Peeking into an | CODE |
| CRITICAL | …m/thealgorithms/datastructures/lists/SkipListTest.java | 83 | org.junit.jupiter.api.Assertions.assertArrayEquals(new String[] {"a", "b", "c", "d"}, actualOrder); | CODE |
| CRITICAL | …com/thealgorithms/datastructures/queues/DequeTest.java | 53 | org.junit.jupiter.api.Assertions.assertTrue(deque.isEmpty()); | CODE |
| CRITICAL | …com/thealgorithms/datastructures/queues/DequeTest.java | 73 | org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, deque::pollFirst); | CODE |
| CRITICAL | …com/thealgorithms/datastructures/queues/DequeTest.java | 79 | org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, deque::pollLast); | CODE |
| CRITICAL | …com/thealgorithms/datastructures/queues/DequeTest.java | 100 | org.junit.jupiter.api.Assertions.assertTrue(deque.isEmpty()); | CODE |
| CRITICAL | …com/thealgorithms/datastructures/queues/DequeTest.java | 122 | org.junit.jupiter.api.Assertions.assertTrue(deque.isEmpty()); | CODE |
| CRITICAL | …com/thealgorithms/datastructures/queues/DequeTest.java | 159 | org.junit.jupiter.api.Assertions.assertTrue(deque.isEmpty(), "Deque should be empty after polling single element | CODE |
| CRITICAL | …com/thealgorithms/datastructures/queues/DequeTest.java | 168 | org.junit.jupiter.api.Assertions.assertTrue(deque.isEmpty(), "Deque should be empty after polling single element | CODE |
| CRITICAL | …com/thealgorithms/datastructures/queues/DequeTest.java | 195 | org.junit.jupiter.api.Assertions.assertTrue(deque.isEmpty(), "Deque should be empty after symmetric operations") | CODE |
| CRITICAL⚡ | …lgorithms/datastructures/queues/CircularQueueTest.java | 71 | org.junit.jupiter.api.Assertions.assertThrows(IllegalStateException.class, cq::peek); | CODE |
| CRITICAL⚡ | …lgorithms/datastructures/queues/CircularQueueTest.java | 80 | org.junit.jupiter.api.Assertions.assertThrows(IllegalStateException.class, () -> cq.enQueue(3)); | CODE |
| CRITICAL⚡ | …lgorithms/datastructures/queues/CircularQueueTest.java | 86 | org.junit.jupiter.api.Assertions.assertThrows(IllegalStateException.class, cq::deQueue); | CODE |
| CRITICAL⚡ | …lgorithms/datastructures/queues/CircularQueueTest.java | 92 | org.junit.jupiter.api.Assertions.assertThrows(IllegalStateException.class, cq::peek); | CODE |
| CRITICAL⚡ | …ealgorithms/datastructures/queues/LinkedQueueTest.java | 58 | org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, () -> queue.dequeue(), "Dequeueing f | CODE |
| CRITICAL⚡ | …ealgorithms/datastructures/queues/LinkedQueueTest.java | 63 | org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, () -> queue.peekFront(), "Peeking fr | CODE |
| CRITICAL⚡ | …ealgorithms/datastructures/queues/LinkedQueueTest.java | 68 | org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, () -> queue.peekRear(), "Peeking rea | CODE |
| CRITICAL | …ealgorithms/datastructures/queues/LinkedQueueTest.java | 110 | org.junit.jupiter.api.Assertions.assertThrows(IndexOutOfBoundsException.class, () -> queue.peek(4), "Peeking at | CODE |
| CRITICAL | …ealgorithms/datastructures/queues/LinkedQueueTest.java | 111 | org.junit.jupiter.api.Assertions.assertThrows(IndexOutOfBoundsException.class, () -> queue.peek(0), "Peeking at | CODE |
| CRITICAL | …ealgorithms/datastructures/queues/LinkedQueueTest.java | 137 | org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, it::next, "Calling next() on exhaust | CODE |
| CRITICAL | …ealgorithms/datastructures/queues/LinkedQueueTest.java | 200 | org.junit.jupiter.api.Assertions.assertThrows(IllegalArgumentException.class, () -> queue.enqueue(null), "Cannot | CODE |
| CRITICAL | …ealgorithms/datastructures/queues/LinkedQueueTest.java | 207 | org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, it::next, "Calling next() on empty q | CODE |
| CRITICAL | …java/com/thealgorithms/datastructures/bag/BagTest.java | 102 | org.junit.jupiter.api.Assertions.fail("Iterator returned item for an empty bag:" + item); | CODE |
| CRITICAL | …java/com/thealgorithms/datastructures/bag/BagTest.java | 222 | org.junit.jupiter.api.Assertions.assertNotNull(first1, "First iterator should return non-null element"); | CODE |
| CRITICAL | …java/com/thealgorithms/datastructures/bag/BagTest.java | 223 | org.junit.jupiter.api.Assertions.assertNotNull(first2, "Second iterator should return non-null element"); | CODE |
| CRITICAL⚡ | …/com/thealgorithms/others/QueueUsingTwoStacksTest.java | 86 | org.junit.jupiter.api.Assertions.assertThrows(EmptyStackException.class, queue::remove, "Removing from an empty | CODE |
| CRITICAL⚡ | …/com/thealgorithms/others/QueueUsingTwoStacksTest.java | 91 | org.junit.jupiter.api.Assertions.assertThrows(EmptyStackException.class, queue::peekFront, "Peeking front from a | CODE |
| CRITICAL⚡ | …/com/thealgorithms/others/QueueUsingTwoStacksTest.java | 96 | org.junit.jupiter.api.Assertions.assertThrows(EmptyStackException.class, queue::peekBack, "Peeking back from an | CODE |
| CRITICAL | …java/com/thealgorithms/sorts/SortingAlgorithmTest.java | 279 | org.junit.jupiter.api.Assertions.assertThrows(NullPointerException.class, () -> getSortAlgorithm().sort(array)); | CODE |
| CRITICAL | …java/com/thealgorithms/sorts/SortingAlgorithmTest.java | 285 | org.junit.jupiter.api.Assertions.assertThrows(NullPointerException.class, () -> getSortAlgorithm().sort(list)); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …va/com/thealgorithms/datastructures/graphs/TwoSat.java | 161 | // Step 1: Perform DFS to get topological order | COMMENT |
| LOW⚡ | …va/com/thealgorithms/datastructures/graphs/TwoSat.java | 171 | // Step 2: Find SCCs on transposed graph | COMMENT |
| LOW⚡ | …va/com/thealgorithms/datastructures/graphs/TwoSat.java | 180 | // Step 3: Check for contradictions and assign values | COMMENT |
| LOW⚡ | …omized/RandomizedMatrixMultiplicationVerification.java | 24 | // Step 1: Generate random 0/1 vector | COMMENT |
| LOW⚡ | …omized/RandomizedMatrixMultiplicationVerification.java | 30 | // Step 2: Compute br = b × r | COMMENT |
| LOW⚡ | …omized/RandomizedMatrixMultiplicationVerification.java | 38 | // Step 3: Compute a(br) | COMMENT |
| LOW⚡ | …omized/RandomizedMatrixMultiplicationVerification.java | 46 | // Step 4: Compute cr = c × r | COMMENT |
| LOW⚡ | …omized/RandomizedMatrixMultiplicationVerification.java | 54 | // Step 5: Compare abr and cr | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …va/com/thealgorithms/datastructures/graphs/TwoSat.java | 161 | // Step 1: Perform DFS to get topological order | COMMENT |
| LOW⚡ | …va/com/thealgorithms/datastructures/graphs/TwoSat.java | 171 | // Step 2: Find SCCs on transposed graph | COMMENT |
| LOW⚡ | …va/com/thealgorithms/datastructures/graphs/TwoSat.java | 180 | // Step 3: Check for contradictions and assign values | COMMENT |
| LOW⚡ | …omized/RandomizedMatrixMultiplicationVerification.java | 24 | // Step 1: Generate random 0/1 vector | COMMENT |
| LOW⚡ | …omized/RandomizedMatrixMultiplicationVerification.java | 30 | // Step 2: Compute br = b × r | COMMENT |
| LOW⚡ | …omized/RandomizedMatrixMultiplicationVerification.java | 38 | // Step 3: Compute a(br) | COMMENT |
| LOW⚡ | …omized/RandomizedMatrixMultiplicationVerification.java | 46 | // Step 4: Compute cr = c × r | COMMENT |
| LOW⚡ | …omized/RandomizedMatrixMultiplicationVerification.java | 54 | // Step 5: Compare abr and cr | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …ealgorithms/datastructures/graphs/BellmanFordTest.java | 21 | // Create a simple graph with 5 vertices and 8 edges | COMMENT |
| LOW | src/test/java/com/thealgorithms/graph/EdmondsTest.java | 161 | COMMENT | |
| LOW | …in/java/com/thealgorithms/stacks/StockSpanProblem.java | 41 | COMMENT | |
| LOW | …tructures/disjointsetunion/DisjointSetUnionBySize.java | 81 | // The size field tracks the number of elements in each set. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/scripts/check_structure.py | 5 | def _is_java_file_properly_located(java_file: pathlib.Path) -> bool: | CODE |
| LOW | .github/workflows/scripts/check_structure.py | 13 | def _find_misplaced_java_files() -> list[pathlib.Path]: | CODE |