Sample
int-faea0136fcd1-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.861 | 0–1; higher is more readable |
| Dorn | 0.473 | 0–1; higher is more readable |
| Mi | 0.425 | 0–1; higher is more readable |
| LLOC | 24 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.713 | 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. | 1283.236 | −42.347 |
| Source linesThe number of non-empty source lines. | 72 | +28.8 |
| 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.543 | −6.815 |
Intercept 8.87 + feature contributions = -11.491 (log-odds).
Score = sigmoid(-11.491) = 0.
| Score | 0.861 |
|---|
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. | 73 | −1.548 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 58 | +1.269 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 107.973 | +0.938 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 58 | −0.91 |
| 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. | 107.986 | −0.909 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 71.899 | +0.595 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.057 | +0.386 |
Intercept 0.07 + feature contributions = -0.109 (log-odds).
Score = sigmoid(-0.109) = 0.473.
| Score | 0.425 |
|---|
| Score | 24 |
|---|
Run 1
The code has a clear purpose and logical class structure, with good documentation. However, readability is significantly hurt by the constructor's if-else inversion: `if (!((credential == 0))) {} else { throw ... }` is unnecessarily convoluted. A simple `if (credential == 0) throw ...` would be far clearer. The same pattern occurs in `credentialAddress()`. While the class is short and actions are generally one per line, the unnatural conditional style disrupts reading flow and obscures intent. Nesting is minimal, and the Javadoc is helpful, but this repeated awkward boolean logic is a major readability issue.
Run 2
The code has clear intent and reasonable structure, but several readability issues significantly reduce its score. The constructor includes a bizarre negated-if pattern `if (!((credential == 0))) {} else { throw ... }` which should simply be `if (credential == 0) throw ...`. The `credentialAddress()` method repeats this same awkward pattern. The `touch(Object hint)` method ignores its hint parameter and returns `this` without calling `super.touch(hint)`, which is misleading. The Javadoc is helpful but adds length without compensating for the confusing boolean logic. While the class is concise and flat, the unnatural control flow makes the code harder to understand than necessary.
Run 3
The code has clear documentation and logical structure, but readability is hurt by several issues. The constructor and credentialAddress method use awkward inverted boolean checks with empty if-branches and else-throw patterns (e.g., 'if (!((credential == 0))) {} else { throw... }'), which obscures intent and violates clean conditional logic. Nesting is shallow, but action granularity is inconsistent—multiple actions sometimes appear on one line. The class has a clear purpose and naming is mostly good, but the volatile boolean and reference-counting logic are not immediately obvious. The touch(Object hint) method returns 'this' without calling super, which may be intentional but adds ambiguity. Overall, it is maintainable but less readable than it could be with simpler guard clauses.
Run 1
Code Structure: The class is logically organized into fields, constructor, accessors, reference-count methods, and cleanup. Nesting: Very shallow, but empty if branches followed by else blocks create unnecessary complexity. Clarity of intent: Descriptive names and documentation clearly explain non-owning pointer semantics; negated conditions and redundant parentheses obscure otherwise straightforward validation. Code length: Appropriately short, with some necessary interface boilerplate and avoidable conditional verbosity. Action granularity: Most lines perform one action, although the compact empty-branch syntax reduces scanability. Reading flow: Methods follow a natural sequence, but the unusual validation style interrupts reading. Direct checks such as if (credential == 0) and if (released) would substantially improve readability.
Run 2
Code Structure: The class is logically organized around construction, accessors, reference counting, and release handling. Nesting: Control flow is shallow, but empty if branches followed by else blocks are awkward. Clarity of intent: Descriptive names and useful documentation clearly explain non-owning pointer semantics; negated conditions with redundant parentheses obscure otherwise simple validation checks. Code length: The implementation is compact, with reasonable interface-related boilerplate, though the conditionals could be shorter. Action granularity: Statements generally perform one action per line, but inline empty branches reduce visual clarity. Reading flow: Method ordering is natural and consistent; the unusual validation syntax interrupts an otherwise straightforward reading experience.
Run 3
Code Structure: The class is logically organized, with fields, constructor, accessors, reference-counting methods, and cleanup clearly separated. Nesting: Shallow throughout, although empty if branches followed by else blocks add unnecessary complexity. Clarity of intent: Descriptive names and useful documentation clearly explain non-owning pointer semantics; negated, excessively parenthesized conditions obscure otherwise simple validation and release checks. Code length: Concise overall, with short methods and justified interface overrides. Action granularity: Most lines perform one action, but inline empty branches reduce visual clarity. Reading flow: Method ordering and consistent annotations support natural reading, while the unusual conditional style interrupts it. Replacing these constructs with direct guard clauses would substantially improve readability.