Sample

int-e67c3d067c0c-I02

Shorten method, parameter, and local names without collisions

Matched original source

Lines112

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.9210–1; higher is more readable
Dorn0.8270–1; higher is more readable
Mi0.8810–1; higher is more readable
LLOC45Logical lines; fewer is more readable
DeepSeek V4 Pro3.330–20; mean of three runs
GPT-6.1 Sol13.330–20; mean of three runs
BTTF0.6190–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 max) { super(max); } @Override final boolean is() { return is2(); } boolean is2() { return unwrap().isAccessible(); } @Override public final int ref() { return ref2(); } int ref2() { return unwrap().refCnt(); } @Override public final ByteBuf ret() { return retain(); } ByteBuf retain() { unwrap().retain(); return this; } @Override public final ByteBuf ret(int inc) { return retain(inc); } ByteBuf retain(int inc2) { unwrap().retain(inc2); return this; } @Override public final ByteBuf tou() { return touch(); } ByteBuf touch() { unwrap().touch(); return this; } @Override public final ByteBuf tou(Object hin) { return touch(hin); } ByteBuf touch(Object hin2) { unwrap().touch(hin2); return this; } @Override public final boolean rel() { return release(); } boolean release() { return unwrap().release(); } @Override public final boolean rel(int dec) { return release(dec); } boolean release(int dec2) { return unwrap().release(dec2); } @Override public boolean is3() { return unwrap().isReadOnly(); } @Override public ByteBuffer internal(int ind, int len) { return nio(ind, len); } @Override public ByteBuffer nio(int ind2, int len2) { return unwrap().nioBuffer(ind2, len2); } @Override public boolean is4() { 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.2220.915−73.29
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.28−6.421

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

Score0.921

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.947+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.111−0.135

Intercept 0.07 + feature contributions = 1.567 (log-odds).
Score = sigmoid(1.567) = 0.827.

Score0.881
Score45
Run 1

The code is highly unreadable due to severely mangled naming conventions. Methods like `is()`, `ref()`, `ret()`, `tou()`, `rel()`, and `is3()` obscure their intent (e.g., `isAccessible`, `refCnt`, `retain`, `touch`, `release`, `isReadOnly`). Parameter names like `inc2`, `hin2`, `ind2`, and `len2` are meaningless. The structure is redundant: `is()` just calls `is2()`, adding an extra layer without benefit. The `@Deprecated` class with overrides that simply delegate to `unwrap()` creates repetitive code, violating DRY principles. Nesting is flat but action granularity is poor—parameter names and method names are abbreviated to the point of ambiguity. Reading flow is unnatural and confusing, making the purpose hard to discern without external knowledge of Netty's ByteBuf API.

Run 2

The code suffers from severe readability issues. Method names are cryptic and abbreviated ('is', 'ref', 'ret', 'tou', 'rel', 'is3', 'is4', 'nio', 'internal', 'hin', 'dec2', 'inc2'), obscuring intent and violating clarity. The structure is tangled: methods like 'is()' delegate to 'is2()' which merely calls 'unwrap().isAccessible()', creating unnecessary indirection without added value. Parameters are renamed inconsistently ('inc' to 'inc2', 'hin' to 'hin2', 'ind' to 'ind2'), further confusing readers. Action granularity is mixed—some methods group operations, others spread trivial calls across multiple layers. Reading flow is disorganized due to non-standard naming and redundant delegation chains. While the class is relatively flat and concise, the cryptic names, misleading duplicates, and unclear purpose make it nearly unreadable. Only the package declaration and basic structure provide minimal orientation.

Run 3

The code is heavily obfuscated with meaningless method names like is(), is2(), ref(), ret(), tou(), rel(), nio(), and unclear parameter names like hin, dec, ind. This destroys clarity of intent and reading flow. Structure is repetitive and confusing: methods override short names that merely delegate to equally opaque variants, creating unnecessary layers and redundant wrapper methods. Nesting is flat, and action granularity is mostly one action per line, but these positives do not compensate for the unreadable naming and ambiguous purpose. The code appears intentionally altered to obscure standard ByteBuf methods (isAccessible, refCnt, retain, touch, release, nioBuffer), making it extremely difficult to understand. Length is moderate, but conciseness is achieved through cryptic abbreviations rather than clarity. Overall, it is nearly unreadable for any practical engineering purpose.

Run 1

Code Structure: Methods are logically grouped, with consistent delegation to the wrapped buffer. Nesting: The code is flat, with no nested control flow. Clarity of intent: Class documentation and unwrap() calls establish the wrapper purpose, but names such as is2, is3, is4, ret, and tou obscure individual operations; abbreviated and numbered parameters also reduce clarity. Code length: Methods are concise, though repeated forwarding layers add boilerplate and require readers to follow extra calls. Action granularity: Each statement performs one action, and mutations are clearly separated from returns. Reading flow: Consistent formatting, annotations, and paired overloads support predictable reading, but cryptic names and intermediary methods interrupt comprehension.

Run 2

Code Structure: Methods are logically grouped into related delegation pairs, with consistent formatting. Nesting: Entirely flat, with no complex control flow. Clarity of intent: The class documentation explains its wrapper role, but names such as is, is2, is3, is4, ref, and tou obscure individual method purposes; abbreviated and numbered parameters also reduce clarity. Code length: Individual methods are concise, though repeated forwarding layers add verbosity and navigation overhead. Action granularity: Each line performs a single clear operation, and mutations are separated from returns. Reading flow: Consistent delegation patterns make the code predictable, but readers must follow intermediate methods to discover behavior, and ambiguous names interrupt otherwise natural reading.

Run 3

Code Structure: Methods are logically grouped into related forwarding pairs, with consistent formatting. Nesting: Entirely flat, with no complex control flow. Clarity of intent: The class documentation explains its wrapper role, but names such as is, is2, is3, is4, ret, and tou obscure individual method purposes; abbreviated and numbered parameters also reduce clarity. Code length: Individual methods are concise, though repeated forwarding layers make the class longer and require extra navigation. Action granularity: Each line performs one clear operation, and mutation followed by returning this is easy to follow. Reading flow: The consistent delegation pattern supports predictable reading, but cryptic names and intermediate helper methods interrupt understanding.