Sample

int-45a46ab7294a-I05

Rewrite eligible decimal integer literals in hexadecimal notation

Matched original source

Lines28

Scores

MethodScoreScale
Posnett0.0010–1; higher is more readable
Scalabrino0.7810–1; higher is more readable
Dorn0.5510–1; higher is more readable
Mi0.2590–1; higher is more readable
LLOC6Logical lines; fewer is more readable
DeepSeek V4 Pro18.670–20; mean of three runs
GPT-6.1 Sol190–20; mean of three runs
BTTF0.280–1; higher is more readable

Views

Source code

package io.netty.channel; import io.netty.util.internal.ThrowableUtil; import io.netty.util.internal.UnstableApi; import java.nio.channels.ClosedChannelException; /** * Cheap {@link ClosedChannelException} that does not fill in the stacktrace. */ @UnstableApi public final class StacklessClosedChannelException extends ClosedChannelException { private static final long serialVersionUID = -0x1ebc92587e13a400L; private StacklessClosedChannelException() { } @Override public Throwable fillInStackTrace() { // Suppress a warning since this method doesn't need synchronization return this; } /** * Creates a new {@link StacklessClosedChannelException} which has the origin of the given {@link Class} and method. */ public static StacklessClosedChannelException newInstance(Class<?> clazz, String method) { return ThrowableUtil.unknownStackTrace(new StacklessClosedChannelException(), clazz, method); } }

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.603.893−19.928
Source linesThe number of non-empty source lines.28+11.2
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.797−7.195

Intercept 8.87 + feature contributions = -7.053 (log-odds).
Score = sigmoid(-7.053) = 0.001.

Score0.781

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.119.897−1.413
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.119.931+1.131
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.052+0.441
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.23−0.107
Indentation frequencyHow rapidly indentation changes from line to line.23+0.058
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.28+0.045
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.27.802−0.021

Intercept 0.07 + feature contributions = 0.204 (log-odds).
Score = sigmoid(0.204) = 0.551.

Score0.259
Score6
Run 1

The code is highly readable. Structure is logical with clear class-level Javadoc and method-level documentation. Nesting is minimal—only one class and two methods. Intent is explicit: a stackless exception variant for performance, with the constructor private to enforce factory usage. Code is concise without sacrificing clarity. Each action is on its own line, and the flow follows a natural order: class declaration, constructor, override, factory method. The only minor drawbacks are the cryptic serialVersionUID value and the need to understand Netty's exception utilities, but these are standard practice in Netty internals.

Run 2

The code is highly readable. It follows a clear, logical structure with a single, well-defined class. Nesting is minimal—only one method override and a static factory method. The intent is unambiguous: it creates a lightweight exception without stack trace overhead. The code is concise with no redundant logic. Each action is on its own line, improving clarity. Reading flow is natural: imports, class declaration, constructor, override, then factory method. The only minor deduction is the slight cognitive load from the unusual serialVersionUID negative hex value and the brief comment in fillInStackTrace, but these are minor and don’t hinder overall understanding.

Run 3

The code is highly readable. It has a clear, single responsibility: a stackless variant of ClosedChannelException. Structure is logical with import, class-level Javadoc, fields, private constructor, overridden method, and factory method. Nesting is flat, with no conditional logic. Intent is explicit through descriptive naming and concise Javadoc. Code length is minimal and avoids unnecessary boilerplate while preserving essential elements like serialVersionUID. Each line performs one logical action. Reading flow is natural, moving from class definition to constructor to behavior override to factory method.

Run 1

Code Structure: Logically organized into a constant, private constructor, overridden method, and factory method. Nesting: Flat, with no nested control flow. Clarity of intent: The class name, documentation, and fillInStackTrace override clearly communicate the stackless exception behavior; the factory documents how origin information is supplied. Code length: Concise, with no unnecessary implementation. Action granularity: Each statement performs a focused action; the factory's combined construction and utility call remains easy to follow. Reading flow: Natural top-to-bottom progression, supported by standard Java conventions. Minor weaknesses include the vague parameter name clazz, lack of spacing between package and imports, and a synchronization-warning comment whose context is not obvious.

Run 2

Code Structure: The class is logically organized into a constant, private constructor, overridden method, and factory method. Nesting: There is no nested control flow, making the code easy to scan. Clarity of intent: The descriptive class name, documentation, and fillInStackTrace override clearly communicate the lightweight exception behavior; the factory's stack-trace handling depends slightly on understanding ThrowableUtil. Code length: The implementation is concise without unnecessary complexity. Action granularity: Each statement performs a focused action, although the factory combines construction and utility invocation in one readable expression. Reading flow: The progression from class purpose to implementation and creation is natural. Minor drawbacks include missing spacing between the package and imports and a warning-related comment that is less informative than explaining why returning this suppresses stack-trace generation.

Run 3

Code Structure: The class is logically organized into a constant, constructor, override, and factory method. Nesting: There is no nested control flow, making the code easy to scan. Clarity of intent: The class name, documentation, and fillInStackTrace override clearly communicate a lightweight exception without a generated stack trace; the factory delegates synthetic origin handling to a utility. Code length: The implementation is concise with no unnecessary logic. Action granularity: Each statement performs a single clear action, although the factory combines construction and utility invocation in one readable expression. Reading flow: The progression from class purpose to implementation and creation is natural. Minor readability issues include tightly grouped package/import declarations and a synchronization-warning comment whose context is not obvious.