Sample
int-07a1122f54cc-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.77 | 0–1; higher is more readable |
| Dorn | 0.623 | 0–1; higher is more readable |
| Mi | 0.312 | 0–1; higher is more readable |
| LLOC | 13 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.653 | 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. | 1782.669 | −58.828 |
| Source linesThe number of non-empty source lines. | 49 | +19.6 |
| 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.54 | −6.809 |
Intercept 8.87 + feature contributions = -37.168 (log-odds).
Score = sigmoid(-37.168) = 0.
| Score | 0.77 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 42 | +0.716 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 49 | −0.699 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 90 | +0.648 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 42 | −0.543 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 48.945 | +0.274 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.078 | +0.181 |
| 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. | 89.92 | −0.143 |
Intercept 0.07 + feature contributions = 0.504 (log-odds).
Score = sigmoid(0.504) = 0.623.
| Score | 0.312 |
|---|
| Score | 13 |
|---|
Run 1
The code is generally well-structured and readable. It follows standard Netty server bootstrap patterns with clear separation of concerns. The class has a single responsibility, proper encapsulation with a private constructor, and logical grouping of imports. The main method has a clear flow: setup, bind, wait, cleanup. Nesting is minimal—only one anonymous inner class with a one-line method. The intent is clear through descriptive naming and helpful comments. Code length is appropriate for a server bootstrap example. Each line performs a distinct action, especially in the fluent configuration chain. Reading flow is natural, moving from configuration to execution to shutdown. Minor deductions: the static handler field could be explained, and the anonymous inner class could be a lambda for brevity, but these don't significantly impact readability.
Run 2
The code is generally clear and well-structured. Imports are organized, the class has a clear purpose with a Javadoc comment, and key methods like main() follow a logical flow. Nesting is minimal—only one anonymous inner class is used, which is standard Netty style and not overly complex. Intent is evident: configure a server, bind to a port, and wait for shutdown. Code length is appropriate, though a few lines (e.g., b.group().channel().handler().childHandler()) chain multiple actions, slightly reducing granularity. Reading flow is natural, aided by meaningful comments explaining the bind and blocking behavior. Minor deductions: the static handler field could be explained, and the anonymous ChannelInitializer adds a small amount of nesting, but overall the code is highly readable.
Run 3
The code is well-structured and follows clean coding practices. Imports are organized logically, and the class has a clear single responsibility. Nesting is minimal, with only one anonymous inner class for channel initialization. Variable and method names clearly express intent (e.g., 'group', 'bootstrap', 'shutdownGracefully'). The code is concise—no unnecessary boilerplate or duplication. Each action (group assignment, bootstrap configuration, binding, syncing) is on its own line or grouped logically, maintaining one-action-per-line granularity. Reading flow is natural: setup, try-finally resource cleanup, bind, then wait for shutdown. Comments explain non-obvious behavior without being excessive. Minor deductions: the anonymous ChannelInitializer could be replaced with a lambda for slightly better readability, and the static 'handler' is shared across channels, which is implicit but not obvious. Overall, highly readable Netty server code.
Run 1
Code Structure: Logically organized into configuration, server setup, connection handling, and cleanup; try/finally clearly separates lifecycle responsibilities. Nesting: Mostly shallow, though the anonymous ChannelInitializer adds moderate nesting within the fluent configuration. Clarity of intent: Netty API calls and lifecycle comments explain the purpose well, but abbreviated names b, f, and ch and awkward class documentation reduce clarity. Code length: Compact and appropriate, with little unnecessary code; the shutdown comment could be shorter. Action granularity: Statements generally perform one logical action, and fluent configuration places each setup step on its own line. Reading flow: Execution proceeds naturally from initialization through binding, waiting, and shutdown. Consistent indentation helps, although spacing between the package declaration and imports would improve visual organization.
Run 2
Code Structure: Logically organized into configuration, server setup, connection handling, execution, and cleanup. Nesting: Mostly shallow, though the anonymous ChannelInitializer inside the fluent configuration adds some visual depth. Clarity of intent: Netty API calls and lifecycle comments make the purpose clear, but abbreviated names such as b, f, and ch are less descriptive, and the introductory documentation is awkwardly phrased. Code length: Compact and appropriate, with little unnecessary code. Action granularity: Statements generally express one logical action, and chained configuration calls are placed on separate lines for easy scanning. Reading flow: Naturally progresses from initialization to binding, waiting, and shutdown; consistent indentation helps. More descriptive local names and clearer introductory documentation would improve readability.
Run 3
Code Structure: Logically organized into configuration, server setup, binding, waiting, and cleanup; try/finally makes resource management clear. Nesting: Mostly shallow, although the anonymous ChannelInitializer adds a modest nesting level. Clarity of intent: Netty API names and lifecycle comments explain the server's purpose, but abbreviated variables b, f, and ch and awkward class documentation reduce clarity. Code length: Concise and appropriate for a small server example, with little unnecessary code. Action granularity: Statements generally perform one clear action, and the fluent configuration chain places each operation on its own line. Reading flow: Execution follows a natural setup-to-shutdown sequence with consistent indentation and useful spacing. More descriptive variable names and clearer introductory documentation would improve readability.