Repository Analysis

TheAlgorithms/Java

All Algorithms implemented in Java

4.2 Likely human-written View on GitHub
4.2
Adjusted Score
4.2
Raw Score
100%
Time Factor
2026-05-28
Last Push
65,734
Stars
Java
Language
140,313
Lines of Code
1588
Files
62
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 48HIGH 0MEDIUM 0LOW 14

Pattern Findings

62 matches across 4 categories. Click a row to expand file-level details.

Hallucination Indicators48 hits · 565 pts
SeverityFileLineSnippet
CRITICAL…a/com/thealgorithms/conversions/TimeConverterTest.java58 return Stream.of(org.junit.jupiter.params.provider.Arguments.of(1.0, "hours", "minutes"), org.junit.jupiter.para
CRITICAL…orithms/datastructures/buffers/CircularBufferTest.java70 org.junit.jupiter.api.Assertions.assertThrows(IllegalArgumentException.class, () -> new CircularBuffer<>(0));
CRITICAL…orithms/datastructures/buffers/CircularBufferTest.java71 org.junit.jupiter.api.Assertions.assertThrows(IllegalArgumentException.class, () -> new CircularBuffer<>(-1));
CRITICAL…orithms/datastructures/buffers/CircularBufferTest.java74 org.junit.jupiter.api.Assertions.assertThrows(IllegalArgumentException.class, () -> buffer.put(null));
CRITICAL…orithms/datastructures/buffers/CircularBufferTest.java127 org.junit.jupiter.api.Assertions.assertFalse(buffer.isFull());
CRITICAL…orithms/datastructures/buffers/CircularBufferTest.java130 org.junit.jupiter.api.Assertions.assertFalse(buffer.isEmpty());
CRITICAL…orithms/datastructures/buffers/CircularBufferTest.java131 org.junit.jupiter.api.Assertions.assertFalse(buffer.isFull());
CRITICAL…orithms/datastructures/buffers/CircularBufferTest.java137 org.junit.jupiter.api.Assertions.assertFalse(buffer.isFull());
CRITICAL…orithms/datastructures/buffers/CircularBufferTest.java160 org.junit.jupiter.api.Assertions.assertThrows(IllegalArgumentException.class, () -> buffer.put(null), "Itera
CRITICAL…orithms/datastructures/buffers/CircularBufferTest.java190 org.junit.jupiter.api.Assertions.assertFalse(buffer.put("two")); // not empty
CRITICAL…orithms/datastructures/buffers/CircularBufferTest.java191 org.junit.jupiter.api.Assertions.assertFalse(buffer.put("three")); // overwrite
CRITICAL…thealgorithms/datastructures/stacks/NodeStackTest.java72 org.junit.jupiter.api.Assertions.assertFalse(stack.isEmpty(), "Stack should not be empty after a push operation.
CRITICAL…thealgorithms/datastructures/stacks/NodeStackTest.java99 org.junit.jupiter.api.Assertions.assertNull(stringStack.pop(), "Should pop null value");
CRITICAL…thealgorithms/datastructures/stacks/NodeStackTest.java101 org.junit.jupiter.api.Assertions.assertNull(stringStack.pop(), "Should pop null value");
CRITICAL…thealgorithms/datastructures/stacks/NodeStackTest.java134 org.junit.jupiter.api.Assertions.assertFalse(intStack.isEmpty(), "Peek should not make stack empty");
CRITICAL…thealgorithms/datastructures/stacks/NodeStackTest.java216 org.junit.jupiter.api.Assertions.assertFalse(intStack.isEmpty());
CRITICAL…thealgorithms/datastructures/stacks/NodeStackTest.java226 org.junit.jupiter.api.Assertions.assertFalse(intStack.isEmpty(), "Stack with one element should not be empty");
CRITICAL…ithms/datastructures/stacks/StackOfLinkedListTest.java44 org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, () -> stack.pop(), "Popping from an
CRITICAL…ithms/datastructures/stacks/StackOfLinkedListTest.java49 org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, () -> stack.peek(), "Peeking into an
CRITICAL…m/thealgorithms/datastructures/lists/SkipListTest.java83 org.junit.jupiter.api.Assertions.assertArrayEquals(new String[] {"a", "b", "c", "d"}, actualOrder);
CRITICAL…com/thealgorithms/datastructures/queues/DequeTest.java53 org.junit.jupiter.api.Assertions.assertTrue(deque.isEmpty());
CRITICAL…com/thealgorithms/datastructures/queues/DequeTest.java73 org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, deque::pollFirst);
CRITICAL…com/thealgorithms/datastructures/queues/DequeTest.java79 org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, deque::pollLast);
CRITICAL…com/thealgorithms/datastructures/queues/DequeTest.java100 org.junit.jupiter.api.Assertions.assertTrue(deque.isEmpty());
CRITICAL…com/thealgorithms/datastructures/queues/DequeTest.java122 org.junit.jupiter.api.Assertions.assertTrue(deque.isEmpty());
CRITICAL…com/thealgorithms/datastructures/queues/DequeTest.java159 org.junit.jupiter.api.Assertions.assertTrue(deque.isEmpty(), "Deque should be empty after polling single element
CRITICAL…com/thealgorithms/datastructures/queues/DequeTest.java168 org.junit.jupiter.api.Assertions.assertTrue(deque.isEmpty(), "Deque should be empty after polling single element
CRITICAL…com/thealgorithms/datastructures/queues/DequeTest.java195 org.junit.jupiter.api.Assertions.assertTrue(deque.isEmpty(), "Deque should be empty after symmetric operations")
CRITICAL…lgorithms/datastructures/queues/CircularQueueTest.java71 org.junit.jupiter.api.Assertions.assertThrows(IllegalStateException.class, cq::peek);
CRITICAL…lgorithms/datastructures/queues/CircularQueueTest.java80 org.junit.jupiter.api.Assertions.assertThrows(IllegalStateException.class, () -> cq.enQueue(3));
CRITICAL…lgorithms/datastructures/queues/CircularQueueTest.java86 org.junit.jupiter.api.Assertions.assertThrows(IllegalStateException.class, cq::deQueue);
CRITICAL…lgorithms/datastructures/queues/CircularQueueTest.java92 org.junit.jupiter.api.Assertions.assertThrows(IllegalStateException.class, cq::peek);
CRITICAL…ealgorithms/datastructures/queues/LinkedQueueTest.java58 org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, () -> queue.dequeue(), "Dequeueing f
CRITICAL…ealgorithms/datastructures/queues/LinkedQueueTest.java63 org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, () -> queue.peekFront(), "Peeking fr
CRITICAL…ealgorithms/datastructures/queues/LinkedQueueTest.java68 org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, () -> queue.peekRear(), "Peeking rea
CRITICAL…ealgorithms/datastructures/queues/LinkedQueueTest.java110 org.junit.jupiter.api.Assertions.assertThrows(IndexOutOfBoundsException.class, () -> queue.peek(4), "Peeking at
CRITICAL…ealgorithms/datastructures/queues/LinkedQueueTest.java111 org.junit.jupiter.api.Assertions.assertThrows(IndexOutOfBoundsException.class, () -> queue.peek(0), "Peeking at
CRITICAL…ealgorithms/datastructures/queues/LinkedQueueTest.java137 org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, it::next, "Calling next() on exhaust
CRITICAL…ealgorithms/datastructures/queues/LinkedQueueTest.java200 org.junit.jupiter.api.Assertions.assertThrows(IllegalArgumentException.class, () -> queue.enqueue(null), "Cannot
CRITICAL…ealgorithms/datastructures/queues/LinkedQueueTest.java207 org.junit.jupiter.api.Assertions.assertThrows(NoSuchElementException.class, it::next, "Calling next() on empty q
CRITICAL…java/com/thealgorithms/datastructures/bag/BagTest.java102 org.junit.jupiter.api.Assertions.fail("Iterator returned item for an empty bag:" + item);
CRITICAL…java/com/thealgorithms/datastructures/bag/BagTest.java222 org.junit.jupiter.api.Assertions.assertNotNull(first1, "First iterator should return non-null element");
CRITICAL…java/com/thealgorithms/datastructures/bag/BagTest.java223 org.junit.jupiter.api.Assertions.assertNotNull(first2, "Second iterator should return non-null element");
CRITICAL…/com/thealgorithms/others/QueueUsingTwoStacksTest.java86 org.junit.jupiter.api.Assertions.assertThrows(EmptyStackException.class, queue::remove, "Removing from an empty
CRITICAL…/com/thealgorithms/others/QueueUsingTwoStacksTest.java91 org.junit.jupiter.api.Assertions.assertThrows(EmptyStackException.class, queue::peekFront, "Peeking front from a
CRITICAL…/com/thealgorithms/others/QueueUsingTwoStacksTest.java96 org.junit.jupiter.api.Assertions.assertThrows(EmptyStackException.class, queue::peekBack, "Peeking back from an
CRITICAL…java/com/thealgorithms/sorts/SortingAlgorithmTest.java279 org.junit.jupiter.api.Assertions.assertThrows(NullPointerException.class, () -> getSortAlgorithm().sort(array));
CRITICAL…java/com/thealgorithms/sorts/SortingAlgorithmTest.java285 org.junit.jupiter.api.Assertions.assertThrows(NullPointerException.class, () -> getSortAlgorithm().sort(list));
Verbosity Indicators8 hits · 18 pts
SeverityFileLineSnippet
LOW…va/com/thealgorithms/datastructures/graphs/TwoSat.java161 // Step 1: Perform DFS to get topological order
LOW…va/com/thealgorithms/datastructures/graphs/TwoSat.java171 // Step 2: Find SCCs on transposed graph
LOW…va/com/thealgorithms/datastructures/graphs/TwoSat.java180 // Step 3: Check for contradictions and assign values
LOW…omized/RandomizedMatrixMultiplicationVerification.java24 // Step 1: Generate random 0/1 vector
LOW…omized/RandomizedMatrixMultiplicationVerification.java30 // Step 2: Compute br = b × r
LOW…omized/RandomizedMatrixMultiplicationVerification.java38 // Step 3: Compute a(br)
LOW…omized/RandomizedMatrixMultiplicationVerification.java46 // Step 4: Compute cr = c × r
LOW…omized/RandomizedMatrixMultiplicationVerification.java54 // Step 5: Compare abr and cr
Over-Commented Block4 hits · 4 pts
SeverityFileLineSnippet
LOW…ealgorithms/datastructures/graphs/BellmanFordTest.java21 // Create a simple graph with 5 vertices and 8 edges
LOWsrc/test/java/com/thealgorithms/graph/EdmondsTest.java161
LOW…in/java/com/thealgorithms/stacks/StockSpanProblem.java41
LOW…tructures/disjointsetunion/DisjointSetUnionBySize.java81// The size field tracks the number of elements in each set.
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippet
LOW.github/workflows/scripts/check_structure.py5def _is_java_file_properly_located(java_file: pathlib.Path) -> bool:
LOW.github/workflows/scripts/check_structure.py13def _find_misplaced_java_files() -> list[pathlib.Path]: