Buggy code:
public class NotLeakedAssertion implements PolicyAssertion { private static final Logger LOG = LoggerFactory . getLogger ( NotLeakedAssertion . class ) ; public static final Result LEAKED_PASSWORD = new Result ( false , "Password<seq2seq4repair_space>is<seq2seq4repair_space>too<seq2seq4repair_space>common,<seq2seq4repair_space>or<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>leaked." ) ; public static class Builder { private static final String DEFAULT_DATA_FILE = "passwords.dat" ; private int numPasswords ; private double fpProbability ; private boolean ignoreCase ; private String passwordDataFile ; private String redisHost ; private int redisPort ; private String redisFilterName ; public Builder ( ) { } public NotLeakedAssertion . Builder withFalsePositiveProbability ( double probability ) { } public NotLeakedAssertion . Builder withIgnoreCase ( boolean shouldIgnoreCase ) { } public NotLeakedAssertion . Builder withPasswordDataFile ( String dataFile ) { } public NotLeakedAssertion . Builder withRedis ( String host , int port , String filterName ) { } public NotLeakedAssertion build ( ) throws IOException { } private BufferedReader getPasswordDataReader ( ) throws IOException { } private BloomFilter < String > loadPasswordData ( ) throws IOException { NotLeakedAssertion . LOG . info ( "Processing<seq2seq4repair_space>password<seq2seq4repair_space>data..." ) ; BloomFilter < String > filter ; int numExpected = 0 ; try ( BufferedReader reader = getPasswordDataReader ( ) ) { while ( ( reader . readLine ( ) ) != null ) numExpected ++ ; } NotLeakedAssertion . LOG . info ( ( "Creating<seq2seq4repair_space>filter<seq2seq4repair_space>with<seq2seq4repair_space>{}<seq2seq4repair_space>false<seq2seq4repair_space>positive<seq2seq4repair_space>probability<seq2seq4repair_space>" + "and<seq2seq4repair_space>{}<seq2seq4repair_space>expected<seq2seq4repair_space>elements." ) , fpProbability , numExpected ) ; if ( ( ( ( redisHost ) != null ) && ( ( redisPort ) > 0 ) ) && ( ( redisFilterName ) != null ) ) { NotLeakedAssertion . LOG . info ( "Getting<seq2seq4repair_space>redis-backed<seq2seq4repair_space>bloom<seq2seq4repair_space>filter<seq2seq4repair_space>'{}',<seq2seq4repair_space>at<seq2seq4repair_space>{}:{}" , redisFilterName , redisHost , redisPort ) ; filter = new FilterBuilder ( numExpected , fpProbability ) . redisBacked ( true ) . name ( redisFilterName ) . redisHost ( redisHost ) . redisPort ( redisPort ) . falsePositiveProbability ( fpProbability ) . buildBloomFilter ( ) ; <START_BUG> if ( ! ( filter . isEmpty ( ) ) ) { <END_BUG> NotLeakedAssertion . LOG . info ( "Filter<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>populated!" ) ; return filter ; } } else filter = new FilterBuilder ( numExpected , fpProbability ) . buildBloomFilter ( ) ; try ( BufferedReader reader = getPasswordDataReader ( ) ) { String password = null ; while ( ( password = reader . readLine ( ) ) != null ) { if ( ignoreCase ) password = password . toLowerCase ( ) ; if ( filter . add ( password ) ) ( numPasswords ) ++ ; if ( ( numPasswords ) > numExpected ) { String msg = String . format ( ( "Added<seq2seq4repair_space>%d<seq2seq4repair_space>passwords<seq2seq4repair_space>but<seq2seq4repair_space>expected<seq2seq4repair_space>%d." + "Did<seq2seq4repair_space>the<seq2seq4repair_space>data<seq2seq4repair_space>file<seq2seq4repair_space>change?" ) , numPasswords , numExpected ) ; NotLeakedAssertion . LOG . error ( msg ) ; throw new ConcurrentModificationException ( msg ) ; } } } return filter ; } } private final BloomFilter < String > passwordFilter ; private final int numPasswords ; private final double fpProbability ; private final boolean ignoreCase ; private final String passwordDataFile ; private NotLeakedAssertion ( final BloomFilter < String > passwordFilter , int numPasswords , double fpProbability , boolean ignoreCase , String passwordDataFile ) { } public int getNumPasswords ( ) { } public double getFalsePositiveProbability ( ) { } public boolean getIgnoreCase ( ) { } public String getPasswordDataFile ( ) { } @ Override public Result verify ( String password ) { } No newline ; at end ; of file ; }

Fix:
if ( ! ( filter . getBitSet ( ) . isEmpty ( ) ) ) {