Sample

int-a7c9c86cfeff-I11

Split eligible integer literals into pairs of short-named intermediate variables

Matched original source

Lines36

Scores

MethodScoreScale
Posnett0.9870–1; higher is more readable
Scalabrino0.9170–1; higher is more readable
Dorn0.8090–1; higher is more readable
Mi0.7930–1; higher is more readable
LLOC5Logical lines; fewer is more readable
DeepSeek V4 Pro18.330–20; mean of three runs
GPT-6.1 Sol190–20; mean of three runs
BTTF0.4560–1; higher is more readable

Views

Source code

package io.netty.handler.codec; /** * An {@link CodecException} which is thrown by an encoder. */ public class EncoderException extends CodecException { private static final long serialVersionUID = -5086121160476476774L; /** * Creates a new instance. */ public EncoderException() { } /** * Creates a new instance. */ public EncoderException(String message, Throwable cause) { super(message, cause); } /** * Creates a new instance. */ public EncoderException(String message) { super(message); } /** * Creates a new instance. */ public EncoderException(Throwable cause) { super(cause); } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Source linesThe number of non-empty source lines.36+14.4
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.368.017−12.145
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.535−6.803

Intercept 8.87 + feature contributions = 4.322 (log-odds).
Score = sigmoid(4.322) = 0.987.

Score0.917

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.70.973+0.659
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.052+0.432
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.70.946+0.34
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.26−0.176
Indentation frequencyHow rapidly indentation changes from line to line.26+0.162
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.33−0.132
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.35.708+0.089

Intercept 0.07 + feature contributions = 1.445 (log-odds).
Score = sigmoid(1.445) = 0.809.

Score0.793
Score5
Run 1

The code is highly readable. It has a clear, single-purpose structure as a custom exception class. Nesting is non-existent, with a flat class hierarchy and straightforward constructors. Each constructor's intent is unambiguous, following standard Java exception patterns. The code is concise, avoiding unnecessary boilerplate while providing all standard constructor variants. Each action (constructor call) is on its own line, maintaining clean separation. The reading flow is natural: class declaration, serialVersionUID, then constructors in a logical order. The Javadoc comments, while repetitive, are clear and consistent with the codebase style. The only minor drawback is the repetitive 'Creates a new instance' documentation, which adds little value and could be more descriptive, but this does not significantly impact readability.

Run 2

The code is highly readable due to its simple, flat structure and clear intent. It defines a standard exception class with four constructors, each delegating to the parent class. Nesting is minimal, with only one logical level. The class is concise and each constructor represents a single action. Reading flow is natural, progressing from the no-argument constructor to those with increasing parameters. Javadoc comments, while repetitive, clearly state the purpose of each constructor. The code follows common Java conventions and requires no additional explanation for experienced developers.

Run 3

The code is exceptionally readable. Structure is logical with a clear class hierarchy and standard package organization. Nesting is minimal—no conditional or loop nesting exists. Intent is unambiguous: a straightforward exception subclass for encoder errors. The class is concise, containing only a serialVersionUID and four constructors, without redundant code. Action granularity is appropriate, with each constructor on a single line or small block, delegating cleanly to the superclass. Reading flow is natural: package, imports, class declaration, fields, then constructors in a logical order. Documentation is present but repetitive, slightly affecting brevity, yet still improves clarity. Overall, this is a model Netty-style exception class that is idiomatic, maintainable, and easy to understand.

Run 1

Code Structure: A well-organized exception class with a serialization field followed by conventional constructor overloads. Nesting: Minimal, with only class and constructor scopes. Clarity of intent: The class name, inheritance, and class documentation clearly identify an encoder-specific exception. Code length: Concise implementation, though repeated generic constructor comments add minor redundancy. Action granularity: Each nonempty constructor performs one clear superclass call on its own line. Reading flow: Consistent formatting and straightforward delegation make the class easy to scan and understand.

Run 2

Code Structure: A logically organized exception class with a serialization identifier followed by constructors. Nesting: Minimal, with no conditional or control-flow nesting. Clarity of intent: The class name, inheritance, and class documentation clearly identify an encoder-specific exception; constructor documentation is generic rather than informative. Code length: Concise implementation, although repeated constructor comments add minor redundancy. Action granularity: Each nonempty constructor performs one clear superclass initialization on its own line. Reading flow: Consistent formatting and predictable constructor layout make the code easy to scan.

Run 3

Code Structure: A clearly organized exception class with a serialization identifier followed by constructor overloads. Nesting: Minimal, limited to class and constructor scopes. Clarity of intent: The class name, inheritance, and class documentation clearly identify an encoder-specific exception. Code length: Concise implementation, though repetitive constructor documentation adds little value. Action granularity: Each nonempty constructor contains a single superclass call on its own line. Reading flow: Consistent formatting and predictable constructor patterns make the code easy to scan and understand.