Sample
int-495234eefe8f-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.839 | 0–1; higher is more readable |
| Dorn | 0.461 | 0–1; higher is more readable |
| Mi | 0.588 | 0–1; higher is more readable |
| LLOC | 29 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.482 | 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. | 1381.862 | −45.601 |
| Source linesThe number of non-empty source lines. | 81 | +32.4 |
| 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.55 | −6.825 |
Intercept 8.87 + feature contributions = -11.157 (log-odds).
Score = sigmoid(-11.157) = 0.
| Score | 0.839 |
|---|
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. | 82 | −1.867 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 67 | +1.58 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 67 | −1.117 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 107.988 | +0.938 |
| 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.927 | −0.906 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 80.872 | +0.721 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.053 | +0.425 |
Intercept 0.07 + feature contributions = -0.156 (log-odds).
Score = sigmoid(-0.156) = 0.461.
| Score | 0.588 |
|---|
| Score | 29 |
|---|
Run 1
The code suffers from severe structural problems. A block of unrelated temperature-variable code has been incorrectly pasted inside the retain() method, making the code uncompilable and completely breaking logical organization. This random insertion destroys the reading flow and makes the intent ambiguous. While the original class structure before the insertion appears reasonably organized with clear documentation and mostly one action per line, the unexpected nested block creates deep confusion. The code length is unnecessarily inflated, and the nesting becomes tangled due to the misplaced logic. The overall clarity is severely compromised, making the code nearly unreadable despite some good initial documentation and method separation.
Run 2
The code starts as a clear, well-documented wrapper class with logical structure and good naming conventions. However, it contains a severe flaw: a random, unrelated temperature-comparison block (lines 41-48) was inserted into the retain() method. This block has no connection to the class purpose, breaks the reading flow, adds gratuitous nesting, and creates syntactically confusing brace placement. The retain() method itself becomes ambiguous and potentially compilable but logically broken. Other methods are concise and follow one-action-per-line style, and the Javadoc is informative. Overall readability is significantly harmed by the inserted irrelevant code snippet, which contradicts the surrounding clarity and intent. Without that block, the class would score much higher (around 16-17).
Run 3
The code has clear structure with proper formatting and Javadoc, but contains a critical flaw: a random block of unrelated code (temperature variables) inserted in the middle of the retain() method. This breaks reading flow and clarity of intent. The class purpose is well-documented, naming is clear, and action granularity is mostly one action per line. Nesting is minimal (just one if-statement in the constructor). However, the stray code block makes the implementation confusing and unreadable. The methods are concise and the reference counting pattern is recognizable, but the accidental insertion undermines the entire file's readability. Without that extraneous block, the code would rate around 16-18; with it, the score drops significantly.
Run 1
Code Structure: The wrapper is logically organized into fields, construction, accessors, and lifecycle methods, but retain() contains an unrelated temperature-calculation block. Nesting: Mostly shallow; the extra block and conditional add unnecessary nesting. Clarity of intent: Descriptive names and documentation clearly explain non-owning pointer semantics, while the unused temperature calculation obscures retain()'s purpose. Code length: Generally concise, with straightforward overrides, but the unrelated block adds needless length. Action granularity: Statements mostly perform one action per line. Reading flow: Consistent method organization supports natural reading, but the poorly indented temperature block abruptly interrupts it.
Run 2
Code Structure: The wrapper is logically organized into initialization, accessors, reference-count operations, and deallocation, but unrelated temperature calculations disrupt retain(). Nesting: Most methods are flat; retain() adds an unnecessary block and conditional. Clarity of intent: Descriptive names and documentation clearly explain non-owning credential management, while the unused temperature calculation has no apparent purpose. Code length: The wrapper is reasonably concise apart from the extraneous block. Action granularity: Statements generally perform one action per line. Reading flow: Consistent method patterns are easy to follow, but the poorly indented temperature block abruptly interrupts the flow.
Run 3
Code Structure: The class is logically organized into fields, construction, accessors, and lifecycle methods, but retain() contains an unrelated temperature-calculation block. Nesting: Mostly flat, with shallow validation checks; the extra block adds unnecessary nesting. Clarity of intent: Descriptive names and documentation clearly explain non-owning credential semantics, while the unused temperature calculation obscures retain()'s purpose. Code length: Generally concise, with justified documentation and small methods, but the injected block adds needless length. Action granularity: Statements generally perform one action per line. Reading flow: Method ordering and consistent patterns support natural reading, but the temperature block's inconsistent indentation and irrelevant logic abruptly interrupt that flow.