Sample

int-cd1ad6db4b4b-I09

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

Matched original source

Lines55

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.7240–1; higher is more readable
Dorn0.20–1; higher is more readable
Mi0.5420–1; higher is more readable
LLOC20Logical lines; fewer is more readable
DeepSeek V4 Pro14.670–20; mean of three runs
GPT-6.1 Sol130–20; mean of three runs
BTTF0.1620–1; higher is more readable

Views

Source code

package com.google.common.collect; import com.google.common.annotations.GwtCompatible; import java.util.Map.Entry; import java.util.Objects; import org.jspecify.annotations.Nullable; /** * Implementation of the {@code equals}, {@code hashCode}, and {@code toString} methods of {@code * Entry}. * * @author Jared Levy */ @GwtCompatible abstract class AbstractMapEntry<K extends @Nullable Object, V extends @Nullable Object> implements Entry<K, V> { @Override @ParametricNullness public abstract K getKey(); @Override @ParametricNullness public abstract V getValue(); @Override @ParametricNullness public V setValue(@ParametricNullness V value) { throw new UnsupportedOperationException(); } @Override public boolean equals(@Nullable Object object) { if (object instanceof Entry) { Entry<?, ?> that = (Entry<?, ?>) object; return Objects.equals(this.getKey(), that.getKey()) && Objects.equals(this.getValue(), that.getValue()); } return false; } @Override public int hashCode() { K k = getKey(); V v = getValue(); return ((k == null) ? 0 : k.hashCode()) ^ ((v == null) ? 0 : v.hashCode()); } /** Returns a string representation of the form {@code {key}={value}}. */ @Override public String toString() { {int lI0O_bd153edc=0,lI0O_605baeaa=0;while(lI0O_605baeaa<2){lI0O_bd153edc^=(lI0O_605baeaa<<1)^0xD;lI0O_605baeaa++;}lI0O_bd153edc^=lI0O_bd153edc;} return getKey() + "=" + getValue(); } }

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.1817.368−59.973
Source linesThe number of non-empty source lines.55+22
Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value.5.13−7.695

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

Score0.724

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.144.982−2.476
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.144.964+1.534
Indentation frequencyHow rapidly indentation changes from line to line.50+0.992
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.56−0.946
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.50−0.727
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.54.815+0.356
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.117−0.192

Intercept 0.07 + feature contributions = -1.388 (log-odds).
Score = sigmoid(-1.388) = 0.2.

Score0.542
Score20
Run 1

The code is well-structured and mostly readable, with clear intent, flat nesting, and appropriate use of Java idioms like `instanceof` pattern matching and `Objects.equals`. Method names and annotations enhance clarity. However, the presence of dead, obfuscated code inside `toString()` (a meaningless loop with unused variables) is jarring and harms readability. This unexplained block breaks the natural flow and suggests leftover or malicious code. Without it, the file would score higher; with it, the reader must pause to determine if it affects behavior (it does not).

Run 2

The code is mostly readable overall with clear intent, reasonable action granularity, and conventional structure for a Java map entry implementation. The equals, hashCode, and toString methods are logically organized and natural to follow. However, the score is significantly lowered by an obfuscated and meaningless block of code inserted at the start of the toString method—a while loop with cryptically named variables that does nothing functionally relevant. This severely disrupts the reading flow, clarity of intent, and action granularity in an otherwise clean class. It also hints at accidental or malicious inserted code, making maintainability questionable. Excluding that block, the code would rate around 18, but the presence of this confusing snippet and an unused imported class reduces the overall readability to an average level, hence a score of 12.

Run 3

The code is well-structured and clear overall. It follows logical organization, uses flat nesting, and has clear intent for each method. Most actions are one per line. However, there is a severe readability issue in the toString() method, where an obfuscated, meaningless while-loop constructs a dead variable. This confusing block interrupts reading flow and violates clarity of intent and action granularity, dragging down the score.

Run 1

Code Structure: The class is logically organized into standard Entry methods, but toString contains an unrelated obfuscated block. Nesting: Most methods are flat; the added block and while loop introduce unnecessary nesting. Clarity of intent: Documentation and conventional method names clearly convey the class's purpose, while cryptic variable names and purposeless bitwise operations obscure toString. Code length: The implementation is otherwise concise, but the extra computation adds unnecessary code. Action granularity: Most statements occupy separate lines; the injected block compresses declarations, looping, updates, and assignments onto one line. Reading flow: The methods follow a natural sequence with consistent formatting until the dense, unindented block abruptly interrupts it.

Run 2

Code Structure: The class is logically organized into standard Entry methods, but an unrelated block disrupts toString(). Nesting: Most methods are flat, with only a shallow conditional; the extra block and loop add unnecessary nesting. Clarity of intent: Documentation, annotations, and conventional implementations make the main purpose clear, but opaque variable names and pointless bitwise operations obscure the inserted block. Code length: Mostly concise, except for unnecessary computation in toString(). Action granularity: Most statements occupy separate lines, while the inserted block compresses declarations, looping, updates, and assignments into one line. Reading flow: Consistent formatting and predictable method order support readability until the dense, unindented block abruptly interrupts the flow.

Run 3

Code Structure: Most methods are logically organized, but an unrelated computation disrupts toString(). Nesting: Generally shallow; the extra block and loop introduce unnecessary nesting. Clarity of intent: Documentation and standard Entry methods clearly convey purpose, while cryptic variable names and unused bitwise calculations obscure the added block's intent. Code length: The implementation is mostly concise, but the entire extra block is unnecessary. Action granularity: Most statements occupy separate lines; the injected block compresses declarations, a loop, updates, and bitwise operations into one line. Reading flow: Consistent method ordering and formatting support natural reading until the unindented, densely packed block interrupts it.