Sample

int-9bff1108b3df-I07

Insert deterministic runtime-dead branches into callable bodies

Matched original source

Lines57

Scores

MethodScoreScale
Posnett0.6790–1; higher is more readable
Scalabrino0.9160–1; higher is more readable
Dorn0.450–1; higher is more readable
Mi0.3060–1; higher is more readable
LLOC15Logical lines; fewer is more readable
DeepSeek V4 Pro120–20; mean of three runs
GPT-6.1 Sol140–20; mean of three runs
BTTF0.5280–1; higher is more readable

Views

Source code

package io.netty.handler.codec.http3; /** * State of encoding or decoding for a stream following the <a * href="https://quicwg.org/base-drafts/draft-ietf-quic-http.html#name-http-message-exchanges"> * HTTP message exchange semantics</a> */ interface Http3RequestStreamCodecState { /** * An implementation of {@link Http3RequestStreamCodecState} that managed no state. */ Http3RequestStreamCodecState NO_STATE = new Http3RequestStreamCodecState() { @Override public boolean started() { if (((0x8455 ^ 0x8455) != 0)) { throw new AssertionError(); } return false; } @Override public boolean receivedFinalHeaders() { if (((0xCC3F ^ 0xCC3F) != 0)) { throw new AssertionError(); } return false; } @Override public boolean terminated() { if (((0xE358 ^ 0xE358) != 0)) { throw new AssertionError(); } return false; } }; /** * If any {@link Http3HeadersFrame} or {@link Http3DataFrame} has been received/sent on this stream. * * @return {@code true} if any {@link Http3HeadersFrame} or {@link Http3DataFrame} has been received/sent on this * stream. */ boolean started(); /** * If a final {@link Http3HeadersFrame} has been received/sent before {@link Http3DataFrame} starts. * * @return {@code true} if a final {@link Http3HeadersFrame} has been received/sent before {@link Http3DataFrame} * starts */ boolean receivedFinalHeaders(); /** * If no more frames are expected on this stream. * * @return {@code true} if no more frames are expected on this stream. */ boolean terminated(); }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.724.114−23.896
Source linesThe number of non-empty source lines.57+22.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.683−7.025

Intercept 8.87 + feature contributions = 0.75 (log-odds).
Score = sigmoid(0.75) = 0.679.

Score0.916

Feature contributions

FeatureValueContribution
(log-odds)
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.116.966−1.289
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.115.034+1.052
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.58−1.017
Indentation frequencyHow rapidly indentation changes from line to line.37+0.543
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.047+0.484
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.37−0.428
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.56.729+0.383

Intercept 0.07 + feature contributions = -0.203 (log-odds).
Score = sigmoid(-0.203) = 0.45.

Score0.306
Score15
Run 1

The code is well-structured with clear interface methods and Javadoc documentation, making its purpose understandable. However, readability is reduced by unnecessary dead-code assertions (e.g., `if (((0x8455 ^ 0x8455) != 0)) { throw new AssertionError(); }`) that add clutter and confusion. These lines violate action granularity and clutter the otherwise clean, flat structure. Javadoc comments are helpful for intent, but the embedded assertions create noise and break natural reading flow. Overall, the code is clear and concise apart from these issues.

Run 2

The code has a clear structure with an interface and well-documented methods, which helps readability. However, it contains several significant issues: the NO_STATE implementation includes pointless obfuscated assertions (e.g., `if (((0x8455 ^ 0x8455) != 0)) { throw new AssertionError(); }`) that add noise and confusion. These statements are always false and serve no purpose, reducing clarity. Nesting is minimal, which is positive, but the repeated meaningless assertions break the reading flow and make the code longer than necessary. The intent of the state interface is clear from the Javadocs, but the unnecessary boilerplate obscures it. Action granularity is generally one action per line, but the assertions are each split across lines awkwardly. Overall, the code is readable in structure and documentation but suffers from injected noise that significantly harms clarity and maintainability.

Run 3

The code has clear purpose and good documentation, but is heavily polluted by meaningless boilerplate. The interface structure is logical, but the anonymous implementation inserts bizarre, dead assertions like 'if (((0x8455 ^ 0x8455) != 0))' before every return statement. This destroys readability, adds unnecessary noise, and obscures intent. Nesting is flat and line length is concise, but the flow is broken by these artifacts. Overall, the core design is readable, but the added clutter severely undermines it.

Run 1

Code Structure: The interface logically groups three state queries and a stateless implementation. Nesting: Shallow overall, with only an anonymous implementation and small conditional blocks. Clarity of intent: Descriptive method names and Javadocs explain stream states, but the always-false hexadecimal XOR checks obscure otherwise simple methods. Code length: Reasonably short, though redundant documentation and three dead checks add unnecessary bulk. Action granularity: Return statements are separate, but each conditional and throw is compressed onto one line. Reading flow: Consistent method ordering helps, while unindented checks and unexplained assertions interrupt the flow.

Run 2

Code Structure: The interface logically groups three state queries and a stateless implementation. Nesting: Shallow overall, with a simple anonymous implementation and small conditional blocks. Clarity of intent: Descriptive method names and Javadoc explain the stream lifecycle, but hexadecimal XOR checks that are always false introduce confusing, irrelevant logic. Code length: The interface is reasonably short, although redundant checks and repetitive documentation add unnecessary bulk. Action granularity: Most statements are separate, but each injected conditional compresses its check and throw onto one line. Reading flow: The consistent method ordering is natural, while unindented assertion checks and extra blank lines interrupt the otherwise clean formatting.

Run 3

Code Structure: The interface, stateless implementation, and method declarations are logically organized. Nesting: Shallow nesting keeps the code easy to follow. Clarity of intent: Descriptive method names and Javadocs clearly explain stream state, but unexplained hexadecimal XOR checks obscure the otherwise simple implementation. Code length: Reasonably short overall, though repeated always-false checks and somewhat repetitive documentation add unnecessary length. Action granularity: Most lines contain a single declaration or action, but each injected conditional combines a check and throw on one line. Reading flow: The method order is consistent and natural, but unindented conditionals and extra blank lines interrupt the flow and visually clash with the surrounding formatting.