List<Task> (final String pattern, final List<? extends Task> tasks) { final com.intellij.util.text.Matcher matcher = getMatcher(pattern); return ContainerUtil.mapNotNull(tasks, task -> matcher.matches(task.getPresentableId()) || matcher.matches(task.getSummary()) ? task : null); }