if (professorship != executionCourse.getProfessorships().get(0)) { responsibleForStringBuilder.append("; "); }
if (professorship.getResponsibleFor().booleanValue()) { if (isFirstResp) { isFirstResp = false; } else { responsibleForStringBuilder.append("; "); responsibleForEmailsStringBuilder.append("; "); }
    private void fillSpreadSheet(final Spreadsheet spreadsheet, final ExecutionPeriod executionPeriod) {        for (final ExecutionCourse executionCourse : executionPeriod.getAssociatedExecutionCourses()) {            final Row row = spreadsheet.addRow();            row.setCell(executionCourse.getNome());            final StringBuilder responsibleForStringBuilder = new StringBuilder();            for (final Professorship professorship : executionCourse.getProfessorships()) {                if (professorship != executionCourse.getProfessorships().get(0)) {                    responsibleForStringBuilder.append("; ");                }                if (professorship.getResponsibleFor().booleanValue()) {                    final Teacher teacher = professorship.getTeacher();                    responsibleForStringBuilder.append(teacher.getTeacherNumber().toString());                    responsibleForStringBuilder.append(" ");                    final Person person = teacher.getPerson();                    responsibleForStringBuilder.append(person.getNome());                }            }            row.setCell(responsibleForStringBuilder.toString());            final Map<Degree, Set<Integer>> degreeOccurenceMap = constructDegreeOccurenceMap(executionPeriod, executionCourse);            row.setCell(Integer.toString(degreeOccurenceMap.size()));            boolean hasDegreeDegree = false;            boolean hasMasterDegree = false;            final StringBuilder degreeStringBuilder = new StringBuilder();            boolean isFirst = true;            for (final Degree degree : degreeOccurenceMap.keySet()) {                if (isFirst) {                    isFirst = false;                } else {                    degreeStringBuilder.append("; ");                }                if (degree.getTipoCurso() == DegreeType.DEGREE) {                    hasDegreeDegree = true;                } else if (degree.getTipoCurso() == DegreeType.MASTER_DEGREE) {                    hasMasterDegree = true;                }                degreeStringBuilder.append(degree.getSigla());            }            row.setCell(degreeStringBuilder.toString());            final StringBuilder degreeCurricularYearStringBuilder = new StringBuilder();            isFirst = true;            for (final Entry<Degree, Set<Integer>> entry : degreeOccurenceMap.entrySet()) {                if (isFirst) {                    isFirst = false;                } else {                    degreeCurricularYearStringBuilder.append("; ");                }                final Degree degree = entry.getKey();                degreeCurricularYearStringBuilder.append(degree.getSigla());                degreeCurricularYearStringBuilder.append('(');                boolean isFirstYear = true;                for (final Integer curricularYearInteger : entry.getValue()) {                    if (isFirstYear) {                        isFirstYear = false;                    } else {                        degreeCurricularYearStringBuilder.append(", ");                    }                    degreeCurricularYearStringBuilder.append(curricularYearInteger.toString());                }                degreeCurricularYearStringBuilder.append(')');            }            row.setCell(degreeCurricularYearStringBuilder.toString());            final StringBuilder degreeTypeStringBuilder = new StringBuilder();            if (hasDegreeDegree) {                degreeTypeStringBuilder.append(DegreeType.DEGREE);            }            if (hasDegreeDegree && hasMasterDegree) {                degreeTypeStringBuilder.append(", ");            }            if (hasMasterDegree) {                degreeTypeStringBuilder.append(DegreeType.MASTER_DEGREE);            }            row.setCell(degreeTypeStringBuilder.toString());        }    }