long swapRandomTagInBucket ( long curIndex , long tag ) { int randomBucketPosition = ThreadLocalRandom . current ( ) . nextInt ( CuckooFilter . BUCKET_SIZE ) ; return readTagAndSet ( curIndex , randomBucketPosition , tag ) ; }
Replaces a tag in a random position in the given bucket and returns the tag that was replaced .