Sample
int-131d3e712eca-I12
Inline all eligible single-use intermediate local variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.653 | 0–1; higher is more readable |
| Dorn | 0.324 | 0–1; higher is more readable |
| Mi | 0.034 | 0–1; higher is more readable |
| LLOC | 51 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.428 | 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. | 3307.446 | −109.146 |
| Source linesThe number of non-empty source lines. | 98 | +39.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.668 | −7.002 |
Intercept 8.87 + feature contributions = -68.077 (log-odds).
Score = sigmoid(-68.077) = 0.
| Score | 0.653 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 96 | +2.583 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 99 | −2.469 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 96 | −1.782 |
| 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.98 | −1.247 |
| 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. | 97.897 | +0.959 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.088 | +0.084 |
Intercept 0.07 + feature contributions = -0.735 (log-odds).
Score = sigmoid(-0.735) = 0.324.
| Score | 0.034 |
|---|
| Score | 51 |
|---|
Run 1
The code demonstrates good structure and clarity. The class has a clear single responsibility, and method organization follows a logical pattern (constructors, then getters, then toString). Validation is handled properly at construction time rather than being scattered. The nesting level in the constructor reaches three levels deep, but this is reasonable for address validation logic and remains readable. Method names are concise and self-documenting. The toString method flows well with a clear conditional branch for including decoder results. One minor readability concern is having multiple method calls on separate lines in the toString method, which slightly increases code length, but this actually improves readability by keeping each logical step distinct. The constructor parameter validation is appropriately placed with clear error messages. Overall, the code follows good Java conventions and is very maintainable.
Run 2
The code is well-structured with clear separation of concerns: validation in the constructor, getters, and a readable toString method. Nesting is moderate, with validation logic for address types remaining at two levels, which is acceptable. Intent is clearly conveyed through field names, constructor parameters, and exception messages. Code length is appropriate for the functionality, avoiding unnecessary verbosity. Most actions are on separate lines, especially in the toString method. The reading flow is natural, with validation followed by assignment and organized toString output. Minor readability improvements could include extracting the address validation into a private method to reduce constructor nesting and length, but overall the code is concise and understandable.
Run 3
The code is well-structured and readable for a Netty handler. Package/imports are clean, the class has a focused single responsibility, and method organization follows a logical order: constructor, validation, accessors, toString. The validation logic in the constructor is the weakest part: the chain of if/else-if checks adds some nesting, but each branch handles one address type and validation is explicit. Action granularity is generally one action per line, though the constructor contains multiple validation steps. Naming is clear (status, bndAddrType, bndAddr, bndPort). The toString method is verbose by necessity but follows a predictable pattern. Code length is reasonable for the requirements. Overall, this is production-quality code with minor nesting complexity in the constructor's address validation. A small refactor extracting validation into helper methods could push it higher.
Run 1
Code Structure: Fields, constructors, accessors, and string formatting are logically organized with clear separation of responsibilities. Nesting: Address validation reaches three conditional levels, but the branches remain easy to follow. Clarity of intent: Type names, validation utilities, and descriptive exception messages make the purpose clear; abbreviated bnd names require some protocol familiarity. Code length: The class is reasonably concise, though repetitive validation branches and string-builder calls add verbosity. Action granularity: Statements generally perform one action per line, making validation and initialization easy to scan. Reading flow: The progression from input checks through field assignment to accessors and diagnostic output is natural and consistent.
Run 2
Code Structure: Logically organized into immutable fields, constructors, accessors, and string formatting; validation is grouped coherently. Nesting: Address validation reaches three conditional levels, adding modest complexity, while other methods remain flat. Clarity of intent: Type names, validation utilities, and descriptive exception messages clearly communicate purpose, though abbreviated bnd names require SOCKS context. Code length: Mostly concise; standard accessor boilerplate and repetitive StringBuilder calls add some length without obscuring behavior. Action granularity: Each statement generally performs one action, making validation and field initialization easy to follow. Reading flow: Construction proceeds naturally from null checks through address and port validation to assignment, followed by accessors and diagnostics. Minor drawbacks include mutating the address parameter during normalization and long declaration and exception lines.
Run 3
Code Structure: Fields, constructors, accessors, and string formatting are logically organized, with validation grouped before initialization. Nesting: Address validation reaches three conditional levels, but branches remain short and manageable. Clarity of intent: Type-specific checks, descriptive exception messages, and straightforward accessors make the purpose clear; abbreviated bound-address names require some SOCKS familiarity. Code length: Appropriate overall, though repetitive validation and StringBuilder calls add minor verbosity. Action granularity: Nearly every line performs a single action, making operations easy to track. Reading flow: Constructor delegation, validation, assignment, and accessors follow a natural sequence; toString builds output predictably. Minor readability limitations include nested validation, sparse explanatory documentation, and long exception lines.