void () { //Avoid duplicates LinkedHashSet<String> tmp = new LinkedHashSet<>(findStrings); findStrings.clear(); findStrings.addAll(tmp); tmp.clear(); tmp.addAll(replaceStrings); replaceStrings.clear(); replaceStrings.addAll(tmp); tmp.clear(); tmp.addAll(dirStrings); dirStrings.clear(); dirStrings.addAll(tmp); }