Source:
public FeedbackResponseCommentRow buildFeedbackResponseCommentAddForm(FeedbackQuestionAttributes question, String responseId, Map<FeedbackParticipantType, Boolean> responseVisibilityMap, String giverName, String recipientName, boolean isInstructor, double timeZone) { FeedbackResponseCommentAttributes frca = new FeedbackResponseCommentAttributes(question.courseId, question.feedbackSessionName, question.getFeedbackQuestionId(), responseId); frca.showCommentTo = new ArrayList<>(); frca.showGiverNameTo = new ArrayList<>(); if (isInstructor) { FeedbackParticipantType[] relevantTypes = { FeedbackParticipantType.GIVER, FeedbackParticipantType.RECEIVER, FeedbackParticipantType.OWN_TEAM_MEMBERS, FeedbackParticipantType.RECEIVER_TEAM_MEMBERS, FeedbackParticipantType.STUDENTS, FeedbackParticipantType.INSTRUCTORS }; for (FeedbackParticipantType type : relevantTypes) { if (isResponseCommentVisibleTo(question, type)) { frca.showCommentTo.add(type); } if (isResponseCommentGiverNameVisibleTo(question, type)) { frca.showGiverNameTo.add(type); } } return new FeedbackResponseCommentRow(frca, giverName, recipientName, getResponseCommentVisibilityString(question), getResponseCommentGiverNameVisibilityString(question), responseVisibilityMap, timeZone); } else { FeedbackParticipantType[] types = { FeedbackParticipantType.GIVER, FeedbackParticipantType.INSTRUCTORS }; for (FeedbackParticipantType type : types) { frca.showCommentTo.add(type); frca.showGiverNameTo.add(type); } } return new FeedbackResponseCommentRow(frca, giverName, recipientName, getResponseCommentVisibilityString(frca, question), getResponseCommentGiverNameVisibilityString(frca, question), responseVisibilityMap, timeZone); }

Target:
public FeedbackResponseCommentRow buildFeedbackResponseCommentAddForm(FeedbackQuestionAttributes question, String responseId, Map<FeedbackParticipantType, Boolean> responseVisibilityMap, String giverName, String recipientName, boolean isInstructor, double timeZone) { FeedbackResponseCommentAttributes frca = new FeedbackResponseCommentAttributes(question.courseId, question.feedbackSessionName, question.getFeedbackQuestionId(), responseId); frca.showCommentTo = new ArrayList<>(); frca.showGiverNameTo = new ArrayList<>(); if (isInstructor) { FeedbackParticipantType[] relevantTypes = { FeedbackParticipantType.GIVER, FeedbackParticipantType.RECEIVER, FeedbackParticipantType.OWN_TEAM_MEMBERS, FeedbackParticipantType.RECEIVER_TEAM_MEMBERS, FeedbackParticipantType.STUDENTS, FeedbackParticipantType.INSTRUCTORS }; for (FeedbackParticipantType type : relevantTypes) { if (isResponseCommentVisibleTo(question, type)) { frca.showCommentTo.add(type); } if (isResponseCommentGiverNameVisibleTo(question, type)) { frca.showGiverNameTo.add(type); } } return new FeedbackResponseCommentRow(frca, giverName, recipientName, getResponseCommentVisibilityString(question), getResponseCommentGiverNameVisibilityString(question), responseVisibilityMap, timeZone); } FeedbackParticipantType[] types = { FeedbackParticipantType.GIVER, FeedbackParticipantType.INSTRUCTORS }; for (FeedbackParticipantType type : types) { frca.showCommentTo.add(type); frca.showGiverNameTo.add(type); } return new FeedbackResponseCommentRow(frca, giverName, recipientName, getResponseCommentVisibilityString(frca, question), getResponseCommentGiverNameVisibilityString(frca, question), responseVisibilityMap, timeZone); }