Sample

int-5adcb5376155-I05

Rewrite eligible decimal integer literals in hexadecimal notation

Matched original source

Lines36

Scores

MethodScoreScale
Posnett0.9710–1; higher is more readable
Scalabrino0.9170–1; higher is more readable
Dorn0.8130–1; higher is more readable
Mi0.7850–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.4120–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 = -0x4695883f7ecc4566L; /** * 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.393.463−12.984
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.512−6.768

Intercept 8.87 + feature contributions = 3.518 (log-odds).
Score = sigmoid(3.518) = 0.971.

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.69.973+0.701
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.053+0.431
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.69.946+0.324
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.746+0.09

Intercept 0.07 + feature contributions = 1.471 (log-odds).
Score = sigmoid(1.471) = 0.813.

Score0.785
Score5
Run 1

The code is highly readable. The structure is simple and logical, with a clear class purpose stated in the Javadoc. Nesting is flat, with no conditional or looping constructs. Intent is unambiguous: it defines a specific exception type for encoders. Code length is concise, appropriately including only necessary constructors. Each action is on its own line, following standard Java conventions. Reading flow is natural, with constructors ordered by parameter count in a common pattern. Minor deductions could be made for repetitive Javadoc comments, but overall this is exemplary readable code.

Run 2

The code is highly readable. It has a clear, logical structure: package declaration, imports, Javadoc, class declaration, fields, and constructors in a conventional order. Nesting is minimal (none beyond class level). Intent is unambiguous—it's a simple exception subclass for encoders. Code length is concise and appropriate for the purpose. Action granularity is one action per line. Reading flow is natural: each constructor is grouped with its own Javadoc, and the order flows from no-arg to more complex constructors. Minor deductions: repeated generic Javadoc comments add little value, and the serialVersionUID value is cryptic (though standard for serialization). Overall, the code is very clear and maintainable.

Run 3

The code is a simple exception class with excellent readability. It follows a clear, standard structure: package declaration, imports, Javadoc, class declaration, and four constructors. There is no nesting, making the logic flat and easy to follow. The intent is obvious - defining an encoder-specific exception. The code is concise, with each constructor performing a single action (delegating to the superclass). The reading flow is natural, moving from package context to class definition to constructors. Minor deductions: the Javadoc comments are repetitive ('Creates a new instance.'), and the serialVersionUID uses a hex format that is less immediately readable than a decimal value. Overall, it's nearly ideal for a simple exception class.

Run 1

Code Structure: A logically organized exception class with clearly separated constructor overloads. Nesting: Minimal, with no conditional or loop nesting. Clarity of intent: The class name, inheritance, and class-level documentation clearly identify an encoder-specific exception; constructor comments are generic but harmless. Code length: Short and appropriate, though repeated constructor documentation adds minor verbosity. Action granularity: Each constructor performs at most one action, with each superclass call on its own line. Reading flow: Consistent formatting and predictable constructor layout make the code easy to scan.

Run 2

Code Structure: A logically organized exception class with a serialization identifier followed by constructor overloads. Nesting: Minimal, with no nested control flow. Clarity of intent: The class name, inheritance, and class documentation clearly identify an encoder-specific exception; constructors transparently delegate to the superclass. Code length: Short and appropriate, though repetitive constructor documentation adds little value. Action granularity: Each constructor performs at most one action, clearly separated onto its own line. Reading flow: Consistent formatting and straightforward ordering make the code easy to scan. More informative constructor documentation would provide a minor readability improvement.

Run 3

Code Structure: A well-organized exception class with a serialization identifier followed by standard constructor overloads. Nesting: Minimal, limited to the class and constructor bodies. Clarity of intent: The class name, inheritance, and class-level documentation clearly identify an encoder-specific exception. Code length: Concise and appropriate, though repeated constructor comments add little information. Action granularity: Each nonempty constructor performs exactly one superclass call on its own line. Reading flow: Consistent formatting and straightforward constructor implementations make the code easy to scan.