private List<Change> filterOutBinary(List<Change> paths) {
   List<Change> result = null;
   for (Iterator<Change> iterator = paths.iterator(); iterator.hasNext(); ) {
     final Change change = iterator.next();
     if (ChangesUtil.isBinaryChange(change)) {
       result = (result == null ? new SmartList<Change>() : result);
       result.add(change);
       iterator.remove();
     }
   }
   return result;
 }
 @Override
 public List<Task> getIssues(
     @Nullable String query,
     int max,
     long since,
     boolean forceRequest,
     final boolean withClosed,
     @NotNull final ProgressIndicator cancelled) {
   List<Task> tasks = getIssuesFromRepositories(query, max, since, forceRequest, cancelled);
   if (tasks == null) return getCachedIssues(withClosed);
   myIssueCache.putAll(ContainerUtil.newMapFromValues(tasks.iterator(), KEY_CONVERTOR));
   return ContainerUtil.filter(
       tasks,
       new Condition<Task>() {
         @Override
         public boolean value(final Task task) {
           return withClosed || !task.isClosed();
         }
       });
 }
  private static List<TextFilePatch> loadTextPatches(
      final Project project,
      final ShelvedChangeList changeList,
      final List<ShelvedChange> changes,
      final List<FilePatch> remainingPatches,
      final CommitContext commitContext)
      throws IOException, PatchSyntaxException {
    final List<TextFilePatch> textFilePatches;
    textFilePatches = loadPatches(project, changeList.PATH, commitContext);

    if (changes != null) {
      final Iterator<TextFilePatch> iterator = textFilePatches.iterator();
      while (iterator.hasNext()) {
        TextFilePatch patch = iterator.next();
        if (!needUnshelve(patch, changes)) {
          remainingPatches.add(patch);
          iterator.remove();
        }
      }
    }
    return textFilePatches;
  }