} else { YearMonthDay dateBefore = null; for (Summary summary : summaries) { if (dateBefore == null || !datesSearched.contains(summary.getSummaryDateYearMonthDay())) {
} else { for (Summary summary : summaries) { if (!datesSearched.contains(summary.getSummaryDateYearMonthDay())) { YearMonthDay summaryDate = summary.getSummaryDateYearMonthDay();
    public List<YearMonthDay> getPossibleDatesToInsertSummary() {	SortedSet<Summary> summaries = getSummariesSortedByDate();	List<YearMonthDay> datesToInsert = new ArrayList<YearMonthDay>();	List<YearMonthDay> datesSearched = new ArrayList<YearMonthDay>();	YearMonthDay lessonEndDay = getLessonEndDay();	YearMonthDay currentDate = new YearMonthDay();	YearMonthDay startDateToSearch = getLessonStartDay();	YearMonthDay endDateToSearch = (lessonEndDay.isAfter(currentDate)) ? currentDate : lessonEndDay;	HourMinuteSecond now = new HourMinuteSecond();	Campus lessonCampus = getLessonCampus();	if (!startDateToSearch.isAfter(endDateToSearch)) {	    if (summaries.isEmpty()) {		while (true) {		    if (!Holiday.isHoliday(startDateToSearch, lessonCampus)			    && isTimeValidToInsertSummary(now, startDateToSearch)) {			datesToInsert.add(startDateToSearch);		    }		    startDateToSearch = startDateToSearch.plusDays(7);		    if (startDateToSearch.isAfter(endDateToSearch)) {			break;		    }		}	    } else {		YearMonthDay dateBefore = null;		for (Summary summary : summaries) {		    if (dateBefore == null			    || !datesSearched.contains(summary.getSummaryDateYearMonthDay())) {			while (true) {			    if (startDateToSearch.isBefore(summary.getSummaryDateYearMonthDay())) {				if (!Holiday.isHoliday(startDateToSearch, lessonCampus)					&& isTimeValidToInsertSummary(now, startDateToSearch)) {				    datesToInsert.add(startDateToSearch);				}				startDateToSearch = startDateToSearch.plusDays(7);			    } else if (startDateToSearch.isEqual(summary.getSummaryDateYearMonthDay())) {				startDateToSearch = startDateToSearch.plusDays(7);				break;			    } else {				// ERROR				System.out.println("3 2 1 ... BOOOOOOMMMMMMMMM!!!");				startDateToSearch = startDateToSearch.plusDays(7);			    }			    if (startDateToSearch.isAfter(endDateToSearch)) {				break;			    }			}			datesSearched.add(summary.getSummaryDateYearMonthDay());		    }		}		if (!startDateToSearch.isAfter(endDateToSearch)) {		    while (true) {			if (!Holiday.isHoliday(startDateToSearch, lessonCampus)				&& isTimeValidToInsertSummary(now, startDateToSearch)) {			    datesToInsert.add(startDateToSearch);			}			startDateToSearch = startDateToSearch.plusDays(7);			if (startDateToSearch.isAfter(endDateToSearch)) {			    break;			}		    }		}	    }	}	return datesToInsert;    }