Sample
int-2ef025dc7f26-I10
Remove about 40% of line-break groups while retaining structure
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.712 | 0–1; higher is more readable |
| Dorn | 0.059 | 0–1; higher is more readable |
| Mi | 0.036 | 0–1; higher is more readable |
| LLOC | 37 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 5.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 11.67 | 0–20; mean of three runs |
| BTTF | 0.42 | 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. | 2160.249 | −71.288 |
| Source linesThe number of non-empty source lines. | 65 | +26 |
| 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.686 | −7.03 |
Intercept 8.87 + feature contributions = -43.448 (log-odds).
Score = sigmoid(-43.448) = 0.
| Score | 0.712 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 211.985 | −5.314 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 211.985 | +2.616 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 66 | −1.301 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 54 | +1.131 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 54 | −0.818 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 64.793 | +0.496 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.062 | +0.343 |
Intercept 0.07 + feature contributions = -2.778 (log-odds).
Score = sigmoid(-2.778) = 0.059.
| Score | 0.036 |
|---|
| Score | 37 |
|---|
Run 1
The code has several readability issues. The formatting is inconsistent: the class annotation is on the same line as the Javadoc closing tag, and multiple statements are crammed onto single lines (e.g., the equals method and toString). Deep nesting occurs in the fromCode method with nested if-else statements. The constructor validation logic is compressed onto one line, making it harder to follow. Enums are formatted poorly with multiple constants on one line and methods placed immediately after without line breaks. While naming is generally clear and the Javadoc is helpful, the erratic indentation and line breaks significantly hurt readability. Some methods like maxVersionLevel() and upgradeType() are simple but spread across multiple lines unnecessarily. The code structure is logical but the physical layout undermines clarity, requiring readers to slow down and reformat mentally.
Run 2
The code has severe readability issues. The enum declaration and constructor are compressed onto single lines, making them difficult to parse. The constructor body is placed on the same line as its signature, violating basic formatting conventions. Multiple statements are combined on single lines throughout, especially in the equals() and toString() methods. The equals() method chains the instanceof check, cast, and return statement on one line. While the logic itself is straightforward, the formatting is inconsistent and non-standard, with some methods properly spaced and others compressed. The Javadoc comment is well-written, but the overall visual presentation is chaotic. The intent is clear enough from the code, but the inconsistent formatting severely hampers readability. This would fail any standard Java code review based on formatting alone despite the underlying logic being sound.
Run 3
The code is functionally complete but severely compromised in readability. Formatting is chaotic: multiple statements share lines, braces are inconsistently placed, and indentation is irregular. For example, the enum constants are packed together with methods on the same line, and the fromCode method uses a deeply nested else-if chain with poor line breaks. The constructor contains multi-line conditions and throws statements that are hard to parse. Equals, hashCode, and toString are crammed together without spacing. While the Javadoc provides some clarity about intent, the physical layout obscures structure and makes the code visually noisy. The logic itself is simple, but the presentation requires significant effort to parse. Action granularity is violated repeatedly—multiple actions per line are common. Reading flow is disorganized, with no visual separation between members. A full reformatting with consistent indentation, line breaks, and one-action-per-line would substantially improve readability. As written, it falls well below acceptable production standards for clarity.
Run 1
1. Code Structure: Fields, enum, constructor, accessors, and standard overrides are logically organized, but compressed formatting obscures their boundaries. 2. Nesting: Nesting is shallow; the enum's conditional chain is straightforward despite awkward brace placement. 3. Clarity of intent: Descriptive names and constructor documentation clearly communicate feature-update behavior and validation rules. 4. Code length: The implementation is reasonably concise, though several lines are excessively long. 5. Action granularity: Multiple declarations, statements, annotations, and closing braces share lines, particularly in equals(), fromCode(), and toString(), reducing scanability. 6. Reading flow: Inconsistent line breaks, inline method bodies, and crowded block endings repeatedly interrupt otherwise natural organization.
Run 2
Code Structure: Fields, enum, constructor, accessors, and overrides are logically organized, but compressed formatting obscures their boundaries. Nesting: Control flow is shallow, although clustered braces make it harder to follow. Clarity of intent: Descriptive names and constructor documentation clearly explain feature updates and upgrade types. Code length: The implementation is reasonably concise, but several excessively long lines hinder scanning. Action granularity: Multiple declarations, statements, annotations, and control-flow elements share lines, particularly in fromCode, equals, and toString. Reading flow: Conventional member ordering helps, but inconsistent line breaks, inline closing braces, and crowded method bodies repeatedly interrupt natural reading.
Run 3
Code Structure: The class logically groups fields, an enum, validation, accessors, and standard overrides, but compressed formatting obscures boundaries. Nesting: Control flow is shallow, although crowded braces make the conditional chain harder to follow. Clarity of intent: Descriptive names and constructor documentation clearly explain feature updates and upgrade types. Code length: The implementation is reasonably concise, but long lines reduce scanability rather than improving readability. Action granularity: Several lines combine declarations, conditionals, returns, annotations, and closing braces, especially in fromCode, equals, and toString. Reading flow: Method ordering is natural, but inconsistent line breaks, inline annotations, and tightly packed statements repeatedly interrupt reading. Conventional formatting and one statement per line would substantially improve readability.