Sample
int-6beaad3d1d26-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.542 | 0–1; higher is more readable |
| Dorn | 0.274 | 0–1; higher is more readable |
| Mi | 0.509 | 0–1; higher is more readable |
| LLOC | 28 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.29 | 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. | 2589.394 | −85.45 |
| Source linesThe number of non-empty source lines. | 62 | +24.8 |
| 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.527 | −6.79 |
Intercept 8.87 + feature contributions = -58.57 (log-odds).
Score = sigmoid(-58.57) = 0.
| Score | 0.542 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 62 | +1.407 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 59 | −1.053 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 62 | −1.002 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 61.977 | +0.456 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.109 | −0.117 |
| 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. | 84.984 | +0.066 |
Intercept 0.07 + feature contributions = -0.977 (log-odds).
Score = sigmoid(-0.977) = 0.274.
| Score | 0.509 |
|---|
| Score | 28 |
|---|
Run 1
The code demonstrates mixed readability. The class structure is logical and follows Netty patterns, but an unnecessary nested block containing a factorial loop appears mid-method, which is completely unrelated and disrupts reading flow. Action granularity is mostly one action per line, improving clarity. Nesting is moderate—two levels in header iteration and conditionals—but acceptable. However, the stray code block causes confusion. Clarity of intent is generally good: handling HTTP response vs content is explicit, print statements are clear, and method names are descriptive. The code is somewhat verbose with repeated System.err.println calls, but this is not excessive for a logging handler. The biggest issue is the placement of irrelevant logic, which severely impacts readability. If not for that block, the code would rate much higher. Structure, naming, and flow are otherwise solid.
Run 2
The code follows a standard Netty handler pattern with clear method separation for read and exception handling, but several readability issues exist. There's an unrelated, embedded factorial calculation block at the start of channelRead0 that serves no purpose and confuses intent. The method contains multiple sequential if-blocks with nested loops and conditionals; while not excessively deep, the flow could be more linear using early returns or separate private methods. Action granularity is mostly good—each statement performs one logical action—but verbose printing statements and repeated System.err calls lengthen the code unnecessarily. Reading flow is disrupted by the dead factorial code and the mixing of response header printing, chunk detection, and content handling in one method. The overall structure is logical but would benefit from extracting header/logging logic and removing non-functional code.
Run 3
The code has multiple readability issues. A spurious factorial calculation snippet appears embedded inside channelRead0, disrupting the flow and confusing intent. The class structure is straightforward, but the method contains several nested blocks (response instanceof check, header loop with inner loop, chunked content check) increasing complexity. Some lines perform multiple actions, like printing and flushing in a single logical section. Variable names are generally clear, but the overall organization feels tangled due to the misplaced factorial loop and mixed concerns within the handler method. The reading flow is unnatural because the reader must mentally skip over the irrelevant factorial code to follow the HTTP processing logic. Method length is reasonable, but the unexpected code block and nesting reduce clarity significantly. Overall, the code is understandable in its core HTTP handling part but undermined by structural noise and inconsistent organization.
Run 1
Code Structure: Response handling, content handling, and exception handling are logically separated, but an unrelated, unused factorial calculation disrupts organization. Nesting: Mostly manageable, although header printing uses nested loops within two conditionals. Clarity of intent: Descriptive names, HTTP types, and output labels make the handler's purpose clear; the factorial block has no apparent purpose. Code length: Generally concise, with unnecessary lines from the factorial calculation. Action granularity: Each statement performs a distinct action, making operations easy to follow. Reading flow: Response metadata naturally precedes content processing, but the poorly indented standalone block interrupts the flow and creates inconsistent formatting.
Run 2
Code Structure: Response handling, content handling, and exception handling are logically separated, but the unrelated factorial block disrupts organization. Nesting: Most logic is shallow, though header printing uses nested loops within two conditionals. Clarity of intent: Descriptive names and explicit output labels make HTTP logging clear; the unused factorial calculation has no apparent purpose. Code length: Generally concise, with unnecessary length from the factorial block and repetitive printing. Action granularity: Statements consistently perform one action per line. Reading flow: HTTP processing follows a natural sequence from status and headers to content and closure, but inconsistent indentation and the stray block at the method's start interrupt readability.
Run 3
Code Structure: Response handling, content handling, and exception handling are logically separated, but the unrelated factorial block disrupts organization. Nesting: Mostly manageable, though header printing uses an outer conditional and two nested loops. Clarity of intent: Descriptive names and output labels make HTTP logging clear; the unused factorial calculation has no apparent purpose. Code length: Generally concise, with unnecessary lines introduced by the factorial block. Action granularity: Statements mostly perform one action per line, making operations easy to follow. Reading flow: HTTP processing follows a natural sequence from status and headers to content and closure, but inconsistent indentation and the stray block interrupt that flow.