Sample

int-7a42c372e047-I03

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

Matched original source

Lines112

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.8970–1; higher is more readable
Dorn0.840–1; higher is more readable
Mi0.8680–1; higher is more readable
LLOC45Logical lines; fewer is more readable
DeepSeek V4 Pro40–20; mean of three runs
GPT-6.1 Sol120–20; mean of three runs
BTTF0.5960–1; higher is more readable

Views

Source code

package io.netty.buffer; import java.nio.ByteBuffer; /** * Abstract base class for {@link ByteBuf} implementations that wrap another * {@link ByteBuf}. * * @deprecated Do not use. */ @Deprecated public abstract class AbstractDerivedByteBuf extends AbstractByteBuf { protected AbstractDerivedByteBuf(int finalStatus) { super(finalStatus); } @Override final boolean removeRecord() { return validateCache(); } boolean validateCache() { return unwrap().isAccessible(); } @Override public final int detect() { return contain(); } int contain() { return unwrap().refCnt(); } @Override public final ByteBuf upload() { return readKey(); } ByteBuf readKey() { unwrap().retain(); return this; } @Override public final ByteBuf upload(int nextOrder) { return readKey(nextOrder); } ByteBuf readKey(int localUser) { unwrap().retain(localUser); return this; } @Override public final ByteBuf route() { return verify(); } ByteBuf verify() { unwrap().touch(); return this; } @Override public final ByteBuf route(Object user) { return verify(user); } ByteBuf verify(Object node) { unwrap().touch(node); return this; } @Override public final boolean collect() { return sendItem(); } boolean sendItem() { return unwrap().release(); } @Override public final boolean collect(int localItem) { return sendItem(localItem); } boolean sendItem(int finalUser) { return unwrap().release(finalUser); } @Override public boolean readStatus() { return unwrap().isReadOnly(); } @Override public ByteBuffer validateAccount(int cache, int window) { return readBatch(cache, window); } @Override public ByteBuffer readBatch(int total, int amount) { return unwrap().nioBuffer(total, amount); } @Override public boolean refreshScore() { return unwrap().isContiguous(); } }

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.2254.559−74.4
Source linesThe number of non-empty source lines.112+44.8
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.382−6.574

Intercept 8.87 + feature contributions = -27.304 (log-odds).
Score = sigmoid(-27.304) = 0.

Score0.897

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.113−2.965
Indentation frequencyHow rapidly indentation changes from line to line.88+2.307
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.111.701+1.152
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.75.956+0.448
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.67.956+0.292
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.101−0.04

Intercept 0.07 + feature contributions = 1.661 (log-odds).
Score = sigmoid(1.661) = 0.84.

Score0.868
Score45
Run 1

This code demonstrates severe readability issues. The method names are misleading and completely disconnected from their actual functionality; for example, methods like 'detect' calls 'contain' which returns a reference count, 'upload' calls 'readKey' which retains the buffer, and 'route' calls 'verify' which touches the object. These obfuscated names make it nearly impossible to understand intent. The structure follows a single-responsibility pattern by delegating to protected wrapper methods, but the naming convention is counterproductive. The abstract class extends another abstract class and wraps a ByteBuf, but the semantic mismatch between method names and behavior creates cognitive overload. While nesting is minimal and lines are relatively concise, the disorganized naming scheme destroys reading flow. The code appears to be deliberately obfuscated, possibly as an anti-pattern example, but even as such it fails readability standards because there is no indication of why these names were chosen or what the transformations represent.

Run 2

This code is extremely difficult to read due to heavily obfuscated method and parameter names that completely obscure their true purpose. For example, methods like `detect()`, `contain()`, `upload()`, `readKey()`, `route()`, `verify()`, `collect()`, and `sendItem()` are semantically meaningless in the context of a Netty ByteBuf wrapper. The code appears to be a deliberately mangled version of standard ByteBuf methods such as `isAccessible()`, `refCnt()`, `retain()`, `touch()`, and `release()`. While the class structure itself has a clear hierarchical pattern and low nesting, the readability is destroyed by the cryptic naming. Each public method delegates to a private method with an unrelated name, adding unnecessary indirection without any clear benefit. The action granularity is generally one operation per line, but the misleading names negate this advantage. The overall intent is completely obfuscated, making maintenance and debugging nearly impossible without external documentation or deep reverse engineering.

Run 3

The code is structurally organized but extremely difficult to read due to misleading and inconsistent naming. Methods like `detect()`, `contain()`, `upload()`, `readKey()`, `route()`, `verify()`, `collect()`, `sendItem()`, `validateAccount()`, and `readBatch()` obscure the actual operations (refCnt, retain, touch, release, nioBuffer, etc.). The overridden methods add an unnecessary layer of indirection with no added value, inflating code length and reducing clarity. While nesting is minimal and each line typically performs one action, the reading flow is disorienting because intent is completely hidden behind abstract names. The deprecated status and comments further confuse rather than clarify. Overall, the code reads like an obfuscated wrapper, making it nearly unreadable despite its simple structure.

Run 1

Code Structure: Methods are logically grouped into consistent delegation pairs, but extra helper layers add indirection. Nesting: There is no nested control flow; all methods are flat and simple. Clarity of intent: The class documentation explains its wrapper role, but misleading names such as upload, collect, validateAccount, and finalStatus obscure reference counting and buffer operations. Code length: Individual methods are concise, although repetitive forwarding helpers lengthen the class. Action granularity: Each statement performs one clear action, with mutations and returns separated. Reading flow: Consistent formatting and method grouping support scanning, but understanding behavior requires following ambiguously named methods to their underlying calls.

Run 2

Code Structure: Consistent grouping of overrides and delegation helpers provides logical organization, though extra forwarding layers add indirection. Nesting: Completely flat methods make control flow easy to follow. Clarity of intent: The class documentation explains its wrapper role, but misleading names such as upload, collect, validateAccount, and readKey obscure retain, release, and buffer operations; parameter names are similarly uninformative. Code length: Individual methods are concise, but repeated forwarding methods increase overall length without clarifying behavior. Action granularity: Each statement occupies its own line, and methods perform small, focused operations. Reading flow: Consistent formatting and adjacent overloads support scanning, but readers must trace helper calls and unwrap operations to understand the actual semantics.

Run 3

Code Structure: Consistently organized into small override/helper pairs, though delegation layers add indirection. Nesting: Flat methods with no nested control flow make local reading easy. Clarity of intent: The class documentation explains its wrapper role, but misleading names such as upload, contain, validateAccount, and finalUser obscure reference counting and buffer operations. Code length: Individual methods are concise, but numerous forwarding helpers increase overall length and reading effort. Action granularity: Each statement performs a single action, with mutation and return statements clearly separated. Reading flow: Formatting and repeated patterns are predictable, but readers must follow helper calls to unwrap() operations to understand behavior. Strong structural simplicity is undermined by ambiguous naming and unnecessary-looking indirection.