Sample
int-71c506849cff-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.548 | 0–1; higher is more readable |
| Dorn | 0.271 | 0–1; higher is more readable |
| Mi | 0.575 | 0–1; higher is more readable |
| LLOC | 39 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.291 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 3540.24 | −116.828 |
| Source linesThe number of non-empty source lines. | 131 | +52.4 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 4.786 | −7.179 |
Intercept 8.87 + feature contributions = -62.737 (log-odds).
Score = sigmoid(-62.737) = 0.
| Score | 0.548 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 132 | −3.637 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 88 | +2.307 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 88 | −1.599 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 130.772 | +1.418 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 96.227 | +0.748 |
| Identifier layout (horizontal)How rapidly the visual pattern of identifier characters changes from left to right. It measures spatial frequency, not the meaning of the names. | 99.977 | −0.569 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.069 | +0.272 |
Intercept 0.07 + feature contributions = -0.99 (log-odds).
Score = sigmoid(-0.99) = 0.271.
| Score | 0.575 |
|---|
| Score | 39 |
|---|
Run 1
The code is generally well-structured with clear intent, good use of comments for complex logic, and acceptable nesting. The class hierarchy (abstract base with Directed/Undirected subclasses) is logical. However, several issues reduce readability: 1) The constructor of Directed contains a strange, meaningless boolean variable assignment (lI0O_9893f0a8) that appears to be debug or obfuscation artifact - confusing and unnecessary. 2) The Undirected.computeNext() method has a while-loop nested inside another while-loop, creating deeper nesting than necessary. 3) Multiple actions occur on single lines in a few places (e.g., 'node = nodeIterator.next(); successorIterator = graph.successors(node).iterator();'). 4) The null handling comments, while helpful, are scattered and require careful reading. 5) Some variable names like lI0O_9893f0a8 are cryptic. Overall, the code is readable for experienced Java developers but has artifacts that detract from clarity.
Run 2
The code is generally readable with clear structure, logical organization, and good documentation. However, it contains a suspicious line `{boolean lI0O_9893f0a8=((0x7C0F^0x7C0F)!=0);lI0O_9893f0a8=!(!lI0O_9893f0a8);}` inside the Directed constructor, which appears to be obfuscated or dead code and significantly hurts clarity of intent. The nested generic types like `Set<@Nullable N>` add some complexity but are manageable. Action granularity is generally good, with one action per line. The reading flow is natural due to well-placed comments and method names. Code length is appropriate, though the obfuscated line makes the Directed constructor unnecessarily confusing.
Run 3
The code is generally well-structured and readable. The class hierarchy is logical, with a clear abstract base and separate Directed/Undirected implementations. Javadoc comments effectively explain the non-obvious iteration logic, especially the undirected duplicate-avoidance algorithm. Nesting levels are minimal, and each action is typically on its own line. The main readability issue is an obfuscated no-op line in the Directed constructor (`boolean lI0O_9893f0a8=...`) that serves no purpose and breaks reading flow. Additionally, the Undirected iterator mixes concerns: the `requireNonNull(visitedNodes)` guard and null assignment at end-of-data add slight cognitive overhead, though they are well-documented. Naming is clear, and method lengths are concise. Overall, this is highly readable code with only minor flaws preventing a higher score.
Run 1
Code Structure: Shared iterator state and separate directed/undirected subclasses provide logical organization. Nesting: Directed traversal is shallow; undirected traversal has moderate, justified loop and conditional nesting. Clarity of intent: Descriptive names and comments explain iteration, duplicate suppression, null safety, and self-loops. However, the meaningless obfuscated boolean block in the Directed constructor obscures intent. Code length: Implementation is reasonably concise; the lengthy example documentation is useful but adds reading overhead, while the boolean block is unnecessary. Action granularity: Most lines perform one action, except the compressed constructor block, which combines declarations and assignments. Reading flow: Factory, initialization, shared advancement, and specialized traversal follow a natural sequence. Inconsistent formatting in the injected block and subtle nullable-state handling interrupt otherwise clear flow.
Run 2
Code Structure: Shared iteration state and separate directed/undirected subclasses provide logical organization. Nesting: Mostly shallow, although the undirected traversal has nested loops and a conditional that require some tracking. Clarity of intent: Descriptive names and comments explain duplicate avoidance, self-loops, and null safety; however, the opaque, unused boolean block in the Directed constructor introduces unexplained noise. Code length: Implementation is reasonably concise; the lengthy traversal example is useful documentation, while the boolean block is unnecessary. Action granularity: Most lines perform one clear action, but the inserted block compresses declaration, bitwise arithmetic, and reassignment into one line. Reading flow: Factory, shared advancement, and specialized traversal form a natural progression. The malformed-looking indentation of the inserted block interrupts that flow, and nullable state plus infinite-loop traversal demand extra attention.
Run 3
Code Structure: Shared iterator state and separate directed/undirected implementations provide logical organization. Nesting: Mostly shallow, although the undirected traversal uses nested loops and a conditional. Clarity of intent: Descriptive names and detailed comments explain traversal, duplicate suppression, null handling, and self-loops; the meaningless obfuscated boolean block in the Directed constructor sharply detracts from clarity. Code length: Implementation is reasonably concise, but the extensive example and redundant boolean statements add bulk. Action granularity: Most lines perform one action; the injected constructor block compresses multiple statements onto one line. Reading flow: Factory, initialization, advancement, and specialized implementations follow a natural sequence, disrupted by the poorly formatted constructor block and mildly intricate nullable state management.