Sample

int-82ca2427526c-I03

Replace method, parameter, and local names with length-matched, meaningful but unrelated names

Matched original source

Lines36

Scores

MethodScoreScale
Posnett0.9840–1; higher is more readable
Scalabrino0.9180–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 Pro17.670–20; mean of three runs
GPT-6.1 Sol17.670–20; mean of three runs
BTTF0.3860–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 channel, Throwable group) { super(channel, group); } /** * Creates a new instance. */ public EncoderException(String address) { super(address); } /** * Creates a new instance. */ public EncoderException(Throwable entry) { super(entry); } }

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.375−12.375
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.534−6.801

Intercept 8.87 + feature contributions = 4.094 (log-odds).
Score = sigmoid(4.094) = 0.984.

Score0.918

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 well-structured and highly readable. It defines a simple exception class with clear inheritance from CodecException. Nesting is minimal, with only class and constructor blocks. Intent is unambiguous—it represents an encoder-specific exception. The code is concise, with each constructor delegating to the appropriate superclass constructor in a single line. Action granularity is appropriate: each constructor call is a clear, single action. Reading flow is natural, moving from class declaration to serialVersionUID and then constructors. Minor deductions come from slightly redundant Javadocs (all say 'Creates a new instance') and some misleading parameter names (e.g., 'channel' for String, 'group' for Throwable) that could confuse readers. Overall, it is clean, idiomatic Java with no unnecessary complexity.

Run 2

The code is highly readable. It follows a clear and logical structure, with the package declaration, imports, class definition, and constructors arranged in a conventional order. Nesting is minimal—only three constructors, each with a single super call. The intent is obvious: a simple exception subclass for encoder errors. Code length is concise and appropriate; there is no redundant logic. Action granularity is good, with each constructor performing one clear action. Reading flow is natural, with Javadoc comments explaining the purpose of the class and each constructor. Minor deduction: the parameter names ('channel', 'group', 'address', 'entry') are not ideal—they seem copied from other exception types and do not reflect encoder context, slightly obscuring intent. Overall, it is a well-structured, nearly perfect example of readable code.

Run 3

The code is a simple exception class with a clear, focused purpose. It has a flat structure with no nesting, making it easy to follow. Each constructor is concise and delegates to the superclass, keeping the code short and intention-revealing. The class and constructor Javadoc comments are present, though they are generic and do not add much value. Parameter names like 'channel', 'group', 'address', and 'entry' are potentially misleading, which slightly reduces clarity of intent. Overall, the code is highly readable and maintains good action granularity, with each action on its own line.

Run 1

Code Structure: Well-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 its purpose, but parameter names such as channel, group, address, and entry obscure their actual roles as exception message and cause. Code length: Concise overall, although repeated generic constructor comments add little value. Action granularity: Each constructor performs a single superclass initialization, with one action per line. Reading flow: Consistent formatting and straightforward constructor ordering make the code easy to scan; misleading parameter names are the main readability weakness.

Run 2

Code Structure: A well-organized exception class with standard constructor overloads. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The class name, inheritance, and class documentation clearly establish its purpose, but parameter names such as channel, group, address, and entry obscure their actual roles as message and cause. Code length: Concise implementation, though repeated generic constructor comments add little value. Action granularity: Each constructor performs at most one action, with one statement per line. Reading flow: Consistent formatting and a natural progression from the field to constructors support straightforward reading.

Run 3

Code Structure: A clean exception class with a serialization field followed by logically grouped constructors. Nesting: Minimal, with no nested control flow. Clarity of intent: The class name, inheritance, and class documentation clearly communicate its purpose, but parameter names such as channel, group, address, and entry obscure the conventional message and cause semantics. Code length: Short and focused, although repeated constructor documentation adds little value. Action granularity: Each nonempty constructor performs exactly one action per line. Reading flow: Consistent formatting and straightforward constructor delegation make the code easy to follow.