Sample

int-16ef6a528e62-I10

Remove about 40% of line-break groups while retaining structure

Matched original source

Lines71

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.8370–1; higher is more readable
Dorn0.380–1; higher is more readable
Mi0.5170–1; higher is more readable
LLOC45Logical lines; fewer is more readable
DeepSeek V4 Pro6.670–20; mean of three runs
GPT-6.1 Sol11.330–20; mean of three runs
BTTF0.5170–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 maxCapacity) { super(maxCapacity); } @Override final boolean isAccessible() { return isAccessible0(); } boolean isAccessible0() { return unwrap().isAccessible(); } @Override public final int refCnt() { return refCnt0(); } int refCnt0() { return unwrap().refCnt(); } @Override public final ByteBuf retain() { return retain0(); } ByteBuf retain0() { unwrap().retain(); return this; } @Override public final ByteBuf retain(int increment) { return retain0(increment); } ByteBuf retain0(int increment) { unwrap().retain(increment); return this; } @Override public final ByteBuf touch() { return touch0(); } ByteBuf touch0() { unwrap().touch(); return this; } @Override public final ByteBuf touch(Object hint) { return touch0(hint); } ByteBuf touch0(Object hint) { unwrap().touch(hint); return this; } @Override public final boolean release() { return release0(); } boolean release0() { return unwrap().release(); } @Override public final boolean release(int decrement) { return release0(decrement); } boolean release0(int decrement) { return unwrap().release(decrement); } @Override public boolean isReadOnly() { return unwrap().isReadOnly(); } @Override public ByteBuffer internalNioBuffer(int index, int length) { return nioBuffer(index, length); } @Override public ByteBuffer nioBuffer(int index, int length) { return unwrap().nioBuffer(index, length); } @Override public boolean isContiguous() { 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.2136.514−70.505
Source linesThe number of non-empty source lines.71+28.4
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.526−6.789

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

Score0.837

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.161.958−3.195
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.162+1.809
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.72−1.513
Indentation frequencyHow rapidly indentation changes from line to line.64+1.477
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.70.736+0.579
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.109−0.114

Intercept 0.07 + feature contributions = -0.489 (log-odds).
Score = sigmoid(-0.489) = 0.38.

Score0.517
Score45
Run 1

This code demonstrates poor readability due to inconsistent formatting, multiple statements on single lines, and disorganized structure. While the class has a clear purpose (delegating ByteBuf operations), the implementation is marred by compressed method declarations, misplaced annotations, and inconsistent indentation. Multiple methods are crammed onto single lines (e.g., 'isAccessible()', 'refCnt()', 'retain()'), violating the one-action-per-line principle. The reading flow is disrupted by irregular spacing and inconsistent line breaks. Nesting is minimal, which is positive, but the overall structure lacks logical grouping of related methods. The code length is concise but at the expense of clarity. Method names and the delegation pattern are clear, but the formatting obscures the intent. This appears rushed or auto-generated without human formatting polish, making maintenance and review unnecessarily difficult.

Run 2

The code shows mixed readability. There are logical groupings of related methods (refCnt, retain, touch, release) and consistent use of a delegation pattern, but formatting is inconsistent with several methods crammed onto single lines, making the code visually cluttered and hard to scan. The nesting depth is minimal and the intent is mostly clear (each method delegates to unwrap()), but the inconsistent spacing and line breaks hurt readability significantly. Some methods are concise while others are unnecessarily verbose for simple delegation. The action granularity suffers from multiple statements per line, violating the one-action-per-line principle. Reading flow is disrupted by the inconsistent formatting, though the logical structure is fundamentally sound.

Run 3

The code shows some logical organization with methods grouped by reference counting and buffer operations, but formatting severely hurts readability. Multiple methods are packed onto single lines, inconsistent spacing and brace placement disrupt reading flow, and action granularity violates the one-action-per-line principle in many places. Nesting is mostly flat, which is positive, but intent is often obscured by compressed method definitions. The deprecated wrapper pattern is recognizable, but the inconsistent layout makes it harder to scan than necessary. Overall, the logic is simple and could be highly readable with proper formatting, but as-is it fails several readability criteria.

Run 1

Code Structure: Methods are logically grouped around delegating operations to the wrapped buffer, but inconsistent formatting obscures method boundaries. Nesting: Very shallow, with no nested control flow. Clarity of intent: Descriptive method names and straightforward delegation make the purpose clear, although the extra helper layer adds some navigation overhead. Code length: Compact and mostly appropriate, with minor repetitive boilerplate. Action granularity: Several lines combine multiple statements, annotations, or method declarations, making individual actions harder to distinguish. Reading flow: Irregular brace placement and compressed declarations interrupt otherwise predictable reading. The underlying logic is readable, but presentation significantly reduces scanability.

Run 2

Code Structure: Methods are logically grouped around buffer delegation and reference counting, but inconsistent formatting obscures their boundaries. Nesting: Very flat, with no complex conditionals or loops. Clarity of intent: The class documentation, familiar method names, and unwrap() calls make its delegation purpose clear; helper names ending in 0 are less descriptive. Code length: Short methods and minimal logic keep it concise, although repetitive forwarding adds some overhead. Action granularity: Several lines combine method declarations, annotations, braces, or multiple statements, making individual actions harder to distinguish. Reading flow: Irregular line breaks and adjacent method definitions disrupt scanning despite the sensible method order. Overall, straightforward logic is undermined by poor presentation.

Run 3

Code Structure: Methods are logically grouped around delegation and reference counting, but inconsistent formatting obscures method boundaries. Nesting: Very shallow, with no complex control flow. Clarity of intent: Descriptive method names and straightforward delegation to unwrap() make the purpose clear, although the suffix-0 helper convention is unexplained. Code length: Methods are concise; repetitive wrappers add some length but serve a recognizable design pattern. Action granularity: Several lines combine calls, returns, braces, annotations, or multiple method declarations, reducing readability. Reading flow: Irregular line breaks, inline annotations, and crowded declarations repeatedly interrupt scanning. Overall, the simple logic is understandable, but poor formatting substantially weakens readability.