code: private static String generateUniqueId(Set<String> ids, String idBase) {
  		String id = idBase;
  		int counter = 1;
  		while (ids.contains(id)) {
  			id = idBase + String.valueOf(counter++);
  		}
  		
  		// put the newly generated one into the set
  		ids.add(id);
  		return id;
  	}
docs: Generated a unique ID within the given set of IDs. Appends an incrementing number for
  duplicates.
  
  @param ids
  @param idBase
  @return