OccupationPeriod previousLessonsPeriod = getLessonsPeriod(previousExecutionPeriod);
OccupationPeriod previousLessonsPeriod = previousExecutionPeriod.getLessonsPeriod();
    private int getSabbaticalCredits(int sabbaticalMonths, OccupationPeriod lessonsPeriod, TeacherServiceExemption teacherServiceExemption,            ExecutionPeriod executionPeriod) {                double overlapPercentage1 = getOverlapPercentage(lessonsPeriod, teacherServiceExemption);        double overlapPercentage2 = 0.0;        if(overlapPercentage1 == 1.0) {            return 6;        } else if(executionPeriod.containsDay(teacherServiceExemption.getStart())) {                                                                             ExecutionPeriod nextExecutionPeriod = executionPeriod.getNextExecutionPeriod();            if(sabbaticalMonths >= 11) {                                nextExecutionPeriod = (nextExecutionPeriod != null) ? nextExecutionPeriod.getNextExecutionPeriod() : null;            }                            if(nextExecutionPeriod != null) {                                            OccupationPeriod nextLessonsPeriod = getLessonsPeriod(nextExecutionPeriod);                                        overlapPercentage2 = getOverlapPercentage(nextLessonsPeriod, teacherServiceExemption);                                      }            if(overlapPercentage1 > overlapPercentage2) {               return 6;             }                    } else {            ExecutionPeriod previousExecutionPeriod = executionPeriod.getPreviousExecutionPeriod();            if(sabbaticalMonths >= 11) {                previousExecutionPeriod = previousExecutionPeriod.getPreviousExecutionPeriod();            }            OccupationPeriod previousLessonsPeriod = getLessonsPeriod(previousExecutionPeriod);            overlapPercentage2 = getOverlapPercentage(previousLessonsPeriod, teacherServiceExemption);            if(overlapPercentage1 > overlapPercentage2) {                return 6;             }                                }                return 0;    }