Filter a set of submissions including only submissions from submitters whose
names are in the include list
@param submissions the submissions to filter
@param submitters the submitters to include
@return the filtered list of submissions
421374
public List<ISubmission> include(List<ISubmission> submissions, List<String> submitters){
		ArrayList<ISubmission> filteredSubmissions = new ArrayList<ISubmission>();
		for (ISubmission submission: submissions){
			if (submission.getSubmitter() != null){
				if (submitters.contains(submission.getSubmitter().getSubmitter()))
					filteredSubmissions.add(submission);
			}
		}
		return filteredSubmissions;
	}
631951
function filterSubmissions(req, res, next) {
  var filterParams = {
    formId: req.body.formId,
    appId: req.body.appId
  };

  logger.debug("Middleware filterSubmissions ", {params: filterParams});

  forms.getSubmissions(req.connectionOptions, filterParams, _getSubmissionsResultHandler(req, next));
}
99322
@VisibleForTesting
    ReviewResult filterResults(ReviewResult results, Review review) {
        ReviewResult filteredResults = new ReviewResult();
        Set<String> reviewFiles = new HashSet<>();
        for (ReviewFile file : review.getFiles()) {
            reviewFiles.add(file.getReviewFilename());
        }
        for (Violation violation : results.getViolations()) {
            if (reviewFiles.contains(violation.getFilenameOrJavaClassName())) {
                filteredResults.add(violation);
            }
        }
        return filteredResults;
    }
444272
public static List<Descriptor<RepositoryBrowser<?>>> filter(Class<? extends RepositoryBrowser> t) {
        List<Descriptor<RepositoryBrowser<?>>> r = new ArrayList<>();
        for (Descriptor<RepositoryBrowser<?>> d : RepositoryBrowser.all())
            if(d.isSubTypeOf(t))
                r.add(d);
        return r;
    }
515768
public static List<Character> filterLetters(List<Character> characters) {
        return characters.stream().filter(Character::isLetter).collect(toList());
    }
876635
public List<T> filter(List<T> results) {
        if (filters.isEmpty() || results == null) {
            return results;
        }
        
        List<T> include = new ArrayList<>();
        
        for (T result : results) {
            if (include(result)) {
                include.add(result);
            }
        }
        
        return results.size() == include.size() ? results : include;
    }
1185283
function list(req, res, next) {
  logger.debug("Middleware Submissions List ", {connectionOptions: req.connectionOptions});
  forms.getSubmissions(req.connectionOptions, {}, _getSubmissionsResultHandler(req, next));
}
753809
@Override
    public DataSet filterBy(int[] labels) {
        List<DataSet> list = asList();
        List<DataSet> newList = new ArrayList<>();
        List<Integer> labelList = new ArrayList<>();
        for (int i : labels)
            labelList.add(i);
        for (DataSet d : list) {
            int outcome = d.outcome();
            if (labelList.contains(outcome)) {
                newList.add(d);
            }
        }

        return DataSet.merge(newList);
    }
1298812
public List<ISubmission> omit(List<ISubmission> submissions, ISubmitter submitter){
		
		ArrayList<ISubmission> filteredSubmissions = new ArrayList<ISubmission>();
		
		for (ISubmission submission: submissions){
			if (!submission.getSubmitter().equals(submitter)){
				filteredSubmissions.add(submission);
			}
		}
		
		return filteredSubmissions;
	}
1055080
def fetch_top_submissions(self, top):
        
        for submission in self.subreddit.top(limit=None, time_filter=top):
            self.submissions[submission.id] = MiniSubmission(submission)
1089127
@Override
    public <U extends ApiBaseUser> ResponseToRoom exclude(Collection<U> users) {
    	for(U user : users)
    		this.excludedUsers.add(user.getName());
    	return this;
    }
577043
public List<Post> submissions(Map<String, ?> options) {
        return client.blogSubmissions(name, options);
    }
339149
public static List<Group> filterLigands(List<Group> allGroups) {

		List<Group> groups = new ArrayList<Group>();
		for (Group g : allGroups) {

			if ( g.isPolymeric())
				continue;

			if (!g.isWater()) {
				groups.add(g);
			}
		}

		return groups;
	}
146113
public static List<CmsRelationType> filterWeak(Collection<CmsRelationType> relationTypes) {

        List<CmsRelationType> result = new ArrayList<CmsRelationType>(relationTypes);
        Iterator<CmsRelationType> it = result.iterator();
        while (it.hasNext()) {
            CmsRelationType type = it.next();
            if (type.isStrong()) {
                it.remove();
            }
        }
        return result;
    }
52961
private List<E> getFilteredList(Class<E> enumeration, E... excludedValues) {
        List<E> filteredValues = new ArrayList<>();
        Collections.addAll(filteredValues, enumeration.getEnumConstants());
        if (excludedValues != null) {
            for (E element : excludedValues) {
                filteredValues.remove(element);
            }
        }
        return filteredValues;
    }
356371
public ListInventoryEntriesResult withEntries(java.util.Collection<java.util.Map<String, String>> entries) {
        setEntries(entries);
        return this;
    }
957043
async def filter_new_posts(self, source_id, post_ids):
        """"""
        new_ids = []
        try:
            db_client = self._db
            posts_in_db = await db_client.get_known_posts(source_id, post_ids)
            new_ids = [p for p in post_ids if p not in posts_in_db]
        except Exception as exc:
            logger.error("Error when filtering for new posts {} {}".format(source_id, post_ids))
            logger.exception(exc)
        return new_ids