Sample

int-6824ad7c2d47-I11

Split eligible integer literals into pairs of short-named intermediate variables

Matched original source

Lines80

Scores

MethodScoreScale
Posnett0.9950–1; higher is more readable
Scalabrino0.7880–1; higher is more readable
Dorn0.6610–1; higher is more readable
Mi0.230–1; higher is more readable
LLOC5Logical lines; fewer is more readable
DeepSeek V4 Pro18.330–20; mean of three runs
GPT-6.1 Sol190–20; mean of three runs
BTTF0.5590–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 java.util.Collection; import java.util.List; import java.util.Map; import org.jspecify.annotations.Nullable; /** * A {@code Multimap} that can hold duplicate key-value pairs and that maintains the insertion * ordering of values for a given key. See the {@link Multimap} documentation for information common * to all multimaps. * * <p>The {@link #get}, {@link #removeAll}, and {@link #replaceValues} methods each return a {@link * List} of values. Though the method signature doesn't say so explicitly, the map returned by * {@link #asMap} has {@code List} values. * * <p>See the Guava User Guide article on <a href= * "https://github.com/google/guava/wiki/NewCollectionTypesExplained#multimap">{@code Multimap}</a>. * * @author Jared Levy * @since 2.0 */ @GwtCompatible public interface ListMultimap<K extends @Nullable Object, V extends @Nullable Object> extends Multimap<K, V> { /** * {@inheritDoc} * * <p>Because the values for a given key may have duplicates and follow the insertion ordering, * this method returns a {@link List}, instead of the {@link java.util.Collection} specified in * the {@link Multimap} interface. */ @Override List<V> get(@ParametricNullness K key); /** * {@inheritDoc} * * <p>Because the values for a given key may have duplicates and follow the insertion ordering, * this method returns a {@link List}, instead of the {@link java.util.Collection} specified in * the {@link Multimap} interface. */ @CanIgnoreReturnValue @Override List<V> removeAll(@Nullable Object key); /** * {@inheritDoc} * * <p>Because the values for a given key may have duplicates and follow the insertion ordering, * this method returns a {@link List}, instead of the {@link java.util.Collection} specified in * the {@link Multimap} interface. */ @CanIgnoreReturnValue @Override List<V> replaceValues(@ParametricNullness K key, Iterable<? extends V> values); /** * {@inheritDoc} * * <p><b>Note:</b> The returned map's values are guaranteed to be of type {@link List}. To obtain * this map with the more specific generic type {@code Map<K, List<V>>}, call {@link * Multimaps#asMap(ListMultimap)} instead. */ @Override Map<K, Collection<V>> asMap(); /** * Compares the specified object to this multimap for equality. * * <p>Two {@code ListMultimap} instances are equal if, for each key, they contain the same values * in the same order. If the value orderings disagree, the multimaps will not be considered equal. * * <p>An empty {@code ListMultimap} is equal to any other empty {@code Multimap}, including an * empty {@code SetMultimap}. */ @Override boolean equals(@Nullable Object obj); }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Source linesThe number of non-empty source lines.80+32
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.859.051−28.349
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.84−7.26

Intercept 8.87 + feature contributions = 5.261 (log-odds).
Score = sigmoid(5.261) = 0.995.

Score0.788

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
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.93.827+0.709
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.79.772+0.705
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.028+0.674
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.975−0.569
Indentation frequencyHow rapidly indentation changes from line to line.34+0.439
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398

Intercept 0.07 + feature contributions = 0.666 (log-odds).
Score = sigmoid(0.666) = 0.661.

Score0.23
Score5
Run 1

The code is well-structured Java interface code with clear intent. The structure is logical, with imports grouped together and methods organized consistently. Nesting is minimal—only one level of generic type parameters and no deep conditional nesting. Clarity of intent is strong: each method's purpose is documented with Javadoc, especially the deviations from the parent interface. Code length is concise; the interface itself is short, though some Javadoc comments are repetitive, which slightly reduces readability. Action granularity is appropriate—each method declaration and annotation is on its own line. Reading flow is natural, with Javadoc summaries preceding each method. The main minor drawbacks are repetitive Javadoc blocks and long generic type declarations in the class signature, which could be visually noisy, but overall this is highly readable library code.

Run 2

The code is highly readable. It is well-structured as a focused interface with clear Javadoc explaining behavioral contracts. Nesting is minimal and flat. Intent is unambiguous, especially because the documentation explicitly clarifies the return types and ordering semantics for get, removeAll, replaceValues, and asMap. The code is concise rather than verbose, with each method declaration occupying one logical line, and formatting supports one action per line. Reading flow is natural: type declaration, overridden methods grouped logically, and a final equals method, followed by relevant documentation. Minor deduction only because some type annotations (@ParametricNullness, @Nullable) add slight visual noise, but they are necessary for nullness contracts.

Run 3

The code is highly readable. Structure is logical, following standard Java interface conventions. Nesting is minimal—only method declarations exist, with no deep control flow. Intent is very clear: this interface extends Multimap to enforce List-based values, and Javadoc explanations reinforce purpose. Length is appropriate; each method is short and well-documented without redundancy. Action granularity is excellent, with each method on its own line and annotated clearly. Reading flow is natural: package, imports, class Javadoc, declaration, method overrides, equality. Overall, it is concise, well-organized, and easy to understand.

Run 1

Code Structure: The interface is logically organized, with imports, interface-level documentation, and clearly separated method declarations. Nesting: Minimal nesting and no control flow make scanning straightforward. Clarity of intent: Descriptive method names, explicit types, annotations, and detailed contracts clearly communicate insertion ordering, duplicates, return types, and equality semantics. Code length: Declarations are concise, although nearly identical documentation across three methods adds repetition. Action granularity: Each declaration stands independently, with annotations on separate lines and no combined actions. Reading flow: Consistent formatting and documentation placement create a natural top-to-bottom flow. Minor distractions include dense generic annotations and some awkward Javadoc wrapping, but overall readability is excellent.

Run 2

Code Structure: The interface is logically organized, with imports, interface-level documentation, and individually documented method declarations. Nesting: The code is flat, with no nested control flow. Clarity of intent: Descriptive method names, explicit types, annotations, and Javadoc clearly explain duplicate handling, insertion ordering, return types, and equality semantics. Code length: Declarations are concise, though repeated explanations across three methods slightly increase reading overhead. Action granularity: Each method declaration occupies its own line, and annotations are clearly separated; there are no combined actions. Reading flow: Consistent formatting and documentation placement make the interface easy to scan. Minor drawbacks include the lack of spacing after the package declaration and some visually dense generic and annotation syntax.

Run 3

Code Structure: The interface is logically organized, with imports, class-level documentation, and consistently documented method declarations. Nesting: It is flat, with no nested control flow. Clarity of intent: Descriptive names, precise generic types, annotations, and documentation clearly explain duplicate handling, insertion ordering, return types, and equality semantics. Code length: Declarations are concise, though repeated documentation about List return types adds some unnecessary length. Action granularity: Each method declaration occupies its own line, and annotations are cleanly separated; there are no combined actions. Reading flow: Consistent formatting and documentation immediately preceding each method support natural reading. Minor drawbacks are the dense annotation syntax and lack of blank lines separating the package declaration and import groups.