Sample
int-dc545587e542-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.608 | 0–1; higher is more readable |
| Dorn | 0.313 | 0–1; higher is more readable |
| Mi | 0.034 | 0–1; higher is more readable |
| LLOC | 53 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.279 | 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. | 3574.395 | −117.955 |
| Source linesThe number of non-empty source lines. | 100 | +40 |
| 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.759 | −7.138 |
Intercept 8.87 + feature contributions = -76.223 (log-odds).
Score = sigmoid(-76.223) = 0.
| Score | 0.608 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 98 | +2.653 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 101 | −2.54 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 98 | −1.828 |
| 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. | 115.96 | −1.246 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 116 | +1.067 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 99.889 | +0.986 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.091 | +0.054 |
Intercept 0.07 + feature contributions = -0.784 (log-odds).
Score = sigmoid(-0.784) = 0.313.
| Score | 0.034 |
|---|
| Score | 53 |
|---|
Run 1
The code is well-structured with clear class organization and appropriate field declarations. It is mostly flat, though the constructor has some nested conditionals for address validation that could be extracted for clarity. Intent is clear through descriptive names and proper Javadoc. The code is concise overall, with only minor verbosity in the toString method. Action granularity is good, with one action per line in most places. There is an obfuscated dead-code line in the first constructor that does nothing and should be removed. The validation logic is readable but could be improved by extracting address validation into a separate private method. The reading flow is natural and the method ordering follows conventions. Overall it is highly readable with only minor issues.
Run 2
The code is generally well-structured with clear class purpose and method separation, but has several readability issues. The constructor contains an obfuscated no-op statement with meaningless variable names that serves no purpose, which severely damages clarity. The nested if-else validation logic in the constructor could be extracted into helper methods to reduce nesting and improve action granularity. Most methods are concise and follow single-action-per-line principles, with clear naming conventions. The toString method uses good string building practices. Package imports are clean. Overall the code would score higher (around 18) without the obfuscated line and with extracted validation methods. The validation logic mixes multiple concerns (address type checking, domain conversion, port validation) in one block, making it harder to follow than necessary. Code length is reasonable for the functionality provided.
Run 3
The code is generally well-structured and readable. It has a clear class purpose, logical constructor validation, clean getter methods, and a straightforward toString implementation. Nesting is moderate: the address validation uses three levels of if/else-if nesting, but remains understandable. Intent is clear throughout. The main issues are a stray obfuscated no-op line inside the two-argument constructor (an empty statement with meaningless variable), slightly verbose validation logic that could be extracted to a helper method, and minor inconsistency in exception messages (mixing colon and parentheses styles). The toString method is flat and readable but somewhat long. Overall, the code is concise for its purpose, with one action per line in most places and natural reading flow, making it easily maintainable.
Run 1
Code Structure: Fields, constructors, accessors, and formatting are logically organized. Nesting: Address validation reaches three conditional levels but remains manageable. Clarity of intent: Validation and response representation are clear, but the meaningless arithmetic block with an opaque variable name obscures intent. Code length: Mostly appropriate; repetitive string-building statements add some verbosity, and the arithmetic block is unnecessary. Action granularity: Most statements perform one action per line, but the injected block compresses several operations into one line. Reading flow: Generally natural, progressing from validation to initialization and accessors, but the unindented, irrelevant block abruptly disrupts the constructor.
Run 2
Code Structure: Fields, constructors, accessors, and string formatting are logically organized, but an unrelated no-op block disrupts the constructor. Nesting: Address validation reaches three conditional levels, adding moderate complexity. Clarity of intent: Descriptive names and explicit validation messages make the response model clear; the cryptic variable and pointless arithmetic obscure intent locally. Code length: Mostly appropriate for the class, although the no-op block is unnecessary and string formatting is somewhat verbose. Action granularity: Most lines perform a single action, but the injected block compresses multiple statements and a ternary expression onto one line. Reading flow: Conventional Java layout and predictable method order support natural reading, interrupted by the unindented, obfuscated block.
Run 3
Code Structure: Fields, constructors, accessors, and string formatting are logically organized, but an unrelated no-op block disrupts the constructor. Nesting: Address validation reaches three conditional levels, adding moderate complexity; other methods are flat. Clarity of intent: Descriptive types, validation messages, and straightforward accessors make the main purpose clear, while the cryptic variable and pointless arithmetic obscure intent locally. Code length: Mostly appropriate, though the no-op block is unnecessary and string-building is somewhat repetitive. Action granularity: Most lines perform one action, but the injected block compresses several statements and a ternary expression onto one line. Reading flow: Generally natural and consistent, with the unindented, obfuscated block creating a conspicuous interruption.