The following issues were found

guava-testlib/src/com/google/common/collect/testing/google/BiMapTestSuiteBuilder.java
3 issues
Potential violation of Law of Demeter (method chain calls)
Design

Line: 109

                          .withSetUp(parentBuilder.getSetUp())
            .withTearDown(parentBuilder.getTearDown())
            .createTestSuite());
    if (!parentBuilder.getFeatures().contains(NoRecurse.INVERSE)) {
      derived.add(
          BiMapTestSuiteBuilder.using(
                  new InverseBiMapGenerator<K, V>(parentBuilder.getSubjectGenerator()))
              .withFeatures(computeInverseFeatures(parentBuilder.getFeatures()))
              .named(parentBuilder.getName() + " inverse")

            

Reported by PMD.

Potential violation of Law of Demeter (object not created locally)
Design

Line: 148

              
  private static Set<Feature<?>> computeValuesSetFeatures(Set<Feature<?>> mapFeatures) {
    Set<Feature<?>> valuesCollectionFeatures = computeCommonDerivedCollectionFeatures(mapFeatures);
    valuesCollectionFeatures.add(CollectionFeature.ALLOWS_NULL_QUERIES);

    if (mapFeatures.contains(MapFeature.ALLOWS_NULL_VALUES)) {
      valuesCollectionFeatures.add(CollectionFeature.ALLOWS_NULL_VALUES);
    }


            

Reported by PMD.

Potential violation of Law of Demeter (object not created locally)
Design

Line: 154

                    valuesCollectionFeatures.add(CollectionFeature.ALLOWS_NULL_VALUES);
    }

    valuesCollectionFeatures.add(CollectionFeature.REJECTS_DUPLICATES_AT_CREATION);

    return valuesCollectionFeatures;
  }

  private static Set<Feature<?>> computeCommonDerivedCollectionFeatures(

            

Reported by PMD.

android/guava/src/com/google/common/hash/AbstractHasher.java
3 issues
This class has too many methods, consider refactoring it.
Design

Line: 31

               */
@CanIgnoreReturnValue
@ElementTypesAreNonnullByDefault
abstract class AbstractHasher implements Hasher {
  @Override
  public final Hasher putBoolean(boolean b) {
    return putByte(b ? (byte) 1 : (byte) 0);
  }


            

Reported by PMD.

Too many control variables in the for statement
Design

Line: 49

              
  @Override
  public Hasher putUnencodedChars(CharSequence charSequence) {
    for (int i = 0, len = charSequence.length(); i < len; i++) {
      putChar(charSequence.charAt(i));
    }
    return this;
  }


            

Reported by PMD.

Potential violation of Law of Demeter (method chain calls)
Design

Line: 57

              
  @Override
  public Hasher putString(CharSequence charSequence, Charset charset) {
    return putBytes(charSequence.toString().getBytes(charset));
  }

  @Override
  public Hasher putBytes(byte[] bytes) {
    return putBytes(bytes, 0, bytes.length);

            

Reported by PMD.

android/guava/src/com/google/common/primitives/UnsignedInts.java
3 issues
This class has too many methods, consider refactoring it.
Design

Line: 51

              @Beta
@GwtCompatible
@ElementTypesAreNonnullByDefault
public final class UnsignedInts {
  static final long INT_MASK = 0xffffffffL;

  private UnsignedInts() {}

  static int flip(int value) {

            

Reported by PMD.

Consider using varargs for methods or constructors which take an array the last parameter.
Design

Line: 220

                 *
   * @since 23.1
   */
  public static void sort(int[] array) {
    checkNotNull(array);
    sort(array, 0, array.length);
  }

  /**

            

Reported by PMD.

Consider using varargs for methods or constructors which take an array the last parameter.
Design

Line: 249

                 *
   * @since 23.1
   */
  public static void sortDescending(int[] array) {
    checkNotNull(array);
    sortDescending(array, 0, array.length);
  }

  /**

            

Reported by PMD.

android/guava/src/com/google/common/collect/AbstractListMultimap.java
3 issues
Overriding method merely calls super
Design

Line: 128

                 * values.
   */
  @Override
  public Map<K, Collection<V>> asMap() {
    return super.asMap();
  }

  /**
   * Compares the specified object to this multimap for equality.

            

Reported by PMD.

Ensure you override both equals() and hashCode()
Error

Line: 139

                 * in the same order. If the value orderings disagree, the multimaps will not be considered equal.
   */
  @Override
  public boolean equals(@CheckForNull Object object) {
    return super.equals(object);
  }

  private static final long serialVersionUID = 6588350623831699109L;
}

            

Reported by PMD.

Overriding method merely calls super
Design

Line: 139

                 * in the same order. If the value orderings disagree, the multimaps will not be considered equal.
   */
  @Override
  public boolean equals(@CheckForNull Object object) {
    return super.equals(object);
  }

  private static final long serialVersionUID = 6588350623831699109L;
}

            

Reported by PMD.

android/guava/src/com/google/common/collect/AbstractSetMultimap.java
3 issues
Overriding method merely calls super
Design

Line: 125

                 * values.
   */
  @Override
  public Map<K, Collection<V>> asMap() {
    return super.asMap();
  }

  /**
   * Stores a key-value pair in the multimap.

            

Reported by PMD.

Overriding method merely calls super
Design

Line: 150

                 * Equality does not depend on the ordering of keys or values.
   */
  @Override
  public boolean equals(@CheckForNull Object object) {
    return super.equals(object);
  }

  private static final long serialVersionUID = 7431625294878419160L;
}

            

Reported by PMD.

Ensure you override both equals() and hashCode()
Error

Line: 150

                 * Equality does not depend on the ordering of keys or values.
   */
  @Override
  public boolean equals(@CheckForNull Object object) {
    return super.equals(object);
  }

  private static final long serialVersionUID = 7431625294878419160L;
}

            

Reported by PMD.

android/guava/src/com/google/common/util/concurrent/ForwardingListenableFuture.java
3 issues
Potential violation of Law of Demeter (method chain calls)
Design

Line: 47

              
  @Override
  public void addListener(Runnable listener, Executor exec) {
    delegate().addListener(listener, exec);
  }

  // TODO(cpovirk): Use standard Javadoc form for SimpleForwarding* class and constructor
  /**
   * A simplified version of {@link ForwardingListenableFuture} where subclasses can pass in an

            

Reported by PMD.

Field delegate has the same name as a method
Error

Line: 59

                 */
  public abstract static class SimpleForwardingListenableFuture<V extends @Nullable Object>
      extends ForwardingListenableFuture<V> {
    private final ListenableFuture<V> delegate;

    protected SimpleForwardingListenableFuture(ListenableFuture<V> delegate) {
      this.delegate = Preconditions.checkNotNull(delegate);
    }


            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 59

                 */
  public abstract static class SimpleForwardingListenableFuture<V extends @Nullable Object>
      extends ForwardingListenableFuture<V> {
    private final ListenableFuture<V> delegate;

    protected SimpleForwardingListenableFuture(ListenableFuture<V> delegate) {
      this.delegate = Preconditions.checkNotNull(delegate);
    }


            

Reported by PMD.

android/guava/src/com/google/common/util/concurrent/ForwardingListeningExecutorService.java
3 issues
Potential violation of Law of Demeter (method chain calls)
Design

Line: 44

              
  @Override
  public <T extends @Nullable Object> ListenableFuture<T> submit(Callable<T> task) {
    return delegate().submit(task);
  }

  @Override
  public ListenableFuture<?> submit(Runnable task) {
    return delegate().submit(task);

            

Reported by PMD.

Potential violation of Law of Demeter (method chain calls)
Design

Line: 49

              
  @Override
  public ListenableFuture<?> submit(Runnable task) {
    return delegate().submit(task);
  }

  @Override
  public <T extends @Nullable Object> ListenableFuture<T> submit(
      Runnable task, @ParametricNullness T result) {

            

Reported by PMD.

Potential violation of Law of Demeter (method chain calls)
Design

Line: 55

                @Override
  public <T extends @Nullable Object> ListenableFuture<T> submit(
      Runnable task, @ParametricNullness T result) {
    return delegate().submit(task, result);
  }
}

            

Reported by PMD.

android/guava/src/com/google/common/collect/CollectPreconditions.java
3 issues
Avoid throwing null pointer exceptions.
Design

Line: 31

              
  static void checkEntryNotNull(Object key, Object value) {
    if (key == null) {
      throw new NullPointerException("null key in entry: null=" + value);
    } else if (value == null) {
      throw new NullPointerException("null value in entry: " + key + "=null");
    }
  }


            

Reported by PMD.

Avoid throwing null pointer exceptions.
Design

Line: 33

                  if (key == null) {
      throw new NullPointerException("null key in entry: null=" + value);
    } else if (value == null) {
      throw new NullPointerException("null value in entry: " + key + "=null");
    }
  }

  @CanIgnoreReturnValue
  static int checkNonnegative(int value, String name) {

            

Reported by PMD.

All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
Design

Line: 27

              /** Precondition checks useful in collection implementations. */
@GwtCompatible
@ElementTypesAreNonnullByDefault
final class CollectPreconditions {

  static void checkEntryNotNull(Object key, Object value) {
    if (key == null) {
      throw new NullPointerException("null key in entry: null=" + value);
    } else if (value == null) {

            

Reported by PMD.

android/guava/src/com/google/common/base/JdkPattern.java
3 issues
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 26

              @ElementTypesAreNonnullByDefault
@GwtIncompatible
final class JdkPattern extends CommonPattern implements Serializable {
  private final Pattern pattern;

  JdkPattern(Pattern pattern) {
    this.pattern = Preconditions.checkNotNull(pattern);
  }


            

Reported by PMD.

Field pattern has the same name as a method
Error

Line: 26

              @ElementTypesAreNonnullByDefault
@GwtIncompatible
final class JdkPattern extends CommonPattern implements Serializable {
  private final Pattern pattern;

  JdkPattern(Pattern pattern) {
    this.pattern = Preconditions.checkNotNull(pattern);
  }


            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 53

                }

  private static final class JdkMatcher extends CommonMatcher {
    final Matcher matcher;

    JdkMatcher(Matcher matcher) {
      this.matcher = Preconditions.checkNotNull(matcher);
    }


            

Reported by PMD.

android/guava/src/com/google/common/collect/ComparisonChain.java
3 issues
This class has too many methods, consider refactoring it.
Design

Line: 61

               */
@GwtCompatible
@ElementTypesAreNonnullByDefault
public abstract class ComparisonChain {
  private ComparisonChain() {}

  /** Begins a new chained comparison statement. See example in the class documentation. */
  public static ComparisonChain start() {
    return ACTIVE;

            

Reported by PMD.

Field result has the same name as a method
Error

Line: 128

                private static final ComparisonChain GREATER = new InactiveComparisonChain(1);

  private static final class InactiveComparisonChain extends ComparisonChain {
    final int result;

    InactiveComparisonChain(int result) {
      this.result = result;
    }


            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 128

                private static final ComparisonChain GREATER = new InactiveComparisonChain(1);

  private static final class InactiveComparisonChain extends ComparisonChain {
    final int result;

    InactiveComparisonChain(int result) {
      this.result = result;
    }


            

Reported by PMD.