gt:             o3 == null ? NullHashCode : hashCode(o3)
context: /*
   * HashUtilities.java
   *
   * Copyright (c) 2012 Mike Strobel
   *
   * This source code is subject to terms and conditions of the Apache License, Version 2.0.
   * A copy of the license can be found in the License.html file at the root of this distribution.
   * By using this source code in any fashion, you are agreeing to be bound by the terms of the
   * Apache License, Version 2.0.
   *
   * You must not remove this notice, or any other, from this software.
   */
  
  package com.strobel.core;
  
  import java.util.Arrays;
  
  /**
   * @author strobelm
   */
  public final class HashUtilities {
      public static final int NullHashCode = 0x61E04917;
  
      private static final int HashPrime = 101;
      private static final int CombinedHashOffset = 5;
      private final static int MaxPrimeArrayLength = 0x7FEFFFFD;
  
      private HashUtilities() {
          throw new UnsupportedOperationException();
      }
  
      public static int hashCode(final Object o) {
          if (o == null) {
              return NullHashCode;
          }
  
          if (o.getClass().isArray()) {
              if (o instanceof Object[]) {
                  return combineHashCodes((Object[]) o);
              }
  
              if (o instanceof byte[]) {
                  return Arrays.hashCode((byte[]) o);
              }
  
              if (o instanceof short[]) {
                  return Arrays.hashCode((short[]) o);
              }
  
              if (o instanceof int[]) {
                  return Arrays.hashCode((int[]) o);
              }
  
              if (o instanceof long[]) {
                  return Arrays.hashCode((long[]) o);
              }
  
              if (o instanceof char[]) {
                  return Arrays.hashCode((char[]) o);
              }
  
              if (o instanceof float[]) {
                  return Arrays.hashCode((float[]) o);
              }
  
              if (o instanceof double[]) {
                  return Arrays.hashCode((double[]) o);
              }
  
              if (o instanceof boolean[]) {
                  return Arrays.hashCode((boolean[]) o);
              }
          }
  
          return o.hashCode();
      }
      
      public static int combineHashCodes(final int... hashes) {
          int hash = 0;
  
          for (final int h : hashes) {
              hash <<= CombinedHashOffset;
              hash ^= h;
          }
  
          return hash;
      }
  
      public static int combineHashCodes(final Object... objects) {
          int hash = 0;
  
          for (final Object o : objects) {
              int entryHash = NullHashCode;
  
              if (o != null) {
                  if (o instanceof Object[]) {
                      entryHash = combineHashCodes((Object[])o);
                  }
                  else {
                      entryHash = hashCode(o);
                  }
              }
  
              hash <<= CombinedHashOffset;
              hash ^= entryHash;
          }
  
          return hash;
      }
  
      public static int combineHashCodes(final int hash1, final int hash2) {
          return (hash1 << CombinedHashOffset) ^ hash2;
      }
  
      public static int combineHashCodes(final int hash1, final int hash2, final int hash3) {
          return (((hash1 << CombinedHashOffset)
                   ^ hash2) << CombinedHashOffset)
                 ^ hash3;
      }
  
      public static int combineHashCodes(final int hash1, final int hash2, final int hash3, final int hash4) {
          return (((((hash1 << CombinedHashOffset)
                     ^ hash2) << CombinedHashOffset)
                   ^ hash3) << CombinedHashOffset)
                 ^ hash4;
      }
  
      public static int combineHashCodes(
          final int hash1,
          final int hash2,
          final int hash3,
          final int hash4,
          final int hash5) {
  
          return (((((((hash1 << CombinedHashOffset)
                       ^ hash2) << CombinedHashOffset)
                     ^ hash3) << CombinedHashOffset)
                   ^ hash4) << CombinedHashOffset)
                 ^ hash5;
      }
  
      public static int combineHashCodes(
          final int hash1,
          final int hash2,
          final int hash3,
          final int hash4,
          final int hash5,
          final int hash6) {
  
          return (((((((((hash1 << CombinedHashOffset)
                         ^ hash2) << CombinedHashOffset)
                       ^ hash3) << CombinedHashOffset)
                     ^ hash4) << CombinedHashOffset)
                   ^ hash5) << CombinedHashOffset)
                 ^ hash6;
      }
  
      public static int combineHashCodes(
          final int hash1,
          final int hash2,
          final int hash3,
          final int hash4,
          final int hash5,
          final int hash6,
          final int hash7) {
  
          return (((((((((((hash1 << CombinedHashOffset)
                           ^ hash2) << CombinedHashOffset)
                         ^ hash3) << CombinedHashOffset)
                       ^ hash4) << CombinedHashOffset)
                     ^ hash5) << CombinedHashOffset)
                   ^ hash6) << CombinedHashOffset)
                 ^ hash7;
      }
  
      public static int combineHashCodes(
          final int hash1,
          final int hash2,
          final int hash3,
          final int hash4,
          final int hash5,
          final int hash6,
          final int hash7,
          final int hash8) {
  
          return (((((((((((((hash1 << CombinedHashOffset)
                             ^ hash2) << CombinedHashOffset)
                           ^ hash3) << CombinedHashOffset)
                         ^ hash4) << CombinedHashOffset)
                       ^ hash5) << CombinedHashOffset)
                     ^ hash6) << CombinedHashOffset)
                   ^ hash7) << CombinedHashOffset)
                 ^ hash8;
      }
  
      public static int combineHashCodes(final Object o1, final Object o2) {
          return combineHashCodes(
              o1 == null ? NullHashCode : hashCode(o1),
              o2 == null ? NullHashCode : hashCode(o2)
          );
      }
  
      public static int combineHashCodes(final Object o1, final Object o2, final Object o3) {
          return combineHashCodes(
              o1 == null ? NullHashCode : hashCode(o1),
              o2 == null ? NullHashCode : hashCode(o2),
  