Sample
int-71e1cd2e24fd-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.654 | 0–1; higher is more readable |
| Dorn | 0.303 | 0–1; higher is more readable |
| Mi | 0.133 | 0–1; higher is more readable |
| LLOC | 40 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 13.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.397 | 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. | 3229.163 | −106.562 |
| Source linesThe number of non-empty source lines. | 128 | +51.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. | 5.103 | −7.655 |
Intercept 8.87 + feature contributions = -54.148 (log-odds).
Score = sigmoid(-54.148) = 0.
| Score | 0.654 |
|---|
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. | 129 | −3.531 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 121 | +3.448 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 121 | −2.356 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 127.847 | +1.377 |
| 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. | 116.992 | −1.29 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 116.93 | +1.082 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.059 | +0.365 |
Intercept 0.07 + feature contributions = -0.834 (log-odds).
Score = sigmoid(-0.834) = 0.303.
| Score | 0.133 |
|---|
| Score | 40 |
|---|
Run 1
The code is generally well-structured with clear separation of interface methods (WebSocketContainer vs ServerContainer sections), flat nesting, and consistent naming. However, readability is significantly harmed by an injected obfuscated line of dead code (a meaningless switch statement with bitwise operations), which disrupts the natural reading flow and raises concerns about code integrity. The method implementations are concise and follow a clear pattern of throwing UnsupportedOperationException, but the action granularity is slightly reduced by multi-line method signatures with wrapped parameters. Overall, the code would be highly readable without the obfuscated line, which appears to be an artifact or intentional noise.
Run 2
The code structure starts acceptably with clear getters/setters, but an obfuscated line containing meaningless switch logic completely breaks readability. Nesting is minimal, which is good, but the obfuscated code creates confusion. Clarity of intent is generally fine for a mock class, though the obfuscation destroys trust. Length is reasonable and action granularity is mostly one action per line. Reading flow is severely disrupted by the unexplained obfuscated line. Overall, the code would be readable if not for the inserted obfuscation, which makes it unacceptable for production readability standards.
Run 3
The code is generally well-structured and readable, with clear package and import organization, consistent formatting, and straightforward getter/setter methods. However, it contains a suspicious obfuscated block (a switch statement with hexadecimal values and an unused variable) inside getDefaultMaxSessionIdleTimeout that serves no purpose and significantly hurts clarity. Nesting is flat, intent is mostly clear (mock implementation throwing UnsupportedOperationException for unsupported operations), and the code is concise. Reading flow is natural except for that odd injected block. Action granularity is good with one operation per line.
Run 1
Code Structure: Fields, accessors, and interface methods are logically grouped with helpful section comments. Nesting: Most methods are flat, but an unnecessary nested block and switch complicate one getter. Clarity of intent: Descriptive names, documentation, and explicit unsupported-operation messages clearly convey the mock's purpose; the cryptic variable and no-op bitwise operations obscure intent locally. Code length: Generally concise for an interface implementation, though the injected block adds needless code. Action granularity: Most statements occupy separate lines, but the entire injected block compresses multiple actions onto one line. Reading flow: Consistent formatting and predictable method ordering make the class easy to scan, except for the unindented, obfuscated block interrupting an otherwise straightforward getter.
Run 2
Code Structure: Logically grouped fields and interface methods make the mock implementation easy to navigate. Nesting: Most methods are flat, but an unnecessary block and switch introduce distracting nesting in one getter. Clarity of intent: Descriptive names, documentation, and explicit unsupported-operation messages clearly communicate purpose; the cryptic variable and no-op bitwise operations obscure intent locally. Code length: Generally concise for an interface implementation, although the injected block adds needless code. Action granularity: Most lines perform one action, but the entire injected block compresses declarations, branching, assignments, and control flow onto one line. Reading flow: Consistent formatting and predictable getters/setters support natural reading, interrupted sharply by the unindented, obfuscated block.
Run 3
Code Structure: Methods are logically grouped by interface, with consistent getter/setter organization. Nesting: Most methods are flat, but an unnecessary block and switch introduce distracting nesting in one getter. Clarity of intent: Descriptive names and explicit unsupported-operation messages clearly convey the mock's purpose; the obfuscated variable and no-op switch obscure intent locally. Code length: The implementation is appropriately concise for its interface requirements, apart from the injected redundant code. Action granularity: Most lines perform a single action, but the compressed switch line combines declaration, branching, assignments, and control flow. Reading flow: Consistent formatting and method ordering support natural reading, while the unindented, densely packed no-op block abruptly disrupts it.