Sample
int-9813716bfdc2-I11
Split eligible integer literals into pairs of short-named intermediate variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.135 | 0–1; higher is more readable |
| Scalabrino | 0.57 | 0–1; higher is more readable |
| Dorn | 0.769 | 0–1; higher is more readable |
| Mi | 0.727 | 0–1; higher is more readable |
| LLOC | 12 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.631 | 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. | 840.254 | −27.728 |
| Source linesThe number of non-empty source lines. | 60 | +24 |
| 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.665 | −6.998 |
Intercept 8.87 + feature contributions = -1.856 (log-odds).
Score = sigmoid(-1.856) = 0.135.
| Score | 0.57 |
|---|
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. | 58 | −1.017 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 96.721 | +0.756 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 40 | +0.646 |
| 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.984 | −0.57 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.047 | +0.488 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 59.941 | +0.428 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
Intercept 0.07 + feature contributions = 1.2 (log-odds).
Score = sigmoid(1.2) = 0.769.
| Score | 0.727 |
|---|
| Score | 12 |
|---|
Run 1
This interface is highly readable and well-structured. The code organization is logical, with method declarations grouped into sections (adjacent nodes, incident edges, edge operations) and separated by whitespace. Nesting is minimal - only the class/interface declaration and method bodies are nested, making the code flat and easy to scan. Intent is crystal clear through descriptive method names and purposeful Javadoc comments that explain each method's behavior and edge cases. The code length is concise - no unnecessary boilerplate or redundant annotations. Action granularity is appropriate for an interface, with each method declaration on its own line. Reading flow is natural, moving from basic accessor methods to more complex edge operations in a progressive manner. The only minor deduction is for the slightly verbose Javadoc on some methods, but this actually enhances understanding rather than hindering readability. Overall, this is exceptionally clean, well-documented Java code.
Run 2
The code is highly readable. It uses a clean interface structure with clear method grouping and comprehensive Javadoc that explains intent, especially for non-obvious behavior like self-loops. Nesting is minimal (none beyond the class body), and each method is a single, focused action. Naming is descriptive, and parameter/return types are straightforward. Minor deductions are for slight verbosity in repetitive documentation and the implicit contract of 'isSelfLoop' requiring external context.
Run 3
The code is highly readable due to its clean interface structure, clear separation of concerns, and concise method signatures. The logical organization groups related methods (adjacent nodes, predecessors/successors, edge sets) in a natural reading flow. Nesting is non-existent since this is an interface. Intent is evident from method names and Javadoc comments, especially for nuanced behaviors like self-loops. Action granularity is optimal—one method per line in declarations. Javadoc clarifies edge cases without being verbose. Minor deductions: some methods lack explanatory comments for selfLoop parameter usage, and ordering could group inEdges/outEdges consistently with predecessors/successors. Overall, this is exemplary interface design that balances conciseness with clarity.
Run 1
Code Structure: Logically groups node queries, edge queries, removals, and additions in a compact interface. Nesting: No nested control flow; declarations are flat and easy to scan. Clarity of intent: Descriptive method names, generic types, and focused documentation clearly communicate graph operations and special cases. Some basic query methods lack documentation, and addInEdge does not explain isSelfLoop. Code length: Concise, with no unnecessary implementation or repetition. Action granularity: Each method declaration represents one focused operation, with annotations clearly separated. Reading flow: Consistent formatting and progression from queries to mutations make reading natural. Minor documentation gaps prevent a perfect score.
Run 2
Code Structure: The interface logically groups node queries, edge queries, and mutation methods. Nesting: Flat declarations with no nested control flow make scanning easy. Clarity of intent: Descriptive method names, generic types, annotations, and focused documentation clearly communicate purpose and behavior. However, the basic query methods lack documentation, and the isSelfLoop parameter's meaning in addInEdge is not explained. Code length: Concise and appropriate for an interface, with useful rather than excessive comments. Action granularity: Each declaration occupies its own line and represents a distinct operation. Reading flow: Consistent spacing and progression from queries to removals and additions support natural reading; a blank line after the package declaration would slightly improve formatting.
Run 3
Code Structure: Logically groups node queries, edge queries, removals, and additions within a focused interface. Nesting: Flat declarations with no nested control flow make scanning easy. Clarity of intent: Descriptive method names and targeted Javadoc explain purpose, directionality, and special cases; the first six methods and the addInEdge self-loop parameter could use brief documentation. Code length: Concise, with useful comments rather than unnecessary verbosity. Action granularity: Each declaration occupies its own line and represents one operation. Reading flow: Consistent formatting and progression from queries to mutations support natural reading, though a blank line after the package declaration would improve visual separation.