Sample
int-55e8c53bf6d4-I11
Split eligible integer literals into pairs of short-named intermediate variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.605 | 0–1; higher is more readable |
| Dorn | 0.321 | 0–1; higher is more readable |
| Mi | 0.262 | 0–1; higher is more readable |
| LLOC | 39 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.148 | 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. | 3424.87 | −113.021 |
| Source linesThe number of non-empty source lines. | 97 | +38.8 |
| 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.79 | −7.186 |
Intercept 8.87 + feature contributions = -72.536 (log-odds).
Score = sigmoid(-72.536) = 0.
| Score | 0.605 |
|---|
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. | 98 | −2.434 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 85 | +2.203 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 85 | −1.53 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 96.838 | +0.944 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 103.959 | +0.873 |
| 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. | 103.98 | −0.739 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.111 | −0.137 |
Intercept 0.07 + feature contributions = -0.749 (log-odds).
Score = sigmoid(-0.749) = 0.321.
| Score | 0.262 |
|---|
| Score | 39 |
|---|
Run 1
The code is generally readable with clear class purpose, good naming, and logical structure. However, the size() method introduces confusing constants (a, b, c, d) that make the intent unclear. The expression for directed graphs is hard to understand; simplifying it to `predecessorsOrEmpty(node).size() + successorsOrEmpty(node).size() - (edgeType == EdgeType.BOTH && predecessorsOrEmpty(node).contains(node) ? 1 : 0)` would improve clarity. Nesting is moderate, but the contains() method has several nested conditionals. Action granularity is mostly one action per line, but the return expression in size() combines too much logic. Overall, it is maintainable but could be improved by removing the unnecessary constants and simplifying the conditional arithmetic.
Run 2
The code has a clear class structure and some helpful methods like predecessorsOrEmpty/successorsOrEmpty that reduce complexity. However, the size() method is extremely confusing, using meaningless variable names (a, b, c, d) and hardcoded arithmetic that obfuscates intent. The expression '(a + b)' and '(c + d)' both evaluate to 1, making the logic essentially a no-op conditional. Method calls are repeated excessively (predecessorsOrEmpty(node).contains(node) twice), and the contains() method has multiple boolean OR conditions that are hard to follow. Nesting is moderate but not extreme. Overall clarity is poor due to the cryptic size() implementation and lack of explanatory comments where needed.
Run 3
The code is well-structured with clear class and method separation, but has critical readability issues. The size() method contains confusing variable names (a, b, c, d) with arithmetic that obscures intent — `(a + b)` equals 1 and `(c + d)` equals 0, making the logic needlessly opaque. Multiple method calls like `predecessorsOrEmpty(node)` are repeated instead of cached, and the conditional expression is convoluted. The contains() method is relatively clear but has some nested boolean logic. Comments explain edge types but don't clarify the size() calculation. Action granularity is mostly acceptable, and reading flow is natural except for the size() method. The class has good abstraction and helper methods, but the size() implementation significantly degrades overall readability.
Run 1
Code Structure: Fields, enum, constructor, overrides, and helper methods are logically organized. Nesting: Shallow conditionals and early returns keep complexity manageable. Clarity of intent: Descriptive method names, enum values, and documentation explain edge filtering well, but the arbitrary constants a, b, c, and d obscure the self-loop adjustment in size(). Code length: Generally concise, though those constants and repeated predecessor lookups add unnecessary clutter. Action granularity: Statements mostly perform one action per line; compound Boolean expressions remain reasonably formatted. Reading flow: Consistent formatting and directed/undirected branches support natural reading, but the arithmetic ternary in size() interrupts that flow and requires mental simplification to understand.
Run 2
Code Structure: Well-organized class with focused methods, a descriptive enum, and documented helpers. Nesting: Shallow conditionals and early returns make control flow easy to follow. Clarity of intent: Names clearly express graph and edge concepts, but the arbitrary constants a, b, c, and d obscure the self-loop adjustment in size(). Code length: Mostly concise, though those constants and unnecessary else branches add clutter. Action granularity: Statements generally perform one action per line; the size calculation combines several operations into a harder-to-read expression. Reading flow: Consistent formatting and logical method organization support natural reading, but repeated helper calls and the arithmetic ternary interrupt it. Replacing the constants with a direct 1-or-0 self-loop adjustment would substantially improve readability.
Run 3
Code Structure: Well-organized class with focused methods, a clear enum, and reusable helpers. Nesting: Shallow conditionals and early returns keep complexity manageable. Clarity of intent: Descriptive method names and documentation explain edge filtering, but the arbitrary a, b, c, and d constants obscure the self-loop adjustment in size(). Code length: Mostly concise; unnecessary constants and explicit else branches add avoidable verbosity. Action granularity: Statements generally perform one action each, although the size calculation combines several operations in a dense expression. Reading flow: Consistent formatting and logical directed/undirected branches support natural reading, but the arithmetic ternary interrupts comprehension and repeated helper calls add visual noise.