Sample
int-86a7b35867cd-I11
Split eligible integer literals into pairs of short-named intermediate variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.636 | 0–1; higher is more readable |
| Dorn | 0.303 | 0–1; higher is more readable |
| Mi | 0.035 | 0–1; higher is more readable |
| LLOC | 59 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.67 | 0–20; mean of three runs |
| BTTF | 0.253 | 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. | 3832.652 | −126.478 |
| Source linesThe number of non-empty source lines. | 106 | +42.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.626 | −6.939 |
Intercept 8.87 + feature contributions = -82.147 (log-odds).
Score = sigmoid(-82.147) = 0.
| Score | 0.636 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 104 | +2.86 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 107 | −2.752 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 104 | −1.966 |
| 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.963 | −1.247 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 105.957 | +1.071 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 116 | +1.067 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.091 | +0.061 |
Intercept 0.07 + feature contributions = -0.835 (log-odds).
Score = sigmoid(-0.835) = 0.303.
| Score | 0.035 |
|---|
| Score | 59 |
|---|
Run 1
The code is generally well-structured with clear field declarations, a clean constructor chain, and simple accessor methods. However, several issues reduce readability. The constant declarations in the constructor (a=127, b=128, etc.) are cryptic and obscure the intended numeric bounds; this adds unnecessary indirection and hurts clarity of intent. The validation logic uses nested if-else blocks, making it moderately deep and harder to follow. Some magic numbers remain, despite constants, because the names do not convey meaning. The port validation check also uses fragmented arithmetic instead of clear range literals. While methods are short and focused, and the class follows a logical order, the use of meaningless variable names and nested conditionals detracts from readability. Overall, the code is understandable but would benefit from clearer constants, flatter validation logic, and more descriptive names.
Run 2
The class has a clear purpose and follows a standard Netty codec pattern with proper validation, but readability suffers significantly. The code introduces cryptic local variables like 'a', 'b', 'c', 'd', etc., which obscure constants (127 + 128, 1 + -1, 32767 + 32768) instead of using named constants or direct values. The nested validation logic for address types is moderately deep but acceptable. The toString method is verbose with repetitive append calls but follows a predictable structure. Overall organization is logical, and method names are clear. However, the pointless arithmetic constants and magic numbers severely hurt clarity, making the code harder to understand than necessary.
Run 3
The code is generally well-structured with clear class purpose, consistent formatting, and logical method organization. Validation logic is properly separated in the constructor, and getters are straightforward. However, readability is significantly hurt by obscure variable names like 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h' that replace meaningful constants (e.g., 127, 128, 0, 65535, 64). This forces readers to mentally decode simple values, reducing clarity. The domain name length check uses (a + b) instead of just 255, adding unnecessary complexity. While nesting is moderate and flow of the validation is acceptable, the intent of these numeric checks is less transparent than it could be. Action granularity is generally good, with one operation per line. The toString() method is readable despite some repetition. Overall, the code is functional and maintainable but would benefit from clearer constant naming and simpler numeric conditions.
Run 1
Code Structure: Fields, constructors, accessors, and string formatting are logically organized. Nesting: Address validation reaches three conditional levels, making it moderately harder to scan, while other methods remain flat. Clarity of intent: Types, validation helpers, and exception messages communicate purpose well, but meaningless variables a–h and arithmetic expressions obscure straightforward limits and buffer capacity. Code length: Accessors are appropriately concise; unnecessary constant declarations and repetitive append calls add avoidable length. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Validation followed by field assignment provides a natural progression, and formatting is consistent, but artificial arithmetic interrupts comprehension. Overall, the class is readable despite conspicuous obfuscation of simple numeric values.
Run 2
Code Structure: Well organized into immutable fields, constructors, accessors, and a string representation. Nesting: Address validation reaches three conditional levels, but remains manageable; other methods are flat. Clarity of intent: Descriptive class and method names and explicit validation messages communicate purpose, but arbitrary variables a through h and arithmetic expressions obscure straightforward limits and buffer capacity. Code length: Mostly appropriate, though unnecessary constant declarations and verbose append sequences add bulk. Action granularity: Consistently uses one operation per line, making validation and field assignment easy to follow. Reading flow: Construction proceeds naturally from validation to assignment, followed by accessors and formatting; artificial numeric decomposition interrupts otherwise clear reading.
Run 3
Code Structure: Fields, constructors, accessors, and string formatting are logically organized with clear responsibilities. Nesting: Address validation reaches three conditional levels, but remains manageable; other methods are mostly flat. Clarity of intent: Class and method names, validation helpers, and informative exceptions communicate purpose well. However, single-letter constants and arithmetic expressions obscure straightforward limits and buffer capacity. Code length: Mostly appropriate, though artificial constants and repetitive append calls add unnecessary length. Action granularity: Statements generally perform one action per line, making validation and assignments easy to follow. Reading flow: Consistent formatting and conventional method ordering support natural reading, but arbitrary numeric decompositions interrupt comprehension and require needless mental calculation.