Compares two Bitcoin magics

@param magic1 first magic
@param magic2 second magics

@return false, if do not match, true if match
550416
public static boolean compareMagics (byte[] magic1,byte[] magic2) {
	if (magic1.length!=magic2.length) {
		return false;
	}
	for (int i=0;i<magic1.length;i++) {
		if (magic1[i]!=magic2[i]) {
			 return false;
		}
	}
	return true;	

}
240258
public static boolean keyMatch(String key1, String key2) {
        int i = key2.indexOf('*');
        if (i == -1) {
            return key1.equals(key2);
        }

        if (key1.length() > i) {
            return key1.substring(0, i).equals(key2.substring(0, i));
        }
        return key1.equals(key2.substring(0, i));
    }
512975
public function bitXor( $value1, $value2 )
    {
        $value1 = $this->getIdentifier( $value1 );
        $value2 = $this->getIdentifier( $value2 );
        return "( {$value1} + {$value2} - bitand( {$value1}, {$value2} ) * 2 )";
    }
1360858
def _rule_compare(rule1, rule2):
    '''
    
    '''

    commonkeys = set(rule1.keys()).intersection(rule2.keys())
    for key in commonkeys:
        if rule1[key] != rule2[key]:
            return False
    return True
1096533
final int compare(MutableBigInteger b) {
        int blen = b.intLen;
        if (intLen < blen)
            return -1;
        if (intLen > blen)
           return 1;

        // Add Integer.MIN_VALUE to make the comparison act as unsigned integer
        // comparison.
        int[] bval = b.value;
        for (int i = offset, j = b.offset; i < intLen + offset; i++, j++) {
            int b1 = value[i] + 0x80000000;
            int b2 = bval[j]  + 0x80000000;
            if (b1 < b2)
                return -1;
            if (b1 > b2)
                return 1;
        }
        return 0;
    }
138310
def _revs_equal(rev1, rev2, rev_type):
    '''
    
    '''
    if (rev1 is None and rev2 is not None) \
            or (rev2 is None and rev1 is not None):
        return False
    elif rev1 is rev2 is None:
        return True
    elif rev_type == 'sha1':
        return rev1.startswith(rev2)
    else:
        return rev1 == rev2
431633
def rsa_eq(key1, key2):
    
    pn1 = key1.public_numbers()
    pn2 = key2.public_numbers()
    # Check if two RSA keys are in fact the same
    if pn1 == pn2:
        return True
    else:
        return False
123597
public int compare(final SnomedConcept o1, final SnomedConcept o2) {
        if (o1 == o2) return 0;
        if (o1 != null) {
            if (o2 == null) return 1;
                // need to use BigInteger to compare SNOMED codes since some are fantastically long
            else return new BigInteger(o1.snomedId)
                    .compareTo(new BigInteger(o2.snomedId));
        }
        return -1;
    }
324124
private boolean validMagicNumber(byte[] magicNumberBuffer)
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "validMagicNumber", new java.lang.Object[] { RLSUtils.toHexString(magicNumberBuffer, RLSUtils.MAX_DISPLAY_BYTES), this });

        boolean incorrectByteDetected = false;
        int currentByte = 0;

        while ((!incorrectByteDetected) && (currentByte < LogFileHeader.MAGIC_NUMBER.length))
        {
            if (magicNumberBuffer[currentByte] != LogFileHeader.MAGIC_NUMBER[currentByte])
            {
                incorrectByteDetected = true;
            }
            currentByte++;
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "validMagicNumber", new Boolean(!incorrectByteDetected));
        return !incorrectByteDetected;
    }
260926
protected final SlotAssignmentResult ensure0(long key1, long key2) {
        assertValid();
        final long size = size();
        if (size == expansionThreshold()) {
            resizeTo(CapacityUtil.nextCapacity(capacity()));
        }
        long slot = keyHash(key1, key2) & mask();
        while (isSlotAssigned(slot)) {
            if (equal(key1OfSlot(slot), key2OfSlot(slot), key1, key2)) {
                slotAssignmentResult.setAddress(valueAddrOfSlot(slot));
                slotAssignmentResult.setNew(false);
                return slotAssignmentResult;
            }
            slot = (slot + 1) & mask();
        }
        setSize(size + 1);
        putKey(baseAddress, slot, key1, key2);
        slotAssignmentResult.setAddress(valueAddrOfSlot(slot));
        slotAssignmentResult.setNew(true);
        return slotAssignmentResult;
    }
1185012
public static Boolean compareMultipleClientConfigAvro(String configAvro1, String configAvro2) {
        Map<String, Properties> mapStoreToProps1 = readMultipleClientConfigAvro(configAvro1);
        Map<String, Properties> mapStoreToProps2 = readMultipleClientConfigAvro(configAvro2);
        Set<String> keySet1 = mapStoreToProps1.keySet();
        Set<String> keySet2 = mapStoreToProps2.keySet();
        if(!keySet1.equals(keySet2)) {
            return false;
        }
        for(String storeName: keySet1) {
            Properties props1 = mapStoreToProps1.get(storeName);
            Properties props2 = mapStoreToProps2.get(storeName);
            if(!props1.equals(props2)) {
                return false;
            }
        }
        return true;
    }
674759
private int compareShifted(MutableBigInteger b, int ints) {
        int blen = b.intLen;
        int alen = intLen - ints;
        if (alen < blen)
            return -1;
        if (alen > blen)
           return 1;

        // Add Integer.MIN_VALUE to make the comparison act as unsigned integer
        // comparison.
        int[] bval = b.value;
        for (int i = offset, j = b.offset; i < alen + offset; i++, j++) {
            int b1 = value[i] + 0x80000000;
            int b2 = bval[j]  + 0x80000000;
            if (b1 < b2)
                return -1;
            if (b1 > b2)
                return 1;
        }
        return 0;
    }
1291214
static int compareLexical(BitStore a, BitStore b) {
		int aSize = a.size();
		int bSize = b.size();
		int diff = a.size() - b.size();
		ListIterator<Integer> as = a.ones().positions(aSize);
		ListIterator<Integer> bs = b.ones().positions(bSize);
		while (true) {
			boolean ap = as.hasPrevious();
			boolean bp = bs.hasPrevious();
			if (ap && bp) {
				int ai = as.previous();
				int bi = bs.previous() + diff;
				if (ai == bi) continue;
				return ai > bi ? 1 : -1;
			} else {
				return bp ? -1 : 1;
			}
		}

	}
38095
@Pure
	protected int compareConnections(PT p1, PT p2) {
		assert p1 != null && p2 != null;
		return p1.hashCode() - p2.hashCode();
	}
550617
private int findFirstDifferingBit(String key1, String key2) {
        int bit = 0;

        while (keyMapper.isSet(bit, key1) == keyMapper.isSet(bit, key2)) {
            bit++;
        }
        return bit;
    }
771245
boolean matches(int type, int child1, int child2) {
        return matches(type, child1) && get(2, true).isA(child2);
    }
245155
private boolean isContainedIn(BitSet A, BitSet B) {
        boolean result = false;

        if (A.isEmpty()) {
            return true;
        }

        BitSet setA = (BitSet) A.clone();
        setA.and(B);

        if (setA.equals(A)) {
            result = true;
        }

        return result;
    }