Program: 62774
Project: 62774
Buggy source:
private void initializeValues(){
  for (  String bundleKey : feedbackResultBundles.keySet()) {
    FeedbackSessionResultsBundle bundle=feedbackResultBundles.get(bundleKey);
    Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>> responseEntriesMap=bundle.getQuestionResponseMap();
    for (    FeedbackQuestionAttributes attributeKey : responseEntriesMap.keySet()) {
      List<FeedbackResponseAttributes> responseEntries=responseEntriesMap.get(attributeKey);
      FeedbackQuestionAttributes question=bundle.questions.get(attributeKey.getId());
      FeedbackQuestionDetails questionDetails=question.getQuestionDetails();
      for (      FeedbackResponseAttributes responseEntry : responseEntries) {
        String giverEmail=responseEntry.giverEmail;
        String giverName=bundle.emailNameTable.get(giverEmail);
        String giverTeamName=bundle.emailTeamNameTable.get(giverEmail);
        String recipientEmail=responseEntry.recipientEmail;
        String recipientName=bundle.emailNameTable.get(recipientEmail);
        String recipientTeamName=bundle.emailTeamNameTable.get(recipientEmail);
        String appendedGiverName=bundle.appendTeamNameToName(giverName,giverTeamName);
        String appendedRecipientName=bundle.appendTeamNameToName(recipientName,recipientTeamName);
        giverNames.put(giverEmail,appendedGiverName);
        recipientNames.put(recipientEmail,appendedRecipientName);
        String responseEntryAnswerHtml=responseEntry.getResponseDetails().getAnswerHtml(questionDetails);
        responseEntryAnswerHtmls.put(questionDetails,responseEntryAnswerHtml);
        if (currentInstructor == null || !currentInstructor.isAllowedForPrivilege(responseEntry.giverSection,responseEntry.feedbackSessionName,Const.ParamsNames.INSTRUCTOR_PERMISSION_SUBMIT_SESSION_IN_SECTIONS) || !currentInstructor.isAllowedForPrivilege(responseEntry.recipientSection,responseEntry.feedbackSessionName,Const.ParamsNames.INSTRUCTOR_PERMISSION_SUBMIT_SESSION_IN_SECTIONS)) {
          instructorAllowedToSubmit=false;
        }
 else {
          instructorAllowedToSubmit=true;
        }
        Map<String,List<FeedbackResponseCommentAttributes>> responseComments=bundle.getResponseComments();
        List<FeedbackResponseCommentAttributes> feedbackResponseCommentsList=responseComments.get(responseEntry.getId());
        List<FeedbackResponseComment> frcList=new ArrayList<FeedbackResponseComment>();
        for (        FeedbackResponseCommentAttributes frca : feedbackResponseCommentsList) {
          String whoCanSeeComment=ifrclpd.getTypeOfPeopleCanViewComment(frca,question);
          boolean allowedToEditAndDeleteComment=frca.giverEmail.equals(instructorEmail) || (currentInstructor != null && currentInstructor.isAllowedForPrivilege(responseEntry.giverSection,responseEntry.feedbackSessionName,Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION_COMMENT_IN_SECTIONS) && currentInstructor.isAllowedForPrivilege(responseEntry.recipientSection,responseEntry.feedbackSessionName,Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION_COMMENT_IN_SECTIONS));
          showCommentTo=frca.showCommentTo;
          showGiverNameTo=frca.showGiverNameTo;
          showCommentToString=joinParticipantTypes(showCommentTo,"String_Node_Str");
          showGiverNameToString=joinParticipantTypes(showGiverNameTo,"String_Node_Str");
          responseVisibleToRecipient=question.recipientType != FeedbackParticipantType.SELF && question.recipientType != FeedbackParticipantType.NONE && question.isResponseVisibleTo(FeedbackParticipantType.RECEIVER);
          responseVisibleToGiverTeam=question.giverType != FeedbackParticipantType.INSTRUCTORS && question.giverType != FeedbackParticipantType.SELF && question.isResponseVisibleTo(FeedbackParticipantType.OWN_TEAM_MEMBERS);
          responseVisibleToRecipientTeam=question.recipientType != FeedbackParticipantType.INSTRUCTORS && question.recipientType != FeedbackParticipantType.SELF && question.recipientType != FeedbackParticipantType.NONE && question.isResponseVisibleTo(FeedbackParticipantType.RECEIVER_TEAM_MEMBERS);
          responseVisibleToStudents=question.isResponseVisibleTo(FeedbackParticipantType.STUDENTS);
          responseVisibleToInstructors=question.isResponseVisibleTo(FeedbackParticipantType.INSTRUCTORS);
          FeedbackResponseComment frc=new FeedbackResponseComment(frca,frca.giverEmail,instructorEmail,bundle.feedbackSession,question,whoCanSeeComment,showCommentToString,showGiverNameToString,allowedToEditAndDeleteComment,responseVisibleToRecipient,responseVisibleToGiverTeam,responseVisibleToRecipientTeam,responseVisibleToStudents,responseVisibleToInstructors);
          frcList.add(frc);
        }
        feedbackResponseCommentsLists.put(responseEntry.getId(),frcList);
      }
    }
  }
}

Fixed version (ground truth):
private void initializeValues(){
  for (  String bundleKey : feedbackResultBundles.keySet()) {
    FeedbackSessionResultsBundle bundle=feedbackResultBundles.get(bundleKey);
    Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>> responseEntriesMap=bundle.getQuestionResponseMap();
    for (    FeedbackQuestionAttributes attributeKey : responseEntriesMap.keySet()) {
      List<FeedbackResponseAttributes> responseEntries=responseEntriesMap.get(attributeKey);
      FeedbackQuestionAttributes question=bundle.questions.get(attributeKey.getId());
      FeedbackQuestionDetails questionDetails=question.getQuestionDetails();
      for (      FeedbackResponseAttributes responseEntry : responseEntries) {
        String giverEmail=responseEntry.giverEmail;
        String giverName=bundle.emailNameTable.get(giverEmail);
        String giverTeamName=bundle.emailTeamNameTable.get(giverEmail);
        String recipientEmail=responseEntry.recipientEmail;
        String recipientName=bundle.emailNameTable.get(recipientEmail);
        String recipientTeamName=bundle.emailTeamNameTable.get(recipientEmail);
        String appendedGiverName=bundle.appendTeamNameToName(giverName,giverTeamName);
        String appendedRecipientName=bundle.appendTeamNameToName(recipientName,recipientTeamName);
        giverNames.put(giverEmail,appendedGiverName);
        recipientNames.put(recipientEmail,appendedRecipientName);
        String responseEntryAnswerHtml=responseEntry.getResponseDetails().getAnswerHtml(questionDetails);
        responseEntryAnswerHtmls.put(questionDetails,responseEntryAnswerHtml);
        if (currentInstructor == null || !currentInstructor.isAllowedForPrivilege(responseEntry.giverSection,responseEntry.feedbackSessionName,Const.ParamsNames.INSTRUCTOR_PERMISSION_SUBMIT_SESSION_IN_SECTIONS) || !currentInstructor.isAllowedForPrivilege(responseEntry.recipientSection,responseEntry.feedbackSessionName,Const.ParamsNames.INSTRUCTOR_PERMISSION_SUBMIT_SESSION_IN_SECTIONS)) {
          instructorAllowedToSubmit=false;
        }
 else {
          instructorAllowedToSubmit=true;
        }
        Map<String,List<FeedbackResponseCommentAttributes>> responseComments=bundle.getResponseComments();
        List<FeedbackResponseCommentAttributes> feedbackResponseCommentsList=responseComments.get(responseEntry.getId());
        List<FeedbackResponseComment> frcList=new ArrayList<FeedbackResponseComment>();
        for (        FeedbackResponseCommentAttributes frca : feedbackResponseCommentsList) {
          String whoCanSeeComment=ifrclpd.getTypeOfPeopleCanViewComment(frca,question);
          boolean allowedToEditAndDeleteComment=frca.giverEmail.equals(instructorEmail) || (currentInstructor != null && currentInstructor.isAllowedForPrivilege(responseEntry.giverSection,responseEntry.feedbackSessionName,Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION_COMMENT_IN_SECTIONS) && currentInstructor.isAllowedForPrivilege(responseEntry.recipientSection,responseEntry.feedbackSessionName,Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION_COMMENT_IN_SECTIONS));
          showCommentTo=frca.showCommentTo;
          if (showCommentTo == null) {
            showCommentTo=new ArrayList<FeedbackParticipantType>();
          }
          showGiverNameTo=frca.showGiverNameTo;
          if (showGiverNameTo == null) {
            showGiverNameTo=new ArrayList<FeedbackParticipantType>();
          }
          showCommentToString=joinParticipantTypes(showCommentTo,"String_Node_Str");
          showGiverNameToString=joinParticipantTypes(showGiverNameTo,"String_Node_Str");
          responseVisibleToRecipient=question.recipientType != FeedbackParticipantType.SELF && question.recipientType != FeedbackParticipantType.NONE && question.isResponseVisibleTo(FeedbackParticipantType.RECEIVER);
          responseVisibleToGiverTeam=question.giverType != FeedbackParticipantType.INSTRUCTORS && question.giverType != FeedbackParticipantType.SELF && question.isResponseVisibleTo(FeedbackParticipantType.OWN_TEAM_MEMBERS);
          responseVisibleToRecipientTeam=question.recipientType != FeedbackParticipantType.INSTRUCTORS && question.recipientType != FeedbackParticipantType.SELF && question.recipientType != FeedbackParticipantType.NONE && question.isResponseVisibleTo(FeedbackParticipantType.RECEIVER_TEAM_MEMBERS);
          responseVisibleToStudents=question.isResponseVisibleTo(FeedbackParticipantType.STUDENTS);
          responseVisibleToInstructors=question.isResponseVisibleTo(FeedbackParticipantType.INSTRUCTORS);
          FeedbackResponseComment frc=new FeedbackResponseComment(frca,frca.giverEmail,instructorEmail,bundle.feedbackSession,question,whoCanSeeComment,showCommentToString,showGiverNameToString,allowedToEditAndDeleteComment,responseVisibleToRecipient,responseVisibleToGiverTeam,responseVisibleToRecipientTeam,responseVisibleToStudents,responseVisibleToInstructors);
          frcList.add(frc);
        }
        feedbackResponseCommentsLists.put(responseEntry.getId(),frcList);
      }
    }
  }
}