Merges BloomKFilter bf2 into bf1.
Assumes 2 BloomKFilters with the same size/hash functions are serialized to byte arrays

@param bf1Bytes
@param bf1Start
@param bf1Length
@param bf2Bytes
@param bf2Start
@param bf2Length
346522
public static void mergeBloomFilterBytes(
      byte[] bf1Bytes,
      int bf1Start,
      int bf1Length,
      byte[] bf2Bytes,
      int bf2Start,
      int bf2Length
  )
  {
    if (bf1Length != bf2Length) {
      throw new IllegalArgumentException("bf1Length " + bf1Length + " does not match bf2Length " + bf2Length);
    }

    // Validation on the bitset size/3 hash functions.
    for (int idx = 0; idx < START_OF_SERIALIZED_LONGS; ++idx) {
      if (bf1Bytes[bf1Start + idx] != bf2Bytes[bf2Start + idx]) {
        throw new IllegalArgumentException("bf1 NumHashFunctions/NumBits does not match bf2");
      }
    }

    // Just bitwise-OR the bits together - size/# functions should be the same,
    // rest of the data is serialized long values for the bitset which are supposed to be bitwise-ORed.
    for (int idx = START_OF_SERIALIZED_LONGS; idx < bf1Length; ++idx) {
      bf1Bytes[bf1Start + idx] |= bf2Bytes[bf2Start + idx];
    }
  }
1074681
@Benchmark
    @OperationsPerInvocation(20)
    public void benchmarkByteBuddy(Blackhole blackHole) {
        blackHole.consume(byteBuddyInstance.method(booleanValue));
        blackHole.consume(byteBuddyInstance.method(byteValue));
        blackHole.consume(byteBuddyInstance.method(shortValue));
        blackHole.consume(byteBuddyInstance.method(intValue));
        blackHole.consume(byteBuddyInstance.method(charValue));
        blackHole.consume(byteBuddyInstance.method(intValue));
        blackHole.consume(byteBuddyInstance.method(longValue));
        blackHole.consume(byteBuddyInstance.method(floatValue));
        blackHole.consume(byteBuddyInstance.method(doubleValue));
        blackHole.consume(byteBuddyInstance.method(stringValue));
        blackHole.consume(byteBuddyInstance.method(booleanValue, booleanValue, booleanValue));
        blackHole.consume(byteBuddyInstance.method(byteValue, byteValue, byteValue));
        blackHole.consume(byteBuddyInstance.method(shortValue, shortValue, shortValue));
        blackHole.consume(byteBuddyInstance.method(intValue, intValue, intValue));
        blackHole.consume(byteBuddyInstance.method(charValue, charValue, charValue));
        blackHole.consume(byteBuddyInstance.method(intValue, intValue, intValue));
        blackHole.consume(byteBuddyInstance.method(longValue, longValue, longValue));
        blackHole.consume(byteBuddyInstance.method(floatValue, floatValue, floatValue));
        blackHole.consume(byteBuddyInstance.method(doubleValue, doubleValue, doubleValue));
        blackHole.consume(byteBuddyInstance.method(stringValue, stringValue, stringValue));
    }
1368985
public void merge(LongBloomFilter other) {
    if (bits.data.length != other.bits.data.length ||
        numHashFunctions != other.getNumHashFunctions() ||
        hashing.type() != other.hashing.type()) {
      throw new IllegalArgumentException("BloomFilters must have same size, number of hash functions, and hash type");
    }

    bits.putAll(other.bits);
  }
1267264
public static byte[] hashTwice(byte[] input1, int offset1, int length1,
                                   byte[] input2, int offset2, int length2) {
        MessageDigest digest = newDigest();
        digest.update(input1, offset1, length1);
        digest.update(input2, offset2, length2);
        return digest.digest(digest.digest());
    }
234013
public void init(BaseField fldTarget, String fsTarget)
    {
        m_hsFilter = null;
        m_fldTarget = fldTarget;
        m_fsTarget = fsTarget;
        super.init(null);
    }
605106
public void init(byte[] blob, int start, int len) throws SshException {

		try {

			ByteArrayInputStream is = new ByteArrayInputStream(blob, start, len);

			CertificateFactory cf = JCEProvider
					.getProviderForAlgorithm(JCEAlgorithms.JCE_X509) == null ? CertificateFactory
					.getInstance(JCEAlgorithms.JCE_X509) : CertificateFactory
					.getInstance(JCEAlgorithms.JCE_X509, JCEProvider
							.getProviderForAlgorithm(JCEAlgorithms.JCE_X509));

			this.cert = (X509Certificate) cf.generateCertificate(is);
			if (!(cert.getPublicKey() instanceof RSAPublicKey))
				throw new SshException(
						"Certificate public key is not an RSA public key!",
						SshException.BAD_API_USAGE);

			this.pubKey = (RSAPublicKey) cert.getPublicKey();

		} catch (Throwable ex) {
			throw new SshException(ex.getMessage(), SshException.JCE_ERROR, ex);
		}
	}
844616
public List<Integer> searchBytes(byte[] srcBytes, byte[] searchBytes) {
		final int startIdx = 0;
		final int endIdx = srcBytes.length - 1;
		return searchBytes(srcBytes, searchBytes, startIdx, endIdx);
	}
363766
final void buildBloomFilterForBucket(int bucketInSegmentPos, MemorySegment bucket, HashPartition<BT, PT> p) {
		final int count = bucket.getShort(bucketInSegmentPos + HEADER_COUNT_OFFSET);
		if (count <= 0) {
			return;
		}

		int[] hashCodes = new int[count];
		// As the hashcode and bloom filter occupy same bytes, so we read all hashcode out at first and then write back to bloom filter.
		for (int i = 0; i < count; i++) {
			hashCodes[i] = bucket.getInt(bucketInSegmentPos + BUCKET_HEADER_LENGTH + i * HASH_CODE_LEN);
		}
		this.bloomFilter.setBitsLocation(bucket, bucketInSegmentPos + BUCKET_HEADER_LENGTH);
		for (int hashCode : hashCodes) {
			this.bloomFilter.addHash(hashCode);
		}
		buildBloomFilterForExtraOverflowSegments(bucketInSegmentPos, bucket, p);
	}
866411
public List<Integer> searchBigBytes(byte[] srcBytes, byte[] searchBytes) {

		int numOfThreadsOptimized = (srcBytes.length / analyzeByteArrayUnitSize);

		if (numOfThreadsOptimized == 0) {
			numOfThreadsOptimized = 1;
		}

		return searchBigBytes(srcBytes, searchBytes, numOfThreadsOptimized);
	}
67322
function(firstByte, secondByte, callback) {
    if (!this._spi) {
      throw "SPI device not initialized";
    }

    for (var i = 0; i < this._buffer.length; i += 2) {
      this._buffer[i] = MAX7219._Registers.NoOp;
      this._buffer[i + 1] = 0x00;
    }

    var offset = this._activeController * 2;
    this._buffer[offset] = firstByte;
    this._buffer[offset + 1] = secondByte;

    this._spi.write(this._buffer, callback);
  }
412264
public synchronized void merge(BloomFilter filter) {
        if (!this.matchesAll() && !filter.matchesAll()) {
            checkArgument(filter.data.length == this.data.length &&
                          filter.hashFuncs == this.hashFuncs &&
                          filter.nTweak == this.nTweak);
            for (int i = 0; i < data.length; i++)
                this.data[i] |= filter.data[i];
        } else {
            this.data = new byte[] {(byte) 0xff};
        }
    }
696998
@Beta
    public static <T> Predicate<T> nand(Predicate<? super T> first, Predicate<? super T> second) {
        return com.google.common.base.Predicates.not(com.google.common.base.Predicates.and(first, second));
    }
300127
public static final DimensionSpec mergeDimensions(int[] firstDimensionNums, int[] firstDimensionSizes,
      int[] secondDimensionNums, int[] secondDimensionSizes) {
    SortedSet<Integer> first = Sets.newTreeSet(Ints.asList(firstDimensionNums));
    SortedSet<Integer> second = Sets.newTreeSet(Ints.asList(secondDimensionNums));
    SortedSet<Integer> all = Sets.newTreeSet(first);
    all.addAll(second);
    
    int[] resultDims = Ints.toArray(all);
    int[] resultSizes = new int[resultDims.length];
    for (int i = 0; i < resultDims.length; i++) {
      int dim = resultDims[i];
      if (first.contains(dim) && second.contains(dim)) {
        int firstIndex = Ints.indexOf(firstDimensionNums, dim);
        int secondIndex = Ints.indexOf(secondDimensionNums, dim);
        int firstSize = firstDimensionSizes[firstIndex];
        int secondSize = secondDimensionSizes[secondIndex];
        Preconditions.checkArgument(firstSize == secondSize,
            "Dimension sizes do not match: dim %s, sizes %s and %s.", dim, firstSize, secondSize);
        resultSizes[i] = firstSize;
      } else if (first.contains(dim)) {
        int firstIndex = Ints.indexOf(firstDimensionNums, dim);
        int firstSize = firstDimensionSizes[firstIndex];
        resultSizes[i] = firstSize;
      } else {
        int secondIndex = Ints.indexOf(secondDimensionNums, dim);
        int secondSize = secondDimensionSizes[secondIndex];
        resultSizes[i] = secondSize;
      }
    }

    return new DimensionSpec(resultDims, resultSizes);
  }
274370
private void bfs(int[] membership, int cluster, int id) {
        int n = merge.length + 1;
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(cluster);

        for (Integer i = queue.poll(); i != null; i = queue.poll()) {
            if (i < n) {
                membership[i] = id;
                continue;
            }

            i -= n;

            int m1 = merge[i][0];

            if (m1 >= n) {
                queue.offer(m1);
            } else {
                membership[m1] = id;
            }

            int m2 = merge[i][1];

            if (m2 >= n) {
                queue.offer(m2);
            } else {
                membership[m2] = id;
            }
        }
    }
1259624
public static byte[] makeDeploymentHash(byte[] inbytes)
    {
        MessageDigest md = null;
        try {
            md = MessageDigest.getInstance("SHA-1");
        } catch (NoSuchAlgorithmException e) {
            VoltDB.crashLocalVoltDB("Bad JVM has no SHA-1 hash.", true, e);
        }
        md.update(inbytes);
        byte[] hash = md.digest();
        assert(hash.length == 20); // sha-1 length
        return hash;
    }
503198
def start_address(self, _start_address):
        
        if not self._ptr:
            raise BfdException("BFD not initialized")

        return _bfd.set_start_address(self._ptr, _start_address)
237847
public static void split2(InterleavedF32 interleaved , GrayF32 band0 , GrayF32 band1 ) {
		if( interleaved.numBands != 2 )
			throw new IllegalArgumentException("Input interleaved image must have 2 bands");
		InputSanityCheck.checkSameShape(band0, interleaved);
		InputSanityCheck.checkSameShape(band1, interleaved);

		for( int y = 0; y < interleaved.height; y++ ) {

			int indexTran = interleaved.startIndex + y*interleaved.stride;
			int indexReal = band0.startIndex + y*band0.stride;
			int indexImg = band1.startIndex + y*band1.stride;

			for( int x = 0; x < interleaved.width; x++, indexTran += 2 ) {

				band0.data[indexReal++] = interleaved.data[indexTran];
				band1.data[indexImg++] = interleaved.data[indexTran+1];
			}
		}
	}