Sample
int-3d6f70ecceee-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.822 | 0–1; higher is more readable |
| Dorn | 0.237 | 0–1; higher is more readable |
| Mi | 0.115 | 0–1; higher is more readable |
| LLOC | 39 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15.33 | 0–20; mean of three runs |
| BTTF | 0.308 | 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. | 2350.74 | −77.574 |
| Source linesThe number of non-empty source lines. | 98 | +39.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.599 | −6.899 |
Intercept 8.87 + feature contributions = -36.403 (log-odds).
Score = sigmoid(-36.403) = 0.
| Score | 0.822 |
|---|
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. | 87 | +2.272 |
| 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. | 139.949 | −2.263 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 87 | −1.576 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 139.96 | +1.454 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 97.773 | +0.957 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.061 | +0.347 |
Intercept 0.07 + feature contributions = -1.171 (log-odds).
Score = sigmoid(-1.171) = 0.237.
| Score | 0.115 |
|---|
| Score | 39 |
|---|
Run 1
The code is well-structured with clear separation of the enum, constructor, and getters. It avoids deep nesting and mostly follows one-action-per-line. Javadocs explain intent, especially for the constructor parameters. However, readability is hurt by a suspicious placeholder expression inside the hashCode() method: `{boolean lI0O_0380b76d=((0x4458^0x4458)!=0);lI0O_0380b76d=!(!lI0O_0380b76d);}` which is unexplained and confusing. Also, the `UpgradeType.fromCode()` method could be more concise using a switch expression. The `equals()` method is straightforward, but `upgradeType.equals()` lacks a potential null check, though it may be acceptable given constructor validation. Overall, the code is clear but the artifact in `hashCode()` reduces clarity and trust.
Run 2
The code is generally well-structured with clear class organization, appropriate use of enums, and good documentation. The constructor validation logic is explicit and understandable. However, there are notable readability issues: the hashCode() method contains an obfuscated line (seemingly dead/confusing code) that severely hurts clarity and should be removed. The equals() method has multiple conditional returns which slightly disrupt natural reading flow. The enum's fromCode() method uses an if-else chain instead of a switch, which is acceptable but slightly more verbose. The ternary-like boolean logic in hashCode is confusing and unnecessary. Overall, the code follows Java conventions well, but the mysterious boolean expression and redundant control flow prevent it from being highly readable.
Run 3
The code is well-structured with clear separation of concerns, minimal nesting, and consistent naming. The enum and constructor include useful documentation, and methods are concise with one action per line. However, a confusing obfuscated boolean fragment inside hashCode() severely hurts readability and appears to be erroneous or malicious. The equals method is logically structured, and the class follows a natural reading flow overall. If this stray block were removed, the code would be highly readable.
Run 1
Code Structure: The class is logically organized into fields, an enum, construction, accessors, and standard overrides, but hashCode contains an unrelated obfuscated block. Nesting: Mostly shallow, with straightforward validation and a simple conditional chain. Clarity of intent: Descriptive names and documentation explain feature updates well; the meaningless boolean manipulation and cryptic variable name obscure intent locally. Code length: Generally concise, though the dead block adds unnecessary code and fromCode could be more compact. Action granularity: Most lines perform one action, but the injected hashCode block compresses declaration and reassignment onto one line. Reading flow: Conventional ordering and guard clauses support natural reading; inconsistent formatting in hashCode abruptly interrupts that flow.
Run 2
Code Structure: Fields, enum, constructor, accessors, and overrides are logically organized, but an unrelated block disrupts hashCode. Nesting: Generally shallow, with straightforward validation and early returns. Clarity of intent: Descriptive names and documentation make the feature-update model clear; the cryptic variable and pointless bitwise/boolean operations in hashCode obscure intent. Code length: Mostly concise, although enum conversion is somewhat repetitive and the injected block is unnecessary. Action granularity: Most statements perform one action per line, but the hashCode block compresses declaration, calculation, and reassignment onto one line. Reading flow: Conventional Java organization supports natural reading, interrupted by the unindented obfuscated block and a few long lines.
Run 3
Code Structure: The class is logically organized into fields, an enum, validation, accessors, and standard overrides, but hashCode contains an unrelated obfuscated block. Nesting: Mostly shallow, with straightforward guards and a simple conditional chain. Clarity of intent: Descriptive names and documentation clarify feature updates; the cryptic variable and redundant Boolean operations obscure intent locally. Code length: Generally concise, though the dead block is unnecessary and fromCode could use a switch. Action granularity: Most statements perform one action per line, but the injected block compresses declaration and reassignment onto one line. Reading flow: Conventional Java organization supports natural reading, interrupted by the malformed-looking hashCode block, inconsistent spacing, and some long lines.