Program: 62759
Project: 62759
Buggy source:
private List<InstructorFeedbackResultsResponseRow> buildResponseRowsForQuestionForSingleParticipant(FeedbackQuestionAttributes question,List<FeedbackResponseAttributes> responses,String participantIdentifier,boolean isFirstGroupedByGiver){
  List<InstructorFeedbackResultsResponseRow> responseRows=new ArrayList<InstructorFeedbackResultsResponseRow>();
  List<String> possibleParticipantsWithoutResponses=isFirstGroupedByGiver ? bundle.getPossibleRecipients(question,participantIdentifier) : bundle.getPossibleGivers(question,participantIdentifier);
  for (  FeedbackResponseAttributes response : responses) {
    if (!bundle.isGiverVisible(response) || !bundle.isRecipientVisible(response)) {
      possibleParticipantsWithoutResponses.clear();
    }
    String participantWithResponse=isFirstGroupedByGiver ? response.recipientEmail : response.giverEmail;
    FeedbackParticipantType participantType=isFirstGroupedByGiver ? question.recipientType : question.giverType;
    removeParticipantIdentifierFromList(participantType,possibleParticipantsWithoutResponses,participantWithResponse);
    InstructorFeedbackResultsModerationButton moderationButton=bundle.isGiverVisible(response) ? buildModerationButtonForExistingResponse(question,response) : null;
    InstructorFeedbackResultsResponseRow responseRow=new InstructorFeedbackResultsResponseRow(bundle.getGiverNameForResponse(question,response),bundle.getTeamNameForEmail(response.giverEmail),bundle.getRecipientNameForResponse(question,response),bundle.getTeamNameForEmail(response.recipientEmail),bundle.getResponseAnswerHtml(response,question),moderationButton);
    configureResponseRow(question,response.giverEmail,response.recipientEmail,responseRow);
    responseRows.add(responseRow);
  }
  if (isFirstGroupedByGiver) {
    responseRows.addAll(buildMissingResponseRowsBetweenGiverAndPossibleRecipients(question,possibleParticipantsWithoutResponses,participantIdentifier,bundle.getNameForEmail(participantIdentifier),bundle.getTeamNameForEmail(participantIdentifier)));
  }
 else {
    responseRows.addAll(buildMissingResponseRowsBetweenRecipientAndPossibleGivers(question,possibleParticipantsWithoutResponses,participantIdentifier,bundle.getNameForEmail(participantIdentifier),bundle.getTeamNameForEmail(participantIdentifier)));
  }
  return responseRows;
}

Fixed version (ground truth):
private List<InstructorFeedbackResultsResponseRow> buildResponseRowsForQuestionForSingleParticipant(FeedbackQuestionAttributes question,List<FeedbackResponseAttributes> responses,String participantIdentifier,boolean isFirstGroupedByGiver){
  List<InstructorFeedbackResultsResponseRow> responseRows=new ArrayList<InstructorFeedbackResultsResponseRow>();
  List<String> possibleParticipantsWithoutResponses=isFirstGroupedByGiver ? bundle.getPossibleRecipients(question,participantIdentifier) : bundle.getPossibleGivers(question,participantIdentifier);
  for (  FeedbackResponseAttributes response : responses) {
    if (!bundle.isGiverVisible(response) || !bundle.isRecipientVisible(response)) {
      possibleParticipantsWithoutResponses.clear();
    }
    String participantWithResponse=isFirstGroupedByGiver ? response.recipientEmail : response.giverEmail;
    FeedbackParticipantType participantType=isFirstGroupedByGiver ? question.recipientType : question.giverType;
    removeParticipantIdentifierFromList(participantType,possibleParticipantsWithoutResponses,participantWithResponse);
    InstructorFeedbackResultsModerationButton moderationButton=bundle.isGiverVisible(response) ? buildModerationButtonForExistingResponse(question,response) : null;
    InstructorFeedbackResultsResponseRow responseRow=new InstructorFeedbackResultsResponseRow(bundle.getGiverNameForResponse(response),bundle.getTeamNameForEmail(response.giverEmail),bundle.getRecipientNameForResponse(response),bundle.getTeamNameForEmail(response.recipientEmail),bundle.getResponseAnswerHtml(response,question),moderationButton);
    configureResponseRow(question,response.giverEmail,response.recipientEmail,responseRow);
    responseRows.add(responseRow);
  }
  if (isFirstGroupedByGiver) {
    responseRows.addAll(buildMissingResponseRowsBetweenGiverAndPossibleRecipients(question,possibleParticipantsWithoutResponses,participantIdentifier,bundle.getNameForEmail(participantIdentifier),bundle.getTeamNameForEmail(participantIdentifier)));
  }
 else {
    responseRows.addAll(buildMissingResponseRowsBetweenRecipientAndPossibleGivers(question,possibleParticipantsWithoutResponses,participantIdentifier,bundle.getNameForEmail(participantIdentifier),bundle.getTeamNameForEmail(participantIdentifier)));
  }
  return responseRows;
}