Source:
<code>protected void updateInstructorWithSectionLevelPrivileges(String courseId, InstructorAttributes instructor) { List<String> sectionNames = null; try { sectionNames = logic.getSectionNamesForCourse(courseId); } catch (EntityDoesNotExistException e) { return; } HashMap<String, Boolean> isSectionSpecialMappings = new HashMap<>(); for (String sectionName : sectionNames) { isSectionSpecialMappings.put(sectionName, false); } List<String> feedbackNames = new ArrayList<>(); List<FeedbackSessionAttributes> feedbacks = logic.getFeedbackSessionsForCourse(courseId); for (FeedbackSessionAttributes feedback : feedbacks) { feedbackNames.add(feedback.getFeedbackSessionName()); } Map<String, List<String>> sectionNamesMap = getSectionsWithSpecialPrivilegesFromParameters( instructor, sectionNames, isSectionSpecialMappings); sectionNamesMap.forEach((sectionGroupName, specialSectionsInSectionGroup) -> { updateInstructorPrivilegesForSectionInSectionLevel(sectionGroupName, specialSectionsInSectionGroup, instructor); String setSessionsStr = getRequestParamValue("is" + sectionGroupName + "sessionsset"); boolean isSessionsForSectionGroupSpecial = Boolean.parseBoolean(setSessionsStr); if (isSessionsForSectionGroupSpecial) { updateInstructorPrivilegesForSectionInSessionLevel(sectionGroupName, specialSectionsInSectionGroup, feedbackNames, instructor); } else { removeSessionLevelPrivileges(instructor, specialSectionsInSectionGroup); } }); isSectionSpecialMappings.forEach((sectionNameToBeChecked, value) -> { <START> boolean isSectionSpecial = value.booleanValue(); <END> if (!isSectionSpecial) { instructor.privileges.removeSectionLevelPrivileges(sectionNameToBeChecked); } }); }</code><technical_language>need unbox Boolean object here. Making isSectionSpecial parameter in place of work</technical_language>

Target:
protected void updateInstructorWithSectionLevelPrivileges(String courseId, InstructorAttributes instructor) { List<String> sectionNames = null; try { sectionNames = logic.getSectionNamesForCourse(courseId); } catch (EntityDoesNotExistException e) { return; } HashMap<String, Boolean> isSectionSpecialMappings = new HashMap<>(); for (String sectionName : sectionNames) { isSectionSpecialMappings.put(sectionName, false); } List<String> feedbackNames = new ArrayList<>(); List<FeedbackSessionAttributes> feedbacks = logic.getFeedbackSessionsForCourse(courseId); for (FeedbackSessionAttributes feedback : feedbacks) { feedbackNames.add(feedback.getFeedbackSessionName()); } Map<String, List<String>> sectionNamesMap = getSectionsWithSpecialPrivilegesFromParameters( instructor, sectionNames, isSectionSpecialMappings); sectionNamesMap.forEach((sectionGroupName, specialSectionsInSectionGroup) -> { updateInstructorPrivilegesForSectionInSectionLevel(sectionGroupName, specialSectionsInSectionGroup, instructor); String setSessionsStr = getRequestParamValue("is" + sectionGroupName + "sessionsset"); boolean isSessionsForSectionGroupSpecial = Boolean.parseBoolean(setSessionsStr); if (isSessionsForSectionGroupSpecial) { updateInstructorPrivilegesForSectionInSessionLevel(sectionGroupName, specialSectionsInSectionGroup, feedbackNames, instructor); } else { removeSessionLevelPrivileges(instructor, specialSectionsInSectionGroup); } }); isSectionSpecialMappings.forEach((sectionNameToBeChecked, isSectionSpecial) -> { if (!isSectionSpecial) { instructor.privileges.removeSectionLevelPrivileges(sectionNameToBeChecked); } }); }