Source:
<code>private List<ResponseOutput> buildResponses( List<FeedbackResponseAttributes> responses, FeedbackSessionResultsBundle bundle) { Map<String, List<FeedbackResponseAttributes>> responsesMap = new HashMap<>(); for (FeedbackResponseAttributes response : responses) { responsesMap.computeIfAbsent(response.recipient, k -> new ArrayList<>()).add(response); } List<ResponseOutput> output = new ArrayList<>(); responsesMap.forEach((recipient, responsesForRecipient) -> { String recipientName = removeAnonymousHash(bundle.getNameForEmail(recipient)); String recipientTeam = bundle.getTeamNameForEmail(recipient); for (FeedbackResponseAttributes response : responsesForRecipient) { String giverName = removeAnonymousHash(bundle.getGiverNameForResponse(response)); <START> String giverEmail = bundle.getDisplayableEmailGiver(response); <END> String recipientEmail = bundle.getDisplayableEmailRecipient(response); Map<String, Set<String>> teamNameToMembersEmailTable = bundle.rosterTeamNameMembersTable; String relatedGiverEmail = teamNameToMembersEmailTable.containsKey(response.giver) ? teamNameToMembersEmailTable.get(response.giver).iterator().next() : response.giver; String giverTeam = bundle.getTeamNameForEmail(response.giver); List<FeedbackResponseCommentAttributes> feedbackResponseComments = bundle.getResponseComments().getOrDefault(response.getId(), Collections.emptyList()); Queue<CommentOutput> comments = buildComments(feedbackResponseComments, bundle); output.add(new ResponseOutput(response.getId(), giverName, giverTeam, giverEmail, relatedGiverEmail, response.giverSection, recipientName, recipientTeam, recipientEmail, response.recipientSection, response.responseDetails, comments.poll(), new ArrayList<>(comments))); } }); return output; }</code><technical_language>I giverEmail null in this case, Anonymous Student xxx@Anonymous Student xxx.com for anonymous response in this case. this is want right? follow hint checking isGiverVisible isRecipientVisible</technical_language>

Target:
private List<ResponseOutput> buildResponses( List<FeedbackResponseAttributes> responses, FeedbackSessionResultsBundle bundle) { Map<String, List<FeedbackResponseAttributes>> responsesMap = new HashMap<>(); for (FeedbackResponseAttributes response : responses) { responsesMap.computeIfAbsent(response.recipient, k -> new ArrayList<>()).add(response); } List<ResponseOutput> output = new ArrayList<>(); responsesMap.forEach((recipient, responsesForRecipient) -> { String recipientName = removeAnonymousHash(bundle.getNameForEmail(recipient)); String recipientTeam = bundle.getTeamNameForEmail(recipient); for (FeedbackResponseAttributes response : responsesForRecipient) { String giverName = removeAnonymousHash(bundle.getGiverNameForResponse(response)); String giverEmail = bundle.isGiverVisible(response) ? (bundle.rosterTeamNameMembersTable.containsKey(response.giver) ? null : response.giver) : null; String recipientEmail = bundle.isRecipientVisible(response) ? (bundle.rosterTeamNameMembersTable.containsKey(response.recipient) ? null : response.recipient) : null; Map<String, Set<String>> teamNameToMembersEmailTable = bundle.rosterTeamNameMembersTable; String relatedGiverEmail = teamNameToMembersEmailTable.containsKey(response.giver) ? teamNameToMembersEmailTable.get(response.giver).iterator().next() : response.giver; String giverTeam = bundle.getTeamNameForEmail(response.giver); List<FeedbackResponseCommentAttributes> feedbackResponseComments = bundle.getResponseComments().getOrDefault(response.getId(), Collections.emptyList()); Queue<CommentOutput> comments = buildComments(feedbackResponseComments, bundle); output.add(new ResponseOutput(response.getId(), giverName, giverTeam, giverEmail, relatedGiverEmail, response.giverSection, recipientName, recipientTeam, recipientEmail, response.recipientSection, response.responseDetails, comments.poll(), new ArrayList<>(comments))); } }); return output; }