Returns the leftmost differing bit index when doing a bitwise comparison of key1 and key2

@param key1  first key to compare
@param key2  second key to compare
@return bit index of first different bit
550617
private int findFirstDifferingBit(String key1, String key2) {
        int bit = 0;

        while (keyMapper.isSet(bit, key1) == keyMapper.isSet(bit, key2)) {
            bit++;
        }
        return bit;
    }
155493
protected static int compareStrings(int offset_1, int offset_2, ByteBuffer bb) {
    offset_1 += bb.getInt(offset_1);
    offset_2 += bb.getInt(offset_2);
    int len_1 = bb.getInt(offset_1);
    int len_2 = bb.getInt(offset_2);
    int startPos_1 = offset_1 + SIZEOF_INT;
    int startPos_2 = offset_2 + SIZEOF_INT;
    int len = Math.min(len_1, len_2);
    for(int i = 0; i < len; i++) {
      if (bb.get(i + startPos_1) != bb.get(i + startPos_2))
        return bb.get(i + startPos_1) - bb.get(i + startPos_2);
    }
    return len_1 - len_2;
  }
983003
public static final int compare(MemorySegment seg1, MemorySegment seg2, int offset1, int offset2, int len) {
		final byte[] b1 = seg1.memory;
		final byte[] b2 = seg2.memory;
		
		int val = 0;
		for (int pos = 0; pos < len && (val = (b1[offset1 + pos] & 0xff) - (b2[offset2 + pos] & 0xff)) == 0; pos++);
		return val;
	}
673897
static public int compare(byte[] first, byte[] second) {
        // choose the shorter array length
        int firstLength = first.length;
        int secondLength = second.length;
        int shorterLength = Math.min(firstLength, secondLength);

        // compare matching bytes
        for (int i = 0; i < shorterLength; i++) {
            int result = Byte.compare(first[i], second[i]);
            if (result != 0) return Integer.signum(result);
        }

        // compare lengths if bytes match
        if (firstLength < secondLength) return -1;
        if (firstLength > secondLength) return 1;

        // must be same length and equal
        return 0;
    }
792791
public V get(K1 key1, K2 key2) {
        return JMOptional.getOptional(nestedMap, key1).map(map -> map.get(key2))
                .orElse(null);
    }
214941
public static int find(
		MemorySegment[] segments1, int offset1, int numBytes1,
		MemorySegment[] segments2, int offset2, int numBytes2) {
		if (numBytes2 == 0) { // quick way 1.
			return offset1;
		}
		if (inFirstSegment(segments1, offset1, numBytes1) &&
			inFirstSegment(segments2, offset2, numBytes2)) {
			byte first = segments2[0].get(offset2);
			int end = numBytes1 - numBytes2 + offset1;
			for (int i = offset1; i <= end; i++) {
				// quick way 2: equal first byte.
				if (segments1[0].get(i) == first &&
					segments1[0].equalTo(segments2[0], i, offset2, numBytes2)) {
					return i;
				}
			}
			return -1;
		} else {
			return findInMultiSegments(segments1, offset1, numBytes1, segments2, offset2, numBytes2);
		}
	}
774865
@Pure
	@Inline(value="($1 & $2)", constantExpression=true)
	public static int bitwiseAnd(int a, int b) {
		return a & b;
	}
123985
public SortedMap<Bits, T> getCodes(final Bits fromKey) {
    final Bits next = fromKey.next();
    final SortedMap<Bits, T> subMap = null == next ? this.forwardIndex
      .tailMap(fromKey) : this.forwardIndex.subMap(fromKey, next);
    return subMap;
  }
407681
public int findLowestKey(int min) {
        int lowest = Integer.MAX_VALUE;
        int index = index(hash(min));
        final int maxTry = capacity;
        for (int i = 0; i < maxTry; i++) {
            if (!slotIsFree(index)) {
                int k = keys[index];
                if (k == min) return min;
                if (min < k && k < lowest) lowest = k;
            }
            index = nextIndex(index);
        }
        return lowest;
    }
1101846
public int getIndex(Object key) {
    int[] nums = (int[]) cset.get(key);
    if (nums == null) {
      return -1;
    }
    else {
      return nums[1];
    }
  }
47185
public Object bitwiseOr(Object left, Object right) {
    long l = toLong(left);
    long r = toLong(right);
    return Long.valueOf(l | r);
  }
382927
private int compare(Object key1, Object key2) {
        if (comparator == null)
            return ((Comparable) key1).compareTo(key2);
        else
            return comparator.compare(key1, key2);
    }
1202496
public static int compareUnsigned(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
    {
        return BestHolder.BEST.compare(b1, s1, l1, b2, s2, l2);
    }
183290
public static int difference(String s1, String s2) {

        /** @todo: check if this is the standard algorithm */
        if ((s1 == null) || (s2 == null)) {
            return 0;
        }

        s1 = soundex(s1);
        s2 = soundex(s2);

        int e = 0;

        for (int i = 0; i < 4; i++) {
            if (s1.charAt(i) != s2.charAt(i)) {
                e++;
            }
        }

        return e;
    }
52669
public Integer getFirstPosition(String key) {
        int position = -1;
        String processedKey = processKey(key);

        if (this.values.containsKey(processedKey) == true) {
            position = this.order.indexOf(processedKey);
        }
        return position;
    }
135816
public TwoDHashMap<K2, K3, V> getAs2d(final K1 firstKey) {
		final HashMap<K2, HashMap<K3, V>> innerMap1 = map.get(firstKey);
		if( innerMap1 != null ) {
			return new TwoDHashMap<K2, K3, V>(innerMap1);
		} else {
			return new TwoDHashMap<K2, K3, V>();
		}
		
	}
1180830
public /*@ pure @*/ int cmpPow52(int p5, int p2) {
        if (p5 == 0) {
            int wordcount = p2 >> 5;
            int bitcount = p2 & 0x1f;
            int size = this.nWords + this.offset;
            if (size > wordcount + 1) {
                return 1;
            } else if (size < wordcount + 1) {
                return -1;
            }
            int a = this.data[this.nWords -1];
            int b = 1 << bitcount;
            if (a != b) {
                return ( (a & LONG_MASK) < (b & LONG_MASK)) ? -1 : 1;
            }
            return checkZeroTail(this.data, this.nWords - 1);
        }
        return this.cmp(big5pow(p5).leftShift(p2));
    }