Sample

int-343c75913829-SRC

Unmodified source class

Lines51

Scores

MethodScoreScale
Posnett10–1; higher is more readable
Scalabrino0.9720–1; higher is more readable
Dorn0.6840–1; higher is more readable
Mi0.370–1; higher is more readable
LLOC9Logical lines; fewer is more readable
DeepSeek V4 Pro17.330–20; mean of three runs
GPT-6.1 Sol18.670–20; mean of three runs
BTTF0.7610–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() { return false; } @Override public boolean receivedFinalHeaders() { return false; } @Override public boolean terminated() { 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)
Source linesThe number of non-empty source lines.51+20.4
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.339.002−11.187
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.52−6.78

Intercept 8.87 + feature contributions = 11.303 (log-odds).
Score = sigmoid(11.303) = 1.

Score0.972

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.981−1.29
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.116.962+1.083
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.52−0.805
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.027+0.682
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Indentation frequencyHow rapidly indentation changes from line to line.31+0.335
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.50.864+0.301

Intercept 0.07 + feature contributions = 0.774 (log-odds).
Score = sigmoid(0.774) = 0.684.

Score0.37
Score9
Run 1

The code is a well-structured interface with clear purpose and documentation. It is flat with no nesting, uses concise methods, and maintains a natural reading flow. Javadocs explain each method's intent, though minor verbosity in comments slightly reduces efficiency.

Run 2

The code is well-structured with clear separation between interface definition and a default implementation. It has minimal nesting and uses concise, descriptive method names that clearly convey intent. The Javadoc comments are thorough and helpful, adding to clarity. However, the interface name is slightly verbose and the code is somewhat lengthy for the simple functionality it provides. Reading flow is natural, starting with the interface and moving into the default state implementation.

Run 3

The code is highly readable with a clear, logical structure. The interface defines a state contract with well-named methods (started, receivedFinalHeaders, terminated) that concisely express their intent. The anonymous inner class implementing NO_STATE is straightforward and flat, with no nesting issues. Each method contains a single action, maintaining clean action granularity. Javadoc comments are informative without being verbose, explaining the purpose of the interface and each method. The reading flow is natural, starting with the interface declaration, then the NO_STATE implementation, and finally the method declarations. Minor deduction: the Javadoc could reference RFC more consistently, and the NO_STATE implementation could arguably be a separate class for clarity, but these are very minor given the overall quality.

Run 1

Code Structure: The interface logically groups three state queries and a clearly identified stateless implementation. Nesting: Minimal; the anonymous implementation adds only one level, with trivial method bodies. Clarity of intent: Descriptive method names and Javadoc explain the stream lifecycle, although receivedFinalHeaders() sounds receive-specific despite documenting both sending and receiving. Code length: Compact overall, but repeated Javadoc descriptions and false-returning methods add minor verbosity. Action granularity: Each method performs a single action, with no combined statements. Reading flow: Consistent formatting and method ordering make the code easy to scan; placing NO_STATE before the query declarations is reasonable. Minor grammatical issues in the documentation slightly reduce polish.

Run 2

Code Structure: The interface logically groups three state queries and a clearly identified no-state implementation. Nesting: Minimal nesting, limited to the anonymous implementation and its short methods. Clarity of intent: Descriptive method names and Javadoc explain the stream lifecycle, although receivedFinalHeaders() uses received terminology while its documentation covers both sending and receiving. Code length: Compact implementation; Javadoc repeats some descriptions in return tags. Action granularity: Each method performs a single action, with no combined statements. Reading flow: Consistent formatting and method ordering make the code easy to follow. Minor documentation wording issues slightly reduce polish.

Run 3

Code Structure: The interface logically groups three state queries and a clearly identified stateless implementation. Nesting: Only the anonymous implementation introduces nesting; its methods remain simple and flat. Clarity of intent: Descriptive method names and Javadoc clearly explain stream states, although receivedFinalHeaders() sounds receive-only despite documenting both sending and receiving. Code length: The implementation is concise, but repeated descriptions in the Javadoc add minor verbosity. Action granularity: Each method performs a single action, with one return statement per line. Reading flow: Consistent formatting and method ordering make the code easy to scan; the anonymous implementation preceding the documented declarations introduces only a minor interruption.