Sample
int-9e2a2efa09b3-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.601 | 0–1; higher is more readable |
| Dorn | 0.236 | 0–1; higher is more readable |
| Mi | 0.57 | 0–1; higher is more readable |
| LLOC | 51 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.382 | 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. | 4480.976 | −147.872 |
| Source linesThe number of non-empty source lines. | 143 | +57.2 |
| 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.83 | −7.245 |
Intercept 8.87 + feature contributions = -89.047 (log-odds).
Score = sigmoid(-89.047) = 0.
| Score | 0.601 |
|---|
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. | 144 | −4.062 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 100 | +2.722 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 100 | −1.874 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 142.782 | +1.586 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 98.514 | +0.785 |
| 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.958 | −0.569 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.08 | +0.169 |
Intercept 0.07 + feature contributions = -1.173 (log-odds).
Score = sigmoid(-1.173) = 0.236.
| Score | 0.57 |
|---|
| Score | 51 |
|---|
Run 1
The code is generally well-structured with clear class hierarchy and logical separation of directed/undirected cases. Naming is descriptive and comments effectively explain non-obvious logic, particularly around null handling and the visited set strategy. However, readability is significantly hurt by the repetitive and odd 'if (((0x... ^ 0x...)...)) { throw new AssertionError(); }' blocks on nearly every method, which add noise and obscure the main logic. Indentation within method bodies is inconsistent (e.g., the assertions are on a new line without extra indentation). The computeNext methods use infinite while(true) loops which, while purposeful, slightly increase cognitive load compared to a clearer advancement condition. The algorithm itself is well-documented, but the code presentation feels more cluttered than necessary. Overall it's readable for experienced developers but has avoidable stylistic issues.
Run 2
The code has a clear overall structure with logical separation of directed and undirected cases, and the class hierarchy is sensible. However, there are significant readability issues. The presence of obfuscated, dead-code assertions like `if (((0x10AC ^ 0x10AC) != 0)) { throw new AssertionError(); }` is highly confusing and adds noise without purpose. Nesting is moderate: the `while (true)` loops with inner conditions and a call to `advance()` create some complexity, though not extreme. Intent is mostly clear from method and class names and helpful Javadoc comments, but the dead-code assertions and the need for multiple `requireNonNull` calls with comments explaining safety indicate unclear nullability handling. Code length is reasonable, but the assertions make it unnecessarily longer. Action granularity is generally good, with one main action per line. Reading flow is decent but disrupted by the distracting assertions. Overall, the code would be much clearer without the cryptic assert statements and with cleaner handling of nullable fields.
Run 3
The code has reasonable class structure and documentation but is severely undermined by dead code artifacts like 'if (((0x10AC ^ 0x10AC) != 0)) { throw new AssertionError(); }' inserted throughout. These blocks add noise, break reading flow, and obscure intent. The core iterator logic itself is well-factored and uses clear method names, but the constant interruptions make it difficult to follow. Nesting is moderate and mostly acceptable, though computeNext loops are somewhat dense. Action granularity is generally fine, but the redundant checks violate conciseness. In its current state, readability is heavily compromised by these artifacts.
Run 1
Code Structure: Shared iteration logic and separate directed/undirected subclasses provide logical organization. Nesting: Generally manageable, though the undirected iterator combines nested loops and conditionals. Clarity of intent: Descriptive names and explanatory comments make edge traversal, duplicate suppression, and self-loop handling clear; repeated always-false XOR assertions introduce confusing, purposeless noise. Code length: Core logic is reasonably concise, but redundant assertions and extensive documentation increase reading effort. Action granularity: Most statements perform one action per line, while inline assertion blocks compress conditions and throws onto single lines. Reading flow: Methods follow a natural progression, but unindented assertion blocks repeatedly disrupt formatting and continuity. Overall, the underlying implementation is readable, with substantial distraction from injected dead code.
Run 2
Code Structure: Shared iterator state and separate directed/undirected subclasses provide logical organization. Nesting: Mostly shallow, though the undirected traversal combines nested loops and a conditional. Clarity of intent: Descriptive names and comments explain traversal, duplicate suppression, null safety, and self-loops; repeated always-false hexadecimal XOR checks add confusing, purposeless noise. Code length: Core logic is reasonably concise, but redundant checks and a lengthy documentation example increase reading effort. Action granularity: Most meaningful operations occupy separate lines, while injected checks compress conditions and throws onto single lines. Reading flow: Methods follow a natural initialization-and-traversal sequence, but unindented checks repeatedly interrupt the flow. Overall, the underlying design is readable, with substantial presentation and dead-code distractions.
Run 3
Code Structure: Shared traversal logic and separate directed/undirected subclasses provide logical organization. Nesting: Directed iteration is shallow; undirected iteration has moderate nesting through two loops and a conditional. Clarity of intent: Descriptive names and comments explain traversal, duplicate suppression, and self-loops, but repeated always-false hexadecimal XOR checks introduce misleading noise. Code length: Core logic is reasonably concise; dead checks add unnecessary length, while the lengthy example is useful documentation. Action granularity: Most meaningful operations occupy separate lines, but injected condition-and-throw statements compress control flow onto single lines. Reading flow: Methods follow a natural progression, but unindented dead checks repeatedly interrupt it. Nullable state and the initial null entry in the visited set require extra attention despite explanatory comments.