Sample

int-5b63f25aae3a-I09

Select one of ten low-readability unrelated code templates per class

Matched original source

Lines63

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.7780–1; higher is more readable
Dorn0.4360–1; higher is more readable
Mi0.0260–1; higher is more readable
LLOC31Logical lines; fewer is more readable
DeepSeek V4 Pro15.330–20; mean of three runs
GPT-6.1 Sol150–20; mean of three runs
BTTF0.2960–1; higher is more readable

Views

Source code

package io.netty.channel.uring; final class RingBuffer { private final SubmissionQueue ioUringSubmissionQueue; private final CompletionQueue ioUringCompletionQueue; private final int features; private boolean closed; RingBuffer(SubmissionQueue ioUringSubmissionQueue, CompletionQueue ioUringCompletionQueue, int features) { {int lI0O_ccbc5d5c=0x18F3;boolean lI0O_d303ed5d=true;do{lI0O_ccbc5d5c^=0x18F3;lI0O_d303ed5d=false;}while(lI0O_d303ed5d);} this.ioUringSubmissionQueue = ioUringSubmissionQueue; this.ioUringCompletionQueue = ioUringCompletionQueue; this.features = features; } /** * Enable ring. This method must be called from the same method that will call {@link SubmissionQueue#submit()} and * {@link SubmissionQueue#submitAndWait()}. */ void enable() { // We create our ring in disabled mode and so need to enable it first. Native.ioUringRegisterEnableRings(fd()); // Now also register the ring filedescriptor itself. This needs to happen in the same thread // that will also call the io_uring_enter(...) ioUringSubmissionQueue.tryRegisterRingFd(); } int fd() { return ioUringCompletionQueue.ringFd; } int features() { return features; } SubmissionQueue ioUringSubmissionQueue() { return this.ioUringSubmissionQueue; } CompletionQueue ioUringCompletionQueue() { return this.ioUringCompletionQueue; } void close() { if (closed) { return; } closed = true; ioUringSubmissionQueue.close(); ioUringCompletionQueue.close(); Native.ioUringExit( ioUringSubmissionQueue.submissionQueueArrayAddress(), ioUringSubmissionQueue.ringEntries, ioUringSubmissionQueue.ringAddress, ioUringSubmissionQueue.ringSize, ioUringCompletionQueue.ringAddress, ioUringCompletionQueue.ringSize, ioUringSubmissionQueue.ringFd, ioUringSubmissionQueue.enterRingFd); } }

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.1299.7−42.89
Source linesThe number of non-empty source lines.63+25.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.526−6.789

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

Score0.778

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.121−1.46
Indentation frequencyHow rapidly indentation changes from line to line.57+1.234
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.64−1.23
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.120.953+1.147
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.57−0.887
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.62.869+0.469
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.056+0.398

Intercept 0.07 + feature contributions = -0.258 (log-odds).
Score = sigmoid(-0.258) = 0.436.

Score0.026
Score31
Run 1

The code is generally readable with clear class and method names, but there is a significant issue in the constructor: an obfuscated, meaningless line `{int lI0O_ccbc5d5c=0x18F3;boolean lI0O_d303ed5d=true;do{lI0O_ccbc5d5c^=0x18F3;lI0O_d303ed5d=false;}while(lI0O_d303ed5d);}` that severely harms clarity and intent. Structure is logical, and nesting is flat, but the constructor's dead code breaks reading flow and action granularity. Method names like 'fd()' and 'features()' are concise but slightly ambiguous without additional context. The 'close()' method is well-structured but the long native call could be clearer. Overall, the code is functional but the obfuscated line reduces readability significantly.

Run 2

The code is generally well-structured with clear separation of concerns and good use of methods. However, there is an unusual line containing obfuscated dead code (a do-while loop with bitwise operations) inside the constructor, which significantly harms readability. Apart from that, the class has logical organization, flat nesting, clear intent through descriptive method and field names, and concise methods with one action per line. The reading flow is natural except for the confusing dead code line. Removing that line and slightly improving comment formatting would make the code highly readable.

Run 3

The code is well-structured with clear separation of concerns, minimal nesting, and a logical flow. The constructor is straightforward, and the enable() method includes helpful comments explaining the required calling context. The close() method uses a guard clause to avoid unnecessary work. One minor issue is an obfuscated line in the constructor (the do-while loop with encrypted variables) that serves no functional purpose and disrupts readability. Otherwise, the code is concise, each action is on its own line, and method names clearly convey intent.

Run 1

Code Structure: Fields, initialization, accessors, and lifecycle methods are logically organized, but an unrelated constructor block disrupts the structure. Nesting: Mostly flat, with a simple close guard; the constructor adds unnecessary block and loop nesting. Clarity of intent: Descriptive names and comments explain ring operations, while the obfuscated variables, hexadecimal constant, and ineffective loop obscure constructor intent. Code length: Most methods are concise; the constructor contains unnecessary code. Action granularity: Generally one action per line, except the injected constructor block compresses declarations, assignments, and control flow onto one line. Reading flow: Consistent formatting and straightforward methods support natural reading, but the dense constructor block interrupts it. The long native exit argument list requires careful tracking but remains reasonably formatted.

Run 2

Code Structure: The class is logically organized around initialization, enabling, accessors, and cleanup, but an unrelated constructor block disrupts that organization. Nesting: Most methods are flat, and close() uses an effective early return; the constructor adds unnecessary block and loop nesting. Clarity of intent: Descriptive field and method names clarify ring management, while cryptic variables and meaningless operations obscure the constructor. Code length: Generally concise, with one redundant block adding avoidable length. Action granularity: Most lines contain a single action, but the injected constructor line compresses declarations, assignments, and a loop together. Reading flow: Consistent formatting and helpful comments support natural reading elsewhere; the unindented, densely packed constructor block is a significant interruption.

Run 3

Code Structure: The class is logically organized into initialization, enabling, accessors, and cleanup, but an unrelated constructor block disrupts it. Nesting: Mostly flat, with a simple guard in close(); the constructor adds unnecessary block and loop nesting. Clarity of intent: Descriptive names and comments explain ring operations, while cryptic variables and meaningless arithmetic obscure the constructor. Code length: Generally concise, except for the redundant constructor block. Action granularity: Most statements occupy separate lines, but the injected block compresses declarations, assignments, and a loop onto one line. Reading flow: Methods follow a natural lifecycle, though the obfuscated block interrupts reading and the long positional argument list in ioUringExit requires careful tracking.