actualCurricularYear = curricularCourseScope.getCurricularSemester().getCurricularYear();  if (minCurricularYear.getYear().intValue() > actualCurricularYear.getYear().intValue() && curricularCourseScope.isActive(date).booleanValue()) {  minCurricularYear = actualCurricularYear;
if(curricularCourseScope.isActive(date).booleanValue()) { CurricularYear actualCurricularYear = curricularCourseScope.getCurricularSemester().getCurricularYear(); if (minCurricularYear == null || minCurricularYear.getYear().intValue() > actualCurricularYear.getYear().intValue()) { minCurricularYear = actualCurricularYear; }
    private CurricularYear getCurricularYearWithLowerYear(List<CurricularCourseScope> listOfScopes,            Date date) {        if (listOfScopes.isEmpty()) {            return null;        }        CurricularYear minCurricularYear = ((CurricularCourseScope) listOfScopes.get(0))                .getCurricularSemester().getCurricularYear();        CurricularYear actualCurricularYear = null;        for (CurricularCourseScope curricularCourseScope : (List<CurricularCourseScope>) listOfScopes) {            actualCurricularYear = curricularCourseScope.getCurricularSemester().getCurricularYear();            if (minCurricularYear.getYear().intValue() > actualCurricularYear.getYear().intValue()                    && curricularCourseScope.isActive(date).booleanValue()) {                minCurricularYear = actualCurricularYear;            }        }        return minCurricularYear;    }