Sample
int-f99ba0db9a37-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.751 | 0–1; higher is more readable |
| Dorn | 0.607 | 0–1; higher is more readable |
| Mi | 0.442 | 0–1; higher is more readable |
| LLOC | 16 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 14 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.67 | 0–20; mean of three runs |
| BTTF | 0.401 | 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. | 1935.261 | −63.864 |
| Source linesThe number of non-empty source lines. | 55 | +22 |
| 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.566 | −6.849 |
Intercept 8.87 + feature contributions = -39.842 (log-odds).
Score = sigmoid(-39.842) = 0.
| Score | 0.751 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 48 | +0.923 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 55 | −0.911 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 48 | −0.681 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 89.982 | +0.647 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 54.945 | +0.358 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.079 | +0.175 |
| 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.982 | −0.146 |
Intercept 0.07 + feature contributions = 0.436 (log-odds).
Score = sigmoid(0.436) = 0.607.
| Score | 0.442 |
|---|
| Score | 16 |
|---|
Run 1
The code has a clear purpose and mostly follows standard Netty patterns with reasonable structure. However, several issues reduce readability. There's an inexplicable dead-code block containing an unused local variable calculation, which is confusing and detracts from clarity. The b.group(...).channel(...).handler(...).childHandler(...) chain spans multiple lines with inconsistent indentation, though this is common in Netty examples. The anonymous inner class adds nesting but is idiomatic. Comments are helpful, but the overall flow is interrupted by the dead code. The code is otherwise concise and each line performs a single logical action.
Run 2
The code has good overall structure with clear separation of concerns and readable Netty boilerplate. However, a stray block containing unused local variable calculations (totalScore, numberOfScores, averageScore) breaks the flow and creates confusion. Imports are not alphabetically ordered. The anonymous inner class for ChannelInitializer adds moderate nesting but is idiomatic Netty. Comments are helpful and concise. Line lengths are acceptable, and most lines perform a single logical action. The static handler field and PORT parsing are straightforward. The main issue is the irrelevant code block, which significantly hurts clarity and intent.
Run 3
The code is generally well-structured and readable. It has a clear purpose, uses a clean main method with try/finally resource management, and follows netty conventions. However, readability is impacted by a stray block of unrelated code inside main (calculating totalScore/averageScore) that doesn't belong. There is also a minor inconsistency in indentation. The ChannelInitializer anonymous class adds slight nesting but is acceptable. Action granularity and flow are good overall.
Run 1
Code Structure: Server initialization, binding, waiting, and cleanup are logically organized, but the unrelated average-calculation block disrupts cohesion. Nesting: Mostly manageable, though the anonymous initializer and extra block add indentation levels. Clarity of intent: Netty APIs and lifecycle comments convey the server's purpose; unused calculation variables and abbreviated names b and f reduce clarity. Code length: Generally concise, but the unused calculation block is unnecessary. Action granularity: Statements mostly perform one action per line, and the fluent configuration chain is clearly formatted. Reading flow: The server lifecycle reads naturally, but the poorly indented calculation block interrupts it, and spacing between the package declaration and imports would improve presentation.
Run 2
1. Code Structure: Server setup, binding, waiting, and cleanup are logically organized, but the unrelated averaging block disrupts cohesion. 2. Nesting: Mostly shallow; the anonymous channel initializer adds manageable nesting, while the extra block is unnecessary. 3. Clarity of intent: Netty API calls and lifecycle comments make the server's purpose clear. Unused averaging variables and abbreviated names such as b and f reduce clarity. 4. Code length: Generally concise, but the averaging block adds irrelevant lines. 5. Action granularity: Statements are separated, and the fluent configuration places each operation on its own line. 6. Reading flow: The main lifecycle reads naturally and cleanup is clearly placed in finally. However, inconsistent indentation in the averaging block, limited spacing around the package/import section, and awkward class documentation interrupt the flow.
Run 3
Code Structure: Server setup, connection handling, and cleanup are logically organized, but the unrelated average-calculation block disrupts cohesion. Nesting: Mostly moderate, although the anonymous initializer and unnecessary calculation scope add depth. Clarity of intent: Netty configuration and lifecycle operations are clear; short names such as b and f are less descriptive, and the unused calculation obscures the main purpose. Code length: Generally concise, with a small amount of irrelevant code and somewhat verbose shutdown comments. Action granularity: Statements generally perform one action per line, and the fluent configuration chain is clearly separated. Reading flow: Setup, binding, waiting, and cleanup follow a natural sequence, but inconsistent indentation in the calculation block interrupts scanning.