while (result.size() < ids.size() * percent) {
while (ordered.size() >0 && result.size() < ids.size() * percent) {
    Set getPercentOfCollection(final Set ids, double percent) {        if (ids.size() == 0) {            throw new IllegalArgumentException(emptyColl);        }        List ordered = new ArrayList(ids);        Set result = new HashSet();        while (result.size() < ids.size() * percent) {            int choice = randomChoice(ordered.size());            result.add(ordered.remove(choice));        }        return result;    }