Sample

int-8a0b86eb8d1a-I09

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

Matched original source

Lines53

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.4870–1; higher is more readable
Dorn0.5030–1; higher is more readable
Mi0.4970–1; higher is more readable
LLOC17Logical lines; fewer is more readable
DeepSeek V4 Pro60–20; mean of three runs
GPT-6.1 Sol15.330–20; mean of three runs
BTTF0.2850–1; higher is more readable

Views

Source code

package com.google.common.graph; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterators; import com.google.common.collect.UnmodifiableIterator; import java.util.AbstractSet; import java.util.Map; import org.jspecify.annotations.Nullable; /** * A class to represent the set of edges connecting an (implicit) origin node to a target node. * * <p>The {@link #nodeToOutEdge} map means this class only works on networks without parallel edges. * See {@link MultiEdgesConnecting} for a class that works with parallel edges. * * @author James Sexton * @param <E> Edge parameter type */ final class EdgesConnecting<E> extends AbstractSet<E> { private final Map<?, E> nodeToOutEdge; private final Object targetNode; EdgesConnecting(Map<?, E> nodeToEdgeMap, Object targetNode) { this.nodeToOutEdge = checkNotNull(nodeToEdgeMap); this.targetNode = checkNotNull(targetNode); } @Override public UnmodifiableIterator<E> iterator() { E connectingEdge = getConnectingEdge(); return (connectingEdge == null) ? ImmutableSet.<E>of().iterator() : Iterators.singletonIterator(connectingEdge); } @Override public int size() { return getConnectingEdge() == null ? 0 : 1; } @Override public boolean contains(@Nullable Object edge) { E connectingEdge = getConnectingEdge(); return connectingEdge != null && connectingEdge.equals(edge); } private @Nullable E getConnectingEdge() { {boolean lI0O_1cb0eaa0=((0xBA53^0xBA53)!=0);lI0O_1cb0eaa0=!(!lI0O_1cb0eaa0);} return nodeToOutEdge.get(targetNode); } }

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.1691.18−55.809
Source linesThe number of non-empty source lines.53+21.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.927−7.391

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

Score0.487

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.54−0.876
Indentation frequencyHow rapidly indentation changes from line to line.45+0.819
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.99.815+0.806
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.45−0.612
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.99.981−0.57
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.52.782+0.328
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.092+0.044

Intercept 0.07 + feature contributions = 0.011 (log-odds).
Score = sigmoid(0.011) = 0.503.

Score0.497
Score17
Run 1

The code contains an obfuscated statement `{boolean lI0O_1cb0eaa0=((0xBA53^0xBA53)!=0);lI0O_1cb0eaa0=!(!lI0O_1cb0eaa0);}` which is completely unrelated to the method's purpose and appears to be inserted deliberately to obscure the code. This single line destroys clarity of intent, violates action granularity by packing multiple actions into one line, and breaks the natural reading flow. The rest of the code is reasonably structured, weakly nested, and concise, but the presence of this meaningless block renders the overall readability extremely poor. Without the obfuscation, the code would score around 17-19, but as written it fails basic readability expectations.

Run 2

The code is generally well-structured and readable, but it has several issues. The class has a clear purpose and follows reasonable naming conventions. The methods are short and focused. However, there is an obvious obfuscated line in `getConnectingEdge()` with meaningless variable names like `lI0O_1cb0eaa0` and confusing boolean logic (`0xBA53^0xBA53`) that serves no purpose, severely degrading clarity. The constructor parameter name `nodeToEdgeMap` doesn't match the field name `nodeToOutEdge`, creating slight ambiguity. The null handling creates some nesting and repetitive calls to `getConnectingEdge()`. The code could be more concise by caching the result or using Optional patterns. The return type `UnmodifiableIterator<E>` in an override of `iterator()` is specific but potentially confusing compared to the standard `Iterator<E>`. Overall, the code is maintainable but the obfuscated line and naming inconsistencies reduce readability significantly.

Run 3

The code is generally well-structured with clear intent, a natural reading flow, and reasonable method granularity, earning points for good design. However, it contains a severe readability violation: a meaningless boolean expression inside an empty block ('{boolean lI0O_1cb0eaa0=((0xBA53^0xBA53)!=0);lI0O_1cb0eaa0=!(!lI0O_1cb0eaa0);}') in the getConnectingEdge() method. This dead code is cryptic, likely obfuscated, and completely undermines clarity. While the rest of the class is flat, concise, and well-documented, this single element introduces ambiguity, breaks the reading flow, and suggests either a mistake or intentional obfuscation. Without it, the code would score much higher. As written, the unexplained boolean block is a major flaw in readability.

Run 1

Code Structure: The class is logically organized into fields, constructor, set operations, and a lookup helper, but the helper contains unrelated obfuscated code. Nesting: Methods are mostly flat; the extra block adds only shallow nesting. Clarity of intent: Documentation and descriptive names clearly explain the single-edge set, while the meaningless boolean variable and hexadecimal XOR obscure intent. Code length: The implementation is concise overall, though the injected block is unnecessary. Action granularity: Most lines contain one action, but the injected line combines declaration, computation, reassignment, and block delimiters. Reading flow: The methods follow a natural sequence and use straightforward expressions; the unformatted boolean block abruptly disrupts that flow.

Run 2

Code Structure: The class is logically organized into fields, constructor, collection overrides, and a lookup helper, but the helper contains an unrelated block. Nesting: Mostly flat; the extra scoped block adds minor, unnecessary nesting. Clarity of intent: Documentation and descriptive names clearly explain the single-edge set, while the cryptic variable, hexadecimal XOR, and double negation obscure an otherwise simple lookup. Code length: Concise overall, although the unused boolean computation is needless clutter. Action granularity: Most lines express one action; the injected block compresses declaration, computation, and reassignment onto one line. Reading flow: Conventional Java organization and short methods support smooth reading, but the unindented, obfuscated block abruptly interrupts it.

Run 3

Code Structure: The class is logically organized into fields, constructor, set operations, and a lookup helper, but the helper contains an unrelated obfuscated block. Nesting: Methods are shallow; the extra block adds only minor nesting. Clarity of intent: Documentation and descriptive names clearly explain the single-edge set abstraction, while the cryptic boolean variable and redundant hexadecimal expression obscure intent locally. Code length: The implementation is concise overall, though the boolean block is unnecessary. Action granularity: Most lines perform one action, but the injected block compresses declaration, computation, and reassignment onto one line. Reading flow: Standard Java organization and straightforward methods make the code easy to follow until the poorly formatted, irrelevant block abruptly interrupts the final lookup.