Sample
int-caf4b3fa5b1f-I12
Inline all eligible single-use intermediate local variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.614 | 0–1; higher is more readable |
| Dorn | 0.381 | 0–1; higher is more readable |
| Mi | 0.507 | 0–1; higher is more readable |
| LLOC | 35 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.46 | 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. | 3171.581 | −104.662 |
| Source linesThe number of non-empty source lines. | 93 | +37.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.805 | −7.207 |
Intercept 8.87 + feature contributions = -65.799 (log-odds).
Score = sigmoid(-65.799) = 0.
| Score | 0.614 |
|---|
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. | 94 | −2.292 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 81 | +2.065 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 81 | −1.438 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 92.856 | +0.888 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.894 | +0.743 |
| 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. | 95.989 | −0.401 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.109 | −0.12 |
Intercept 0.07 + feature contributions = -0.485 (log-odds).
Score = sigmoid(-0.485) = 0.381.
| Score | 0.507 |
|---|
| Score | 35 |
|---|
Run 1
The code is well-structured and readable. It uses a logical class hierarchy, clear method names, and descriptive Javadoc. The `EdgeType` enum improves clarity. Methods are concise, and code is mostly flat with minimal nesting. The main readability concern is in `contains` and `size`, which have slightly complex boolean logic and repeated calls to helper methods. Additionally, the ternary in `size` and the mixed concerns in `contains` make the intent slightly harder to parse at a glance. Overall, the structure and naming are strong, but a few expressions could be extracted for even better clarity.
Run 2
The code is generally well-structured and readable. It uses clear naming, logical organization, and flat nesting with early returns. The `predecessorsOrEmpty` and `successorsOrEmpty` helpers improve clarity and avoid repetition. However, the `size()` method contains a complex one-line conditional expression that somewhat hurts readability. The `contains()` method is clear but could be slightly simplified. Overall, it is concise, intent-revealing, and easy to follow for developers familiar with graph concepts.
Run 3
The code is well-structured with clear separation of concerns, using an enum to represent edge types and helper methods to encapsulate logic. It maintains a mostly flat structure, with only one level of nesting in conditionals, which aids readability. The intent is clear from the class and method names, though the `contains` and `size` methods contain some complex boolean logic that could be slightly simplified. The code is concise and avoids unnecessary length, with each line performing a single logical action. Reading flow is natural, moving from field declarations to constructors, then core methods and private helpers. Overall, it is highly readable, with minor opportunities for improving expression clarity in the `size` and `contains` methods.
Run 1
Code Structure: Fields, enum, constructor, overrides, and private helpers are logically organized. Nesting: Shallow conditionals and early validation returns keep complexity low. Clarity of intent: Descriptive names, enum comments, and helper documentation explain edge filtering clearly; the self-loop adjustment in size() would benefit from a comment. Code length: Concise overall, though repeated predecessorsOrEmpty(node) calls and explicit else branches add minor verbosity. Action granularity: Statements generally perform one action each; compound return expressions combine related checks appropriately. Reading flow: Consistent formatting and clear directed/undirected branches make execution easy to follow, although the arithmetic and ternary expression in size() require extra attention.
Run 2
Code Structure: Fields, enum, constructor, overrides, and helper methods are logically organized with clear separation of responsibilities. Nesting: Shallow conditionals and early returns keep control flow easy to follow. Clarity of intent: Descriptive names, enum comments, and helper documentation explain edge filtering well; the self-loop subtraction in size() would benefit from a brief comment. Code length: Compact and appropriate, though repeated helper calls and explicit else branches add minor verbosity. Action granularity: Statements generally perform one action per line; multiline boolean expressions remain readable. Reading flow: Validation precedes membership checks naturally, and directed versus undirected behavior is clearly separated. The compound size calculation requires slightly more attention than the rest.
Run 3
Code Structure: Fields, edge types, constructor, overrides, and helper methods are logically organized. Nesting: Shallow conditionals and early returns keep control flow easy to follow. Clarity of intent: Descriptive names, enum comments, and helper documentation clearly convey directed-edge filtering; the self-loop adjustment in size() would benefit from a comment. Code length: Compact and appropriately factored, though repeated predecessor queries and explicit else branches add minor verbosity. Action granularity: Statements generally perform one action per line; compound boolean expressions and the size calculation are readable but require extra attention. Reading flow: Consistent formatting and parallel handling of directed and undirected graphs make the code natural to scan, with only the self-loop arithmetic slightly interrupting comprehension.