Sample

int-8519ec6ba398-I02

Shorten method, parameter, and local names without collisions

Matched original source

Lines51

Scores

MethodScoreScale
Posnett10–1; higher is more readable
Scalabrino0.9890–1; higher is more readable
Dorn0.6830–1; higher is more readable
Mi0.360–1; higher is more readable
LLOC9Logical lines; fewer is more readable
DeepSeek V4 Pro13.670–20; mean of three runs
GPT-6.1 Sol160–20; mean of three runs
BTTF0.7330–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 sta() { return false; } @Override public boolean received() { return false; } @Override public boolean ter() { 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 sta(); /** * 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 received(); /** * If no more frames are expected on this stream. * * @return {@code true} if no more frames are expected on this stream. */ boolean ter(); }

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.514−6.771

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

Score0.989

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.028+0.674
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.805+0.3

Intercept 0.07 + feature contributions = 0.765 (log-odds).
Score = sigmoid(0.765) = 0.683.

Score0.36
Score9
Run 1

The code has clear Javadoc comments and a logical structure, but readability is significantly hindered by heavily abbreviated method names ('sta', 'ter', 'received') which obscure intent without additional documentation. The interface is concise but the abbreviations in the implementation and methods reduce clarity, forcing readers to rely on comments. Nesting is minimal and each method performs a single action, but the reading flow is disrupted by the cryptic naming scheme. While the structure and documentation are good, the lack of self-documenting code lowers the overall score.

Run 2

The code is highly readable with clear structure and logical organization. It defines an interface with three well-documented methods, each having concise Javadoc explaining its purpose. Nesting is minimal—only one anonymous class implementation is provided. The naming conventions are consistent, though method names like 'sta()', 'received()', and 'ter()' are cryptic and could be more descriptive (e.g., 'hasStarted()', 'hasReceivedFinalHeaders()', 'isTerminated()'), which slightly impacts clarity of intent. Code length is appropriate for the functionality, and action granularity is excellent with one logical action per line. The reading flow is natural, with documentation preceding each method declaration. The anonymous class implementation of NO_STATE is straightforward and follows the interface contract clearly. Overall, it follows clean code principles well but loses points for abbreviated method names.

Run 3

The code has a clear overall purpose (HTTP/3 stream state tracking) with good Javadoc comments, but suffers from readability issues. The method names 'sta()', 'ter()', and 'received()' are overly abbreviated and ambiguous - 'sta' probably means 'started' but this is unclear. The interface mixes state constants with behavior definitions, which is slightly confusing. While the structure is flat and each method is simple, the naming choices force readers to check documentation to understand intent. The NO_STATE implementation is clear but repetitive. Overall the code is functional but the cryptic naming significantly reduces readability despite good documentation practices.

Run 1

Code Structure: The interface is logically organized, with a stateless implementation followed by documented state queries. Nesting: Minimal nesting; the anonymous implementation is straightforward. Clarity of intent: Javadoc explains each query, but abbreviated names sta() and ter() are obscure, and received() does not clearly convey the final-header condition. Code length: Compact overall, though descriptions and return documentation repeat information. Action granularity: Each declaration and return occupies its own line, making operations easy to distinguish. Reading flow: Consistent formatting and method ordering support smooth reading, but understanding the API requires consulting documentation rather than relying on method names.

Run 2

Code Structure: The interface is logically organized, with a no-state implementation followed by documented state queries. Nesting: Minimal nesting, limited to an anonymous implementation and its short methods. Clarity of intent: Javadoc explains the HTTP/3 state semantics, but abbreviated names such as sta() and ter() obscure meaning; received() also inadequately conveys its specific final-headers condition. Code length: Concise overall, though descriptions repeated in @return tags add unnecessary verbosity. Action granularity: Each statement performs a single action, and every implementation method simply returns false. Reading flow: Consistent formatting and method ordering make the code easy to follow, but readers must consult documentation to understand the poorly named methods.

Run 3

Code Structure: The interface is logically organized, with a default stateless implementation followed by documented method declarations. Nesting: Minimal nesting; the anonymous implementation is straightforward. Clarity of intent: Javadocs explain the state checks, but abbreviated names sta() and ter() obscure their meaning, while received() inadequately identifies the final-header condition. Code length: Compact overall, though repeated descriptions in Javadocs add some verbosity. Action granularity: Each declaration and return statement occupies its own line, making individual actions easy to identify. Reading flow: Consistent formatting and method ordering support natural reading, but unclear names require readers to consult documentation repeatedly.