LocalTask (@NotNull LocalChangeList list) { if (hasChangelist(getActiveTask(), list)) return getActiveTask(); for (LocalTask task : getLocalTasks()) { if (hasChangelist(task, list)) return task; } return null; }