Sample
int-ba69223fdeaa-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.657 | 0–1; higher is more readable |
| Dorn | 0.325 | 0–1; higher is more readable |
| Mi | 0.031 | 0–1; higher is more readable |
| LLOC | 51 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.33 | 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. | 3334.971 | −110.054 |
| 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.671 | −7.007 |
Intercept 8.87 + feature contributions = -68.991 (log-odds).
Score = sigmoid(-68.991) = 0.
| Score | 0.657 |
|---|
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.97 | −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.872 | +0.958 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.088 | +0.086 |
Intercept 0.07 + feature contributions = -0.733 (log-odds).
Score = sigmoid(-0.733) = 0.325.
| Score | 0.031 |
|---|
| Score | 51 |
|---|
Run 1
The code is well-structured with clear separation of concerns: fields, constructors, accessors, and toString are logically ordered. Nesting is minimal, with only one validation block containing if-else chains. Intent is explicit through method names, validation messages, and Javadoc. Code length is appropriate—concise yet thorough in validation. Action granularity is good, with single actions per line mostly, though some conditionals could be split for readability. Reading flow is natural: validation first, then assignment. Minor improvements could include extracting the address validation block into a private method to reduce constructor length and flatten the bndAddr validation slightly. Overall, the code is highly readable with clear defensive programming, consistent naming conventions, and well-formed toString output logic.
Run 2
The code is well-structured and follows clean coding principles. The class has a clear single responsibility, fields are logically organized, and the constructor validates inputs sensibly. Nesting is moderate—only one conditional block exists, but it contains multiple branches for address type validation. Intent is clear from method and variable names, though some abbreviations like 'bnd' reduce clarity slightly. Code length is appropriate; no unnecessary duplication or bloat. Actions are generally one-per-line, especially in the toString method which follows a consistent append pattern. Reading flow is natural, with getters grouped and toString at the end. Minor improvements would be extracting the address validation logic into a separate method to reduce nesting and improve readability further, but overall this is professional-grade, readable code.
Run 3
The code is generally readable and well-structured. It follows a logical organization with clear field declarations and a straightforward constructor. Nesting is moderate but not egregious—validation branches are appropriately flat. Intent is clear: the class is a SOCKS5 command response with validation and getters. Action granularity is mostly one action per line, which enhances clarity. The toString method is verbose but conventional for Netty. However, the constructor mixes assignment, validation, and mutation (IDN.toASCII reassignment) in one block, which slightly muddies reading flow. Some error messages are verbose, but not excessively. Overall, this is maintainable and understandable code.
Run 1
Code Structure: Fields, constructors, accessors, and string formatting are logically organized, with validation grouped before assignment. Nesting: Address validation reaches three conditional levels, adding some complexity, while other methods remain flat. Clarity of intent: Types, method names, and descriptive exception messages make the purpose clear; abbreviated names such as bndAddr and hexadecimal constants slightly reduce accessibility. Code length: Appropriate overall, though repeated address-validation patterns and numerous append calls add verbosity. Action granularity: Each statement performs a focused action, with no crowded multi-action lines. Reading flow: Constructor delegation, validation, initialization, and simple accessors follow a natural sequence; toString is straightforward but somewhat repetitive.
Run 2
Code Structure: Clear organization into immutable fields, constructors, accessors, and string formatting. Nesting: Address validation reaches three conditional levels, adding some complexity, but remains manageable. Clarity of intent: Types, validation methods, and descriptive exception messages make the purpose clear; abbreviated bnd names and hexadecimal constants slightly reduce accessibility. Code length: Mostly concise, although repeated validation patterns and numerous StringBuilder append statements add verbosity. Action granularity: Statements generally perform one action per line, making execution easy to follow. Reading flow: Validation precedes field assignment, and methods follow a predictable order. Minor formatting issues, such as missing separation between the package declaration and imports, slightly weaken presentation.
Run 3
Code Structure: Well organized into immutable fields, constructors, accessors, and string formatting. Nesting: Address validation reaches three conditional levels, making the constructor slightly harder to scan, but nesting remains manageable. Clarity of intent: Types, validation helpers, and explicit error messages clearly communicate purpose; abbreviated bound-address names and hexadecimal limits require some interpretation. Code length: Mostly concise, although repetitive validation branches and StringBuilder appends add verbosity. Action granularity: Each statement generally performs one action, with validation, assignments, and formatting clearly separated. Reading flow: Natural progression from validation to initialization, then accessors and diagnostics; consistent formatting supports readability.