Sample
int-066e7c076d4e-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.622 | 0–1; higher is more readable |
| Dorn | 0.182 | 0–1; higher is more readable |
| Mi | 0.046 | 0–1; higher is more readable |
| LLOC | 33 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 12.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.299 | 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. | 3048.7 | −100.607 |
| Source linesThe number of non-empty source lines. | 93 | +37.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.877 | −7.316 |
Intercept 8.87 + feature contributions = -61.853 (log-odds).
Score = sigmoid(-61.853) = 0.
| Score | 0.622 |
|---|
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. | 150.979 | −2.73 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 94 | −2.292 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 82 | +2.099 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 150.989 | +1.632 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 82 | −1.461 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 92.829 | +0.888 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.067 | +0.291 |
Intercept 0.07 + feature contributions = -1.503 (log-odds).
Score = sigmoid(-1.503) = 0.182.
| Score | 0.046 |
|---|
| Score | 33 |
|---|
Run 1
The code is generally readable but has one obvious defect. The static initialization block, constructor, properties() method, equals(), and toString() follow clear logical structure with good naming conventions. Nesting is minimal and the action granularity is mostly one action per line. However, the hashCode() method contains unrelated junk code (a for loop toggling a boolean featureEnabled) that is clearly a copy-paste or merge error. This breaks reading flow, violates clarity of intent, and would not compile cleanly (unused local variable). The properties() method is concise, well-documented, and handles overflow gracefully. Overall structure is sound, but the hashCode() artifacts reduce readability significantly.
Run 2
The code is generally well-structured with clear intent and good readability. It follows logical organization with appropriate class inheritance, constants, and method overriding. Nesting is minimal and the methods follow a clear flow. However, there is a significant issue in the hashCode() method: it contains an arbitrary, unrelated code block with a loop toggling a boolean variable that appears to be dead code, which severely harms clarity and intent. Aside from that anomaly, the code uses clear naming, reasonable method lengths, and action granularity is mostly one action per line. The Javadoc and comments effectively explain non-obvious logic such as the override precedence and retention calculation. The equals/hashCode/toString implementations are standard and readable. Overall, the code is highly readable barring the inexplicable block in hashCode().
Run 3
The code has clear structure and intent with a well-designed class hierarchy and sensible static initialization for default properties. The properties method follows a clear override precedence pattern with good comments. However, there is a severe readability issue: the hashCode method contains completely unrelated dead code (a feature toggle loop) that serves no purpose and breaks reading flow. This obfuscates the method's purpose. The code also has some minor verbosity in equals and toString. The nesting is mostly flat (good), but the overall readability score drops significantly due to the confusing dead code block. Without that section, the code would score around 16-18.
Run 1
Code Structure: The class is logically organized into defaults, construction, configuration, and standard overrides, but hashCode contains an unrelated toggle loop. Nesting: Generally shallow; the retention conditional with try/catch is manageable, while the extra block and loop add needless nesting. Clarity of intent: Descriptive names and documentation explain configuration precedence and retention handling. The unused featureEnabled variable and loop have no apparent purpose. Code length: Mostly concise, though the dead toggle block adds unnecessary lines and some expressions are long. Action granularity: Statements generally perform one action per line, with readable separation of configuration steps. Reading flow: Most methods follow a natural sequence, but inconsistent indentation and irrelevant logic in hashCode disrupt an otherwise straightforward class.
Run 2
Code Structure: The class is logically organized into initialization, construction, configuration, and standard object methods, but hashCode contains an unrelated toggle loop. Nesting: Mostly shallow, with reasonable if and try/catch blocks; the extra block and loop in hashCode add unnecessary nesting. Clarity of intent: Descriptive names and documentation explain configuration precedence and retention handling, but the unused featureEnabled variable obscures hashCode's purpose. Code length: Generally concise, though the toggle block is unnecessary and several declarations are overly long. Action granularity: Most lines perform a single action, making operations easy to follow. Reading flow: Configuration assembly and guard clauses read naturally; inconsistent indentation in hashCode and the irrelevant inserted logic disrupt an otherwise coherent flow.
Run 3
Code Structure: Mostly well organized into initialization, configuration, and standard object methods, but the unrelated toggle block in hashCode disrupts cohesion. Nesting: Generally shallow; the retention calculation uses manageable if/try/catch nesting, while hashCode adds an unnecessary block and loop. Clarity of intent: Descriptive names and documentation clearly explain configuration precedence and retention handling, but featureEnabled and toggleCount have no meaningful purpose. Code length: Mostly concise, though the dead toggle code adds needless length and some declarations are overly long. Action granularity: Statements generally perform one action per line; chained equality checks and string construction remain understandable. Reading flow: Method order and early returns support natural reading, but inconsistent indentation in hashCode and the unexplained toggle logic interrupt the flow.