Sample

int-b49cda57e1f1-I04

Replace method, parameter, and local names with deterministic ProGuard-style short identifiers

Matched original source

Lines57

Scores

MethodScoreScale
Posnett0.9980–1; higher is more readable
Scalabrino0.9350–1; higher is more readable
Dorn0.7050–1; higher is more readable
Mi0.3350–1; higher is more readable
LLOC3Logical lines; fewer is more readable
DeepSeek V4 Pro100–20; mean of three runs
GPT-6.1 Sol120–20; mean of three runs
BTTF0.4530–1; higher is more readable

Views

Source code

package com.google.common.collect; import com.google.common.annotations.GwtCompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotMock; import java.util.Iterator; import java.util.NoSuchElementException; import org.jspecify.annotations.Nullable; /** * An iterator that supports a one-element lookahead while iterating. * * <p>See the Guava User Guide article on <a href= * "https://github.com/google/guava/wiki/CollectionHelpersExplained#peekingiterator">{@code * PeekingIterator}</a>. * * @author Mick Killianey * @since 2.0 */ @DoNotMock("Use Iterators.peekingIterator") @GwtCompatible public interface PeekingIterator<E extends @Nullable Object> extends Iterator<E> { /** * Returns the next element in the iteration, without advancing the iteration. * * <p>Calls to {@code peek()} should not change the state of the iteration, except that it * <i>may</i> prevent removal of the most recent element via {@link #remove()}. * * @throws NoSuchElementException if the iteration has no more elements according to {@link * #hasNext()} */ @ParametricNullness E a(); /** * {@inheritDoc} * * <p>The objects returned by consecutive calls to {@link #peek()} then {@link #next()} are * guaranteed to be equal to each other. */ @CanIgnoreReturnValue @Override @ParametricNullness E b(); /** * {@inheritDoc} * * <p>Implementations may or may not support removal when a call to {@link #peek()} has occurred * since the most recent call to {@link #next()}. * * @throws IllegalStateException if there has been a call to {@link #peek()} since the most recent * call to {@link #next()} and this implementation does not support this sequence of calls * (optional) */ @Override void c(); }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Source linesThe number of non-empty source lines.57+22.8
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.560.253−18.488
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.765−7.148

Intercept 8.87 + feature contributions = 6.034 (log-odds).
Score = sigmoid(6.034) = 0.998.

Score0.935

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.57−0.982
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.96.621+0.754
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.03+0.654
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.966−0.569
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.56.832+0.385
Indentation frequencyHow rapidly indentation changes from line to line.26+0.162

Intercept 0.07 + feature contributions = 0.872 (log-odds).
Score = sigmoid(0.872) = 0.705.

Score0.335
Score3
Run 1

The code demonstrates good organization, with clear interface definition, logically ordered methods, and informative Javadoc that explains intent well. The structure is flat and easy to follow. However, readability is hampered by the non-semantic method names (a(), b(), c()), which obscure intent despite good documentation. Naming is a critical element of readability, and using placeholders instead of peek(), next(), remove() creates confusion for anyone reading the implementation. The Javadoc references these methods properly, but the names themselves don't convey meaning at a glance. Action granularity is appropriate, with one annotation per line and clear separation. Overall length is concise and appropriate for an interface. The reading flow is natural due to clean ordering and minimal nesting, but the abstract method names pull it down significantly from a higher score.

Run 2

The code structure is logical with clear package declaration, proper imports, and well-written Javadoc comments explaining the interface's purpose. However, the method names 'a()', 'b()', and 'c()' are completely opaque and destroy the readability despite the excellent documentation. These should be named 'peek()', 'next()', and 'remove()' respectively. The nesting is minimal and flat, action granularity is appropriately one action per line, and reading flow from package through imports to interface declaration is natural. The interface is concise overall but the obfuscated method names create a severe disconnect between the documentation (which references peek, next, remove) and the actual code, making it confusing for implementers. The documentation-to-code mismatch would force readers to constantly refer back to comments just to understand what methods they're implementing.

Run 3

This code is effectively unreadable due to deliberate obfuscation. The method names 'a()', 'b()', and 'c()' completely obscure the intent, replacing what should be 'peek()', 'next()', and 'remove()'. This makes the code's purpose ambiguous and fails the 'Clarity of intent' and 'Reading flow' criteria entirely. While the structure is somewhat organized and documentation is present, the core identifiers are meaningless. The obfuscated names nullify any readability gained from structure or documentation, making the code almost impossible to understand or maintain.

Run 1

Code Structure: The interface is logically organized, with imports, class documentation, and separate method declarations. Nesting: Flat structure makes scanning easy. Clarity of intent: Descriptive interface documentation is undermined by opaque method names a(), b(), and c(). Comments reference peek(), next(), and remove() rather than the declared methods; the @Override annotations on b() and c() also conflict with Iterator's method names. Code length: The interface is concise, though documentation occupies most of the snippet. Action granularity: Each declaration and annotation appears on its own line, keeping elements distinct. Reading flow: Consistent formatting and method-level documentation support natural reading, but reconciling the names with the documented behavior interrupts comprehension significantly.

Run 2

Code Structure: The interface is logically organized with imports, class documentation, and three separately documented methods. Nesting: No nested control flow, making it easy to scan. Clarity of intent: The interface purpose is clear, but method names a(), b(), and c() obscure their roles. Documentation references peek(), next(), and remove() instead of the declared names, creating substantial confusion; the @Override annotations on b() and c() also conflict with Iterator's method names. Code length: The declarations are concise, and most documentation explains useful behavioral contracts, though it dominates the snippet. Action granularity: Each declaration and annotation occupies its own line; there are no bundled actions. Reading flow: Formatting and method ordering are natural, but readers must infer the mapping between documented operations and actual declarations.

Run 3

Code Structure: The interface is logically organized, with imports, class documentation, and individually documented methods. Nesting: Flat declarations make scanning easy. Clarity of intent: The interface purpose is clear, but method names a(), b(), and c() obscure their roles. Documentation references peek(), next(), and remove() rather than the declared names, creating confusion; b() and c() also incorrectly use @Override because their names do not match Iterator methods. Code length: Appropriately concise for a documented interface, though comments dominate. Action granularity: Each declaration and annotation occupies its own line, with no combined operations. Reading flow: Consistent formatting and method ordering support natural reading, but reconciling misleading names with documentation significantly interrupts comprehension.