public static long generate(long hash,int key){
  final long m=0xc6a4a7935bd1e995L;
  final int r=47;
  int length=4;
  hash^=length * m;
  hash^=Integer.reverseBytes(key);
  hash*=m;
  hash^=hash >>> r;
  hash*=m;
  hash^=hash >>> r;
  return hash;
}

public static long generate ( long hash , int key ) { final long m = 0xc6a4a7935bd1e995L ; final int r = 47 ; int length = 4 ; hash ^= length * m ; hash ^= Integer . reverseBytes ( key ) ; hash *= m ; hash ^= hash > > > r ; hash *= m ; hash ^= hash > > > r ; return hash ; }
calculates hash from a buffer
