Sample
int-6c6134e6bafe-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.795 | 0–1; higher is more readable |
| Dorn | 0.474 | 0–1; higher is more readable |
| Mi | 0.716 | 0–1; higher is more readable |
| LLOC | 15 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.562 | 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. | 1546.216 | −51.025 |
| Source linesThe number of non-empty source lines. | 53 | +21.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.95 | −7.426 |
Intercept 8.87 + feature contributions = -28.381 (log-odds).
Score = sigmoid(-28.381) = 0.
| Score | 0.795 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 48 | +0.923 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 54 | −0.876 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.111 | +0.73 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 48 | −0.681 |
| 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. | 96.963 | −0.442 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 52.704 | +0.327 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.113 | −0.154 |
Intercept 0.07 + feature contributions = -0.102 (log-odds).
Score = sigmoid(-0.102) = 0.474.
| Score | 0.716 |
|---|
| Score | 15 |
|---|
Run 1
The code is well-structured with clear separation of concerns: abstract getters, a default setter throwing UnsupportedOperationException, and overridden equals/hashCode/toString methods. Nesting is minimal (one level in equals). Intent is explicit through method names, Javadoc, and use of Objects.equals. The equals method is concise and correct, used with instanceof pattern and wildcard cast. hashCode follows the standard Entry contract with null checks via ternary operators. toString is a simple one-liner matching its contract. Minor readability improvements could include extracting the null-handling logic into helper methods or using Objects.hashCode, but the current style is consistent and idiomatic for Guava. Overall, the code maintains a natural reading flow and one action per line, with no excessive length or ambiguity.
Run 2
The code is highly readable with clear structure, minimal nesting, and concise methods. It follows standard Java conventions, uses meaningful names, and separates concerns logically. The equals method is straightforward, with a single level of nesting and clear intent. HashCode and toString are concise and easy to follow. Nullability annotations add clarity for API consumers. Minor deductions: the @Nullable annotations on type parameters may slightly reduce readability for those unfamiliar with JSpecify, and the package-private abstract class could benefit from a class-level Javadoc describing its role beyond the existing summary.
Run 3
The code is highly readable due to its logical structure, minimal nesting, and clear intent. Each method has a single, well-defined responsibility, and the class follows standard conventions for implementing Map.Entry. The equals method uses a clean instanceof pattern with early return, avoiding deep nesting. Type parameters and annotations are consistent and aid clarity. The hashCode implementation is compact but could be slightly clearer with a helper for null-safe hashing, though it remains understandable. Overall, the code is concise, well-organized, and easy to follow.
Run 1
Code Structure: Methods are logically organized within a small abstraction, with clear separation of entry access and standard object behavior. Nesting: Only one shallow conditional appears in equals; other methods are flat. Clarity of intent: Standard method names, overrides, and documentation make the purpose clear, though abbreviated variables k and v and the XOR hash expression require minor interpretation. Code length: The implementation is concise without unnecessary helpers or repetition. Action granularity: Each statement performs a focused action; compound expressions directly represent equality and hashing rules. Reading flow: Consistent formatting and conventional method ordering support smooth reading. Nullness annotations add slight visual density but communicate useful constraints.
Run 2
Code Structure: Methods are logically organized around the Map.Entry contract, with consistent formatting and annotations. Nesting: Only one shallow conditional appears in equals; other methods are flat. Clarity of intent: Class documentation, conventional method names, and standard equality and hashing patterns make the purpose clear. Short variable names k and v slightly reduce descriptiveness. Code length: The implementation is concise without unnecessary abstractions or repetition. Action granularity: Statements generally perform one action each; the combined hash expression is compact but requires some attention. Reading flow: Abstract accessors precede the default mutation behavior and object methods, creating a natural progression. Nullability annotations add minor visual density but communicate useful constraints.
Run 3
Code Structure: Methods are logically organized in a small, cohesive class implementing standard map-entry behavior. Nesting: Only one shallow conditional appears in equals; other methods are flat. Clarity of intent: Familiar method names, overrides, and documentation make the purpose clear, though abbreviated hashCode variables and nullness annotations add minor reading overhead. Code length: The implementation is concise without unnecessary repetition. Action granularity: Statements generally perform one action each; compound equality and hash expressions remain compact and understandable. Reading flow: Consistent formatting and a natural progression from accessors to equality, hashing, and string representation support easy reading.