Sample
int-4a130346f14b-SRC
Unmodified source class
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.33 | 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 well-structured, with a clear main method, proper try-finally resource handling, and a straightforward Netty server bootstrap pattern. Nesting is minimal—only an anonymous ChannelInitializer inner class—keeping the logic flat. Intent is clear: a simple server that discards messages, supported by a concise class comment. Code length is appropriate; there's no unnecessary duplication or verbosity. Each line generally performs one action, improving readability. The reading flow follows a natural setup-bind-wait sequence, with comments clarifying non-obvious points like the blocking sync calls. Minor deductions: the static PORT parsing and handler declaration could be grouped more logically, and the anonymous inner class adds slight friction compared to a lambda or named class. Overall, highly readable with only trivial improvements possible.
Run 2
The code is well-structured with clear separation of concerns: configuration, initialization, and lifecycle management. Nesting is minimal—only the anonymous ChannelInitializer adds a second level, used appropriately. Intent is evident from descriptive names and comments, making the server's purpose clear. Code length is concise and avoids unnecessary boilerplate. Action granularity is mostly one action per line, though chained builder calls combine multiple steps, which is idiomatic Netty style and still readable. Reading flow follows a natural top-down sequence: setup, bind, wait, shutdown. The main weakness is the static PORT initialization using System.getProperty, which is slightly less discoverable than a constructor parameter or config class. Overall, the code is very readable for developers familiar with Netty conventions.
Run 3
The code is well-structured with clear separation of concerns and follows standard Netty patterns. It has minimal nesting, clear intent through descriptive naming, and appropriate use of try-finally for resource cleanup. The main method flows logically: setup, configuration, binding, and shutdown. The anonymous inner class for ChannelInitializer adds slight complexity but is idiomatic Netty. Comments clarify the blocking behavior effectively. Overall, highly readable with minor room for improvement in extracting the channel initializer for testability.
Run 1
Code Structure: Logically organized into configuration, initialization, server startup, waiting, and cleanup. Nesting: Limited overall, although the anonymous ChannelInitializer adds indentation within the fluent configuration chain. Clarity of intent: Netty API names and comments explain the server lifecycle clearly; abbreviated variables b, f, and ch and awkward class documentation slightly weaken clarity. Code length: Concise, with little unnecessary code. Action granularity: Statements generally perform one logical action, and fluent configuration calls are separated onto individual lines. Reading flow: Execution proceeds naturally from setup to binding, waiting, and graceful shutdown, with whitespace separating phases.
Run 2
Code Structure: Logically organized into configuration, server initialization, binding, waiting, and cleanup, with reliable resource cleanup in finally. Nesting: Mostly shallow; the anonymous channel initializer adds modest nesting without obscuring control flow. Clarity of intent: Netty API calls and lifecycle comments clearly communicate the server setup, but abbreviated names b, f, and ch reduce clarity, and the message-discarding behavior resides in an unseen handler. Code length: Concise and proportionate to its purpose, though the shutdown comment could be shorter. Action granularity: Most statements perform one coherent action, and the fluent configuration chain places each configuration step on its own line. Reading flow: Execution proceeds naturally from setup through shutdown, aided by consistent indentation and whitespace. Minor improvements include descriptive variable names and clearer introductory documentation.
Run 3
Code Structure: Logically organized into configuration, server setup, execution, and cleanup, with try/finally making resource management clear. Nesting: Mostly shallow, although the anonymous ChannelInitializer inside the fluent configuration adds a small nested section. Clarity of intent: Netty method names and comments explain the server lifecycle well; abbreviated variables b, f, and ch and the awkward class documentation slightly reduce clarity. Code length: Concise, with little unnecessary code, though the shutdown comment could be shorter. Action granularity: Statements generally perform one coherent action, and chained configuration calls occupy separate lines. Reading flow: Setup, binding, waiting, and cleanup follow a natural sequence, supported by consistent indentation and spacing.