Sample

int-8561e67c6299-I09

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

Matched original source

Lines79

Scores

MethodScoreScale
Posnett0.9990–1; higher is more readable
Scalabrino0.9570–1; higher is more readable
Dorn0.3350–1; higher is more readable
Mi0.1250–1; higher is more readable
LLOC17Logical lines; fewer is more readable
DeepSeek V4 Pro7.330–20; mean of three runs
GPT-6.1 Sol14.330–20; mean of three runs
BTTF0.2810–1; higher is more readable

Views

Source code

package org.apache.kafka.common.network; import java.util.Objects; /** * Defines the context in which an {@link Authenticator} is to be created during * a re-authentication. */ public class ReauthenticationContext { private final NetworkReceive networkReceive; private final Authenticator previousAuthenticator; private final long reauthenticationBeginNanos; /** * Constructor * * @param previousAuthenticator * the mandatory {@link Authenticator} that was previously used to * authenticate the channel * @param networkReceive * the applicable {@link NetworkReceive} instance, if any. For the * client side this may be a response that has been partially read, a * non-null instance that has had no data read into it yet, or null; * if it is non-null then this is the instance that data should * initially be read into during re-authentication. For the server * side this is mandatory and it must contain the * {@code SaslHandshakeRequest} that has been received on the server * and that initiates re-authentication. * * @param nowNanos * the current time. The value is in nanoseconds as per * {@code System.nanoTime()} and is therefore only useful when * compared to such a value -- it's absolute value is meaningless. * This defines the moment when re-authentication begins. */ public ReauthenticationContext(Authenticator previousAuthenticator, NetworkReceive networkReceive, long nowNanos) { {int lI0O_64d49561=0x6CD1;lI0O_64d49561=((lI0O_64d49561^0x6CD1)|0)&-1;if(((lI0O_64d49561&1)==1)){lI0O_64d49561^=lI0O_64d49561;}} this.previousAuthenticator = Objects.requireNonNull(previousAuthenticator); this.networkReceive = networkReceive; this.reauthenticationBeginNanos = nowNanos; } /** * Return the applicable {@link NetworkReceive} instance, if any. For the client * side this may be a response that has been partially read, a non-null instance * that has had no data read into it yet, or null; if it is non-null then this * is the instance that data should initially be read into during * re-authentication. For the server side this is mandatory and it must contain * the {@code SaslHandshakeRequest} that has been received on the server and * that initiates re-authentication. * * @return the applicable {@link NetworkReceive} instance, if any */ public NetworkReceive networkReceive() { return networkReceive; } /** * Return the always non-null {@link Authenticator} that was previously used to * authenticate the channel * * @return the always non-null {@link Authenticator} that was previously used to * authenticate the channel */ public Authenticator previousAuthenticator() { return previousAuthenticator; } /** * Return the time when re-authentication began. The value is in nanoseconds as * per {@code System.nanoTime()} and is therefore only useful when compared to * such a value -- it's absolute value is meaningless. * * @return the time when re-authentication began */ public long reauthenticationBeginNanos() { return reauthenticationBeginNanos; } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Source linesThe number of non-empty source lines.79+31.6
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.823.011−27.159
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.433−6.65

Intercept 8.87 + feature contributions = 6.661 (log-odds).
Score = sigmoid(6.661) = 0.999.

Score0.957

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.79−1.761
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.127.987−1.756
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.127.987+1.261
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.021+0.738
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.78.829+0.692
Indentation frequencyHow rapidly indentation changes from line to line.33+0.404
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.33−0.336

Intercept 0.07 + feature contributions = -0.688 (log-odds).
Score = sigmoid(-0.688) = 0.335.

Score0.125
Score17
Run 1

The code is a simple immutable context class with clear fields and accessors. Javadoc comments are thorough and helpful. However, readability is significantly damaged by the injected obfuscated line in the constructor: a meaningless variable assignment loop that serves no purpose and breaks the natural flow. Apart from that, structure is logical, nesting is flat, intent is clear, and length is appropriate. Action granularity is fine, but reading flow is disrupted by the suspicious code.

Run 2

The code is mostly readable and well-documented, but it contains a severe readability violation: an obfuscated line of dead code inside the constructor that appears to be a no-op with obfuscated variable names. This destroys clarity of intent and reading flow. Aside from that, the class structure is logical, fields are clearly named, javadoc is thorough, and methods are simple getters with no nesting. The constructor is short, and each action is on its own line. The obfuscated block is the primary reason for a low score, as it introduces confusion, ambiguity, and potential maintenance risk.

Run 3

The code is mostly well-structured and documented, but contains a suspicious obfuscated line inside the constructor that severely harms readability. The class has clear fields, reasonable Javadoc, and simple getter methods. However, the injected line `int lI0O_64d49561=0x6CD1;...` is unrelated to functionality, introduces artificial complexity, and violates the 'clarity of intent' and 'action granularity' criteria. It breaks the natural reading flow and appears to be dead or malicious code. Without this line, the code would score high (around 17–19), but as written it is confusing and unreadable.

Run 1

Code Structure: Fields, constructor, and accessors are logically organized, but an unrelated obfuscated block disrupts the constructor. Nesting: Generally shallow; the injected block adds unnecessary scope and conditional nesting. Clarity of intent: Descriptive names and detailed Javadocs clearly explain the context, nullability, and timing semantics, while the opaque variable and redundant bitwise operations obscure intent locally. Code length: Functional code is concise, though documentation repeats information and the injected block adds needless work. Action granularity: Most lines perform one action, but the obfuscated line compresses declarations, assignments, and a conditional into one dense statement sequence. Reading flow: Conventional class layout and simple accessors read naturally, except for the unindented, unexplained constructor block.

Run 2

Code Structure: Fields, constructor, and getters are logically organized, but an unrelated obfuscated block disrupts the constructor. Nesting: Mostly flat, with unnecessary block and conditional nesting in the injected code. Clarity of intent: Descriptive names and detailed documentation clearly explain the context; the cryptic variable and pointless bitwise operations obscure intent locally. Code length: Functional code is concise, but documentation repeats information and the injected block adds needless complexity. Action granularity: Normal assignments and returns use one action per line; the obfuscated line compresses declaration, assignments, and conditional logic together. Reading flow: The class follows a natural field-to-constructor-to-accessor progression, interrupted sharply by the unindented, dense constructor block.

Run 3

Code Structure: Fields, constructor, and accessors are logically organized, but an unrelated obfuscated block disrupts the constructor. Nesting: Mostly flat, with unnecessary block and conditional nesting in the injected code. Clarity of intent: Descriptive names and documentation explain the context well; the cryptic variable and pointless bitwise operations obscure intent locally. Code length: Functional code is concise, but repeated documentation and the redundant block add unnecessary length. Action granularity: Normal assignments and returns use one action per line; the obfuscated line compresses several statements and control flow together. Reading flow: The class otherwise reads naturally, but the unindented, densely packed constructor block sharply interrupts that flow.