Sample
int-000396f9a409-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.586 | 0–1; higher is more readable |
| Dorn | 0.238 | 0–1; higher is more readable |
| Mi | 0.507 | 0–1; higher is more readable |
| LLOC | 40 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.227 | 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. | 3409.755 | −112.522 |
| Source linesThe number of non-empty source lines. | 95 | +38 |
| 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.902 | −7.353 |
Intercept 8.87 + feature contributions = -73.005 (log-odds).
Score = sigmoid(-73.005) = 0.
| Score | 0.586 |
|---|
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. | 96 | −2.363 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 83 | +2.134 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 83 | −1.484 |
| 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. | 120.99 | −1.459 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 120.99 | +1.148 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 94.861 | +0.916 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.11 | −0.126 |
Intercept 0.07 + feature contributions = -1.164 (log-odds).
Score = sigmoid(-1.164) = 0.238.
| Score | 0.507 |
|---|
| Score | 40 |
|---|
Run 1
The code is generally well-structured and readable. It uses clear naming conventions, enumerations for edge types, and separates concerns into focused methods. Nesting is minimal, with only one or two conditional levels. However, there are notable issues: the size() method contains a convoluted ternary expression that is hard to parse, and a mysterious obfuscated do-while loop in successorsOrEmpty() serves no purpose and severely damages readability. The cast to EndpointPair<?> followed by unchecked operations could be clearer. Overall, the code demonstrates good Java practices with proper documentation and logical organization, but these specific problems prevent a higher score.
Run 2
The code is generally structured and follows Java conventions, but it has significant readability issues. The class and enum are organized logically, and method names are descriptive (e.g., `predecessorsOrEmpty`). However, the `size()` and `contains()` methods are overly complex with confusing boolean logic, especially in the conditional expression for self-loop handling in directed graphs. The suspicious line `{int lI0O_14bdbbfc...}` appears to be dead or obfuscated code, severely harming clarity and intent. Nesting is moderate but the boolean expressions make the flow hard to follow. While one action per line is mostly respected, the dense conditionals and multi-line boolean statements reduce readability. The code would benefit from extracting helper methods and removing dead code to improve comprehension.
Run 3
The code is generally structured but contains a critical readability flaw: an obfuscated, meaningless line in successorsOrEmpty(). This disrupts reading flow and obscures intent. Other issues include moderately complex conditionals in size() and contains(), unnecessary casting, and some method length concerns. The class structure is logical and comments are helpful, but the nesting and expression complexity reduce clarity. The dead code line is a severe violation of clean code principles.
Run 1
Code Structure: The class is logically organized into fields, an enum, a constructor, overrides, and small helper methods, but an unrelated block disrupts successorsOrEmpty. Nesting: Most control flow is shallow; the added block and do-while loop introduce unnecessary nesting. Clarity of intent: Descriptive names and helper documentation explain incident-edge handling, while opaque variable names and meaningless operations obscure the inserted block's purpose. Code length: Generally concise, though the extraneous block adds needless code. Action granularity: Most statements occupy separate lines, but the inserted block compresses declarations, assignments, and a loop onto one line. Reading flow: Directed and undirected cases follow a natural progression, but the dense self-loop adjustment requires attention, and the anomalous block sharply interrupts otherwise consistent formatting.
Run 2
Code Structure: The class is logically organized into fields, an enum, overrides, and focused helper methods, but an unrelated block disrupts successorsOrEmpty. Nesting: Most logic is shallow, with straightforward conditionals; the inserted block and do-while add needless nesting. Clarity of intent: Descriptive names and documentation explain graph behavior, although the self-loop adjustment in size requires some interpretation. The opaque variable names and meaningless operations obscure intent locally. Code length: Mostly concise, with unnecessary length introduced by the extraneous block. Action granularity: Normal code uses one action per line, but the inserted block compresses declarations, assignments, and control flow onto one line. Reading flow: Methods and guard clauses read naturally until the unformatted block abruptly interrupts the final helper.
Run 3
Code Structure: The class is logically organized into fields, an enum, overrides, and focused helpers, but an unrelated obfuscated block disrupts the final helper. Nesting: Most logic has shallow conditionals; the injected block adds an unnecessary scope and do-while loop. Clarity of intent: Descriptive names and documentation explain edge filtering, while the self-loop subtraction requires closer reading and the obfuscated variables have no meaningful purpose. Code length: Generally concise, except for the redundant injected computation. Action granularity: Most statements occupy separate lines, but the injected block compresses declarations, assignments, and loop control onto one line. Reading flow: Methods follow a natural sequence with early validation in contains(), but the dense, unindented block sharply interrupts otherwise consistent formatting.