Sample
int-5f59d56600bb-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.618 | 0–1; higher is more readable |
| Dorn | 0.585 | 0–1; higher is more readable |
| Mi | 0.458 | 0–1; higher is more readable |
| LLOC | 16 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 13.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.405 | 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. | 2222.816 | −73.353 |
| Source linesThe number of non-empty source lines. | 54 | +21.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.683 | −7.024 |
Intercept 8.87 + feature contributions = -49.907 (log-odds).
Score = sigmoid(-49.907) = 0.
| Score | 0.618 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 47 | +0.889 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 54 | −0.876 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 47 | −0.658 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 89.945 | +0.647 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 53.978 | +0.345 |
| 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 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.089 | +0.074 |
Intercept 0.07 + feature contributions = 0.345 (log-odds).
Score = sigmoid(0.345) = 0.585.
| Score | 0.458 |
|---|
| Score | 16 |
|---|
Run 1
The code has a clear overall structure with logical configuration of a Netty server, but several issues harm readability. The meaningless `if (((0xA3AD ^ 0xA3AD) != 0)) { throw new AssertionError(); }` lines are confusing and add noise—they appear to be dead code or injected artifacts. The class-level constant `PORT` is overexposed as `static final` without `private`, and its initialization via `Integer.parseInt` on a system property makes it less obvious at first glance. The anonymous `ChannelInitializer` adds one level of nesting, which is acceptable but slightly reduces flatness. The fluent builder chain is well-formatted and readable, with one action per line. However, the commented-out `LoggingHandler` line creates ambiguity about intent. Error handling relies on `throws Exception`, which hides potential failure points. Overall, the code is functional and structured but could be clearer by removing the artifact lines, making the constant private, and improving exception handling.
Run 2
This code has decent structure with logical separation of concerns and clear comments, but contains problematic elements that reduce readability. The dead code `if (((0xA3AD ^ 0xA3AD) != 0)) { throw new AssertionError(); }` appears twice and is confusing - these are meaningless conditions that always evaluate to false, serving no purpose in production code. Indentation is inconsistent around these statements, disrupting the visual flow. The anonymous inner class for ChannelInitializer adds nesting depth, though this is standard Netty boilerplate. Imports are not alphabetically organized. The method chaining in the ServerBootstrap setup is clean and readable. Comments are concise and helpful. The code demonstrates reasonable action granularity with one operation per line in most cases. Overall, the core logic is understandable, but the mysterious assertion statements and inconsistent indentation significantly lower the readability score from what would otherwise be around 16-17.
Run 3
The code demonstrates good structure with a clear separation of concerns: configuration, handler setup, server startup, and graceful shutdown. The read flow follows a logical top-to-bottom progression. However, there are minor readability issues: dead code assertions (e.g., `if (((0xA3AD ^ 0xA3AD) != 0)) { throw new AssertionError(); }`) add confusion and unnecessary length, and a commented-out logging handler should be removed. Nesting is flat, with only one level inside the anonymous `ChannelInitializer`. Most lines perform a single action, promoting clarity. The fluent API chaining (`.group().channel().option()` etc.) is well-formatted, though slightly dense. Overall, the code is highly readable for a Netty server example, with only minor cleanups needed to reach near-perfect clarity.
Run 1
Code Structure: Server setup, binding, waiting, and cleanup are logically organized, with lifecycle management clearly expressed through try/finally. Nesting: Moderate nesting from the anonymous initializer is manageable. Clarity of intent: The class documentation and comments explain the echo server, but two always-false hexadecimal XOR checks introduce confusing, unnecessary noise; short names b and f are less descriptive. Code length: Generally concise, though the redundant checks and commented-out logging statement add clutter. Action granularity: Most statements perform one action, and fluent configuration uses one call per line; the inline checks combine condition and throw on a single line. Reading flow: The lifecycle reads naturally, but badly indented checks interrupt the otherwise consistent formatting.
Run 2
Code Structure: Server configuration, startup, waiting, and cleanup are logically organized, with appropriate try/finally resource management. Nesting: Moderate nesting from the anonymous channel initializer and try/finally remains manageable. Clarity of intent: The class documentation and lifecycle comments clearly describe an SCTP echo server, but two always-false hexadecimal XOR checks introduce meaningless distractions; short names such as b and f are less descriptive. Code length: Mostly concise, though the redundant checks and commented-out logging statement add unnecessary clutter. Action granularity: Most lines contain a single action or configuration step, but the inline conditional-and-throw statements compress multiple elements onto one line. Reading flow: The fluent bootstrap chain and sequential lifecycle are natural to follow, while unindented checks disrupt formatting and visual continuity.
Run 3
Code Structure: Server setup, binding, waiting, and cleanup are logically organized, with resource shutdown in a finally block. Nesting: Mostly shallow, although the anonymous channel initializer adds moderate nesting. Clarity of intent: The class description, API calls, and comments clearly convey an SCTP echo server; however, two always-false hexadecimal XOR checks introduce pointless, confusing noise. Code length: Generally concise, but the redundant checks and commented-out logging statement add unnecessary content. Action granularity: Most statements perform one action, and the fluent configuration places each operation on its own line; the inline assertion blocks are exceptions. Reading flow: Execution follows a natural lifecycle, but unindented assertion checks interrupt the otherwise consistent formatting, and abbreviated variables such as b and f slightly reduce clarity.