nus-yam/ex-repair huggingface dataset:
Program: 62771
Project: 62771
Buggy source:
private List<AdminAccountDetailsInstructorCourseListTableRow> createInstructorCourseListTable(List<CourseDetailsBundle> instructorCourseList){
  List<AdminAccountDetailsInstructorCourseListTableRow> courseListTable=new ArrayList<AdminAccountDetailsInstructorCourseListTableRow>();
  for (  CourseDetailsBundle courseDetails : instructorCourseList) {
    AdminAccountDetailsInstructorCourseListTableRow row=new AdminAccountDetailsInstructorCourseListTableRow(accountInformation.googleId,courseDetails);
    courseListTable.add(row);
  }
  return courseListTable;
}

Fixed version (ground truth):
private List<AdminAccountDetailsInstructorCourseListTableRow> createInstructorCourseListTable(List<CourseDetailsBundle> instructorCourseList){
  List<AdminAccountDetailsInstructorCourseListTableRow> courseListTable=new ArrayList<AdminAccountDetailsInstructorCourseListTableRow>();
  if (instructorCourseList != null) {
    for (    CourseDetailsBundle courseDetails : instructorCourseList) {
      AdminAccountDetailsInstructorCourseListTableRow row=new AdminAccountDetailsInstructorCourseListTableRow(accountInformation.googleId,courseDetails);
      courseListTable.add(row);
    }
  }
  return courseListTable;
}
Program: 62772
Project: 62772
Buggy source:
public boolean isShowGiverNameToResponseGiver(){
  return showGiverNameTo.contains(FeedbackParticipantType.GIVER);
}

Fixed version (ground truth):
public boolean isShowGiverNameToResponseGiver(){
  if (showGiverNameTo == null) {
    showGiverNameTo=new ArrayList<FeedbackParticipantType>();
  }
  return showGiverNameTo.contains(FeedbackParticipantType.GIVER);
}
Program: 62773
Project: 62773
Buggy source:
public boolean isShowCommentToResponseGiver(){
  return showCommentTo.contains(FeedbackParticipantType.GIVER);
}

Fixed version (ground truth):
public boolean isShowCommentToResponseGiver(){
  if (showCommentTo == null) {
    showCommentTo=new ArrayList<FeedbackParticipantType>();
  }
  return showCommentTo.contains(FeedbackParticipantType.GIVER);
}
Program: 62775
Project: 62775
Buggy source:
public Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>> getResponseComments(){
  return getQuestionResponseMap();
}

Fixed version (ground truth):
public Map<String,List<FeedbackResponseCommentAttributes>> getResponseComments(){
  return responseComments;
}
Program: 62777
Project: 62777
Buggy source:
public InstructorFeedbackResponseComment(Map<String,FeedbackSessionResultsBundle> feedbackResultBundles,InstructorAttributes currentInstructor){
  this.feedbackResultBundles=feedbackResultBundles;
  this.currentInstructor=currentInstructor;
  initializeValues();
}

Fixed version (ground truth):
public InstructorFeedbackResponseComment(Map<String,FeedbackSessionResultsBundle> feedbackResultBundles,InstructorAttributes currentInstructor){
  this.feedbackResultBundles=feedbackResultBundles;
  this.currentInstructor=currentInstructor;
  this.giverNames=new HashMap<String,String>();
  this.recipientNames=new HashMap<String,String>();
  this.feedbackResponseCommentsLists=new HashMap<String,List<FeedbackResponseComment>>();
  this.responseEntryAnswerHtmls=new HashMap<FeedbackQuestionDetails,String>();
  initializeValues();
}
Program: 62778
Project: 62778
Buggy source:
private List<CommentRow> createCommentRows(String courseId,String giverEmail,String giverName,Map<String,List<Boolean>> commentModifyPermissions,CourseRoster roster,Map<String,List<CommentAttributes>> comments,InstructorCommentsPageData data){
  List<CommentRow> rows=new ArrayList<CommentRow>();
  List<CommentAttributes> commentsForGiver=comments.get(giverEmail);
  for (int i=0; i < commentsForGiver.size(); i++) {
    String recipientDetails=getRecipientNames(data,courseId,commentsForGiver.get(i).recipients,roster);
    String creationTime=Const.SystemParams.COMMENTS_SIMPLE_DATE_FORMATTER.format(commentsForGiver.get(i).createdAt);
    Boolean isInstructorAllowedToModifyCommentInSection=commentModifyPermissions.get(giverEmail).get(i);
    String typeOfPeopleCanViewComment=data.getTypeOfPeopleCanViewComment(commentsForGiver.get(i));
    String editedAt=commentsForGiver.get(i).getEditedAtText(giverName.equals("String_Node_Str"));
    String showCommentsTo=data.getShowCommentsToForComment(commentsForGiver.get(i));
    String showGiverNameTo=data.getShowGiverNameToForComment(commentsForGiver.get(i));
    String showRecipientNameTo=data.getShowRecipientNameToForComment(commentsForGiver.get(i));
    VisibilityCheckboxes visibilityCheckboxes=new VisibilityCheckboxes(commentsForGiver.get(i));
    rows.add(new InstructorCommentsCommentRow(giverEmail,commentsForGiver.get(i),recipientDetails,creationTime,isInstructorAllowedToModifyCommentInSection,typeOfPeopleCanViewComment,editedAt,visibilityCheckboxes,showCommentsTo,showGiverNameTo,showRecipientNameTo));
  }
  return rows;
}

Fixed version (ground truth):
private List<Comment> createCommentRows(String giverEmail,String giverName,Map<String,List<CommentAttributes>> comments,InstructorCommentsPageData data,Map<String,List<Boolean>> commentModifyPermissions,CourseRoster roster){
  List<Comment> rows=new ArrayList<Comment>();
  List<CommentAttributes> commentsForGiver=comments.get(giverEmail);
  for (int i=0; i < commentsForGiver.size(); i++) {
    CommentAttributes comment=commentsForGiver.get(i);
    String recipientDetails=getRecipientNames(data,comment.courseId,comment.recipients,roster);
    Boolean isInstructorAllowedToModifyCommentInSection=commentModifyPermissions.get(giverEmail).get(i);
    String typeOfPeopleCanViewComment=data.getTypeOfPeopleCanViewComment(comment);
    Comment commentDiv=new Comment(comment,giverName,recipientDetails);
    String extraClass;
    if (comment.showCommentTo.isEmpty()) {
      extraClass="String_Node_Str";
    }
 else {
      extraClass="String_Node_Str";
    }
    commentDiv.withExtraClass(extraClass);
    commentDiv.setVisibilityIcon(typeOfPeopleCanViewComment);
    commentDiv.setNotificationIcon(comment.isPendingNotification());
    if (isInstructorAllowedToModifyCommentInSection) {
      commentDiv.setEditDeleteEnabled(true);
      commentDiv.setFromCommentsPage();
      commentDiv.setPlaceholderNumComments();
    }
    rows.add(commentDiv);
  }
  return rows;
}
Program: 62779
Project: 62779
Buggy source:
private boolean isCommentsForStudentsTablesEqual(InstructorCommentsForStudentsTable expected,InstructorCommentsForStudentsTable actual){
  boolean result=expected.getGiverEmail().equals(actual.getGiverEmail());
  result=result && expected.getGiverName().equals(actual.getGiverName());
  List<CommentRow> expectedCommentRows=expected.getRows();
  List<CommentRow> actualCommentRows=actual.getRows();
  result=result && expectedCommentRows.size() == actualCommentRows.size();
  for (int i=0; i < expectedCommentRows.size() && result; i++) {
    InstructorCommentsCommentRow expectedInstructorCommentsCommentRow=(InstructorCommentsCommentRow)expectedCommentRows.get(i);
    InstructorCommentsCommentRow actualInstructorCommentsCommentRow=(InstructorCommentsCommentRow)actualCommentRows.get(i);
    result=result && isCommentRowsEqual(expectedInstructorCommentsCommentRow,actualInstructorCommentsCommentRow);
  }
  return result;
}

Fixed version (ground truth):
private boolean isCommentsForStudentsTablesEqual(CommentsForStudentsTable expected,CommentsForStudentsTable actual){
  boolean result=expected.getGiverDetails().equals(actual.getGiverDetails());
  result=result && expected.getExtraClass().equals(actual.getExtraClass());
  List<Comment> expectedCommentRows=expected.getRows();
  List<Comment> actualCommentRows=actual.getRows();
  result=result && (expectedCommentRows.size() == actualCommentRows.size());
  for (int i=0; i < expectedCommentRows.size() && result; i++) {
    Comment expectedInstructorCommentsCommentRow=(Comment)expectedCommentRows.get(i);
    Comment actualInstructorCommentsCommentRow=(Comment)actualCommentRows.get(i);
  }
  return result;
}
Program: 62780
Project: 62780
Buggy source:
private boolean isCommentRowsEqual(InstructorCommentsCommentRow expected,InstructorCommentsCommentRow actual){
  boolean result=expected.isInstructorAllowedToModifyCommentInSection() == actual.isInstructorAllowedToModifyCommentInSection();
  result=result && expected.getTypeOfPeopleCanViewComment().equals(actual.getTypeOfPeopleCanViewComment());
  result=result && expected.getEditedAt().equals(actual.getEditedAt());
  result=result && isVisibilityCheckboxesEqual(expected.getVisibilityCheckboxes(),actual.getVisibilityCheckboxes());
  result=result && expected.getShowCommentsTo().equals(actual.getShowCommentsTo());
  result=result && expected.getShowGiverNameTo().equals(actual.getShowGiverNameTo());
  result=result && expected.getShowRecipientNameTo().equals(actual.getShowRecipientNameTo());
  return result;
}

Fixed version (ground truth):
private boolean isCommentRowsEqual(Comment expected,Comment actual){
  return true;
}
Program: 62781
Project: 62781
Buggy source:
private List<InstructorCommentsForStudentsTable> getCommentsForStudentsTables(String courseId,Map<String,List<Boolean>> commentModifyPermissions,CourseRoster roster,Map<String,List<CommentAttributes>> comments,InstructorCommentsPageData data){
  Map<String,String> giverEmailToGiverNameMap=getGiverEmailToGiverNameMap(comments,roster);
  List<InstructorCommentsForStudentsTable> commentsForStudentsTables=new ArrayList<InstructorCommentsForStudentsTable>();
  for (  String giverEmail : comments.keySet()) {
    String giverName=giverEmailToGiverNameMap.get(giverEmail);
    commentsForStudentsTables.add(new InstructorCommentsForStudentsTable(giverEmail,giverName,createCommentRows(courseId,giverEmail,giverName,commentModifyPermissions,roster,comments,data)));
  }
  return commentsForStudentsTables;
}

Fixed version (ground truth):
private List<CommentsForStudentsTable> getCommentsForStudentsTables(Map<String,List<CommentAttributes>> comments,CourseRoster roster,InstructorCommentsPageData data,Map<String,List<Boolean>> commentModifyPermissions){
  Map<String,String> giverEmailToGiverNameMap=getGiverEmailToGiverNameMap(comments,roster);
  List<CommentsForStudentsTable> commentsForStudentsTables=new ArrayList<CommentsForStudentsTable>();
  for (  String giverEmail : comments.keySet()) {
    String giverName=giverEmailToGiverNameMap.get(giverEmail);
    CommentsForStudentsTable table=new CommentsForStudentsTable(giverName,createCommentRows(giverEmail,giverName,comments,data,commentModifyPermissions,roster));
    String extraClass;
    if (giverEmail.equals(COMMENT_GIVER_NAME_THAT_COMES_FIRST)) {
      extraClass="String_Node_Str";
    }
 else {
      extraClass="String_Node_Str";
    }
    table.withExtraClass(extraClass);
    commentsForStudentsTables.add(table);
  }
  return commentsForStudentsTables;
}
Program: 62782
Project: 62782
Buggy source:
private void setInstructorComments(String giverEmail,String currentInstructorEmail,String courseId,Map<String,List<CommentAttributes>> comments,Map<String,List<Boolean>> commentModifyPermissions){
  List<CommentAttributes> commentsForGiverList;
  List<Boolean> canModifyCommentList=new ArrayList<Boolean>();
  commentsForGiverList=getCommentsForGiverInCourse(giverEmail,courseId);
  for (int i=0; i < commentsForGiverList.size(); i++) {
    canModifyCommentList.add(true);
  }
  String key=giverEmail;
  if (giverEmail.equals(currentInstructorEmail)) {
    key=InstructorCommentsPageData.COMMENT_GIVER_NAME_THAT_COMES_FIRST;
  }
  commentModifyPermissions.put(key,canModifyCommentList);
  comments.put(key,commentsForGiverList);
}

Fixed version (ground truth):
private void setInstructorComments(String giverEmail,String currentInstructorEmail,String courseId,Map<String,List<CommentAttributes>> comments,Map<String,List<Boolean>> commentModifyPermissions){
  List<CommentAttributes> commentsForGiverList;
  List<Boolean> canModifyCommentList=new ArrayList<Boolean>();
  commentsForGiverList=getCommentsForGiverInCourse(giverEmail,courseId);
  for (int i=0; i < commentsForGiverList.size(); i++) {
    canModifyCommentList.add(true);
  }
  String key=giverEmail;
  if (giverEmail.equals(currentInstructorEmail)) {
    key=COMMENT_GIVER_NAME_THAT_COMES_FIRST;
  }
  commentModifyPermissions.put(key,canModifyCommentList);
  comments.put(key,commentsForGiverList);
}
Program: 62788
Project: 62788
Buggy source:
private void constructStatisticsTablesForTeams(ViewType viewType,Map<String,FeedbackQuestionAttributes> questions,LinkedHashMap<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>> responsesGroupedByTeam,InstructorFeedbackResultsSectionPanel panel,Collection<String> teamsInSection){
  Map<String,List<InstructorResultsQuestionTable>> teamToStatisticsTables=new HashMap<String,List<InstructorResultsQuestionTable>>();
  for (  String team : teamsInSection) {
    if (!responsesGroupedByTeam.containsKey(team)) {
      continue;
    }
    List<InstructorResultsQuestionTable> statisticsTablesForTeam=new ArrayList<InstructorResultsQuestionTable>();
    for (    FeedbackQuestionAttributes question : questions.values()) {
      if (!responsesGroupedByTeam.get(team).containsKey(question)) {
        continue;
      }
      List<FeedbackResponseAttributes> responsesGivenTeamAndQuestion=responsesGroupedByTeam.get(team).get(question);
      InstructorResultsQuestionTable statsTable=buildQuestionTable(question,responsesGivenTeamAndQuestion,viewType,"String_Node_Str",false);
      statsTable.setShowResponseRows(false);
      statsTable.setCollapsible(false);
      if (!statsTable.getQuestionStatisticsHtml().isEmpty()) {
        statisticsTablesForTeam.add(statsTable);
      }
    }
    InstructorResultsQuestionTable.sortByQuestionNumber(statisticsTablesForTeam);
    teamToStatisticsTables.put(team,statisticsTablesForTeam);
  }
  panel.setTeamStatisticsTable(teamToStatisticsTables);
}

Fixed version (ground truth):
private void constructStatisticsTablesForTeams(ViewType viewType,Map<String,FeedbackQuestionAttributes> questions,LinkedHashMap<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>> responsesGroupedByTeam,InstructorFeedbackResultsSectionPanel panel,Collection<String> teamsInSection){
  Map<String,List<InstructorResultsQuestionTable>> teamToStatisticsTables=new HashMap<String,List<InstructorResultsQuestionTable>>();
  for (  String team : teamsInSection) {
    if (!responsesGroupedByTeam.containsKey(team)) {
      continue;
    }
    List<InstructorResultsQuestionTable> statisticsTablesForTeam=new ArrayList<InstructorResultsQuestionTable>();
    for (    FeedbackQuestionAttributes question : questions.values()) {
      if (!responsesGroupedByTeam.get(team).containsKey(question)) {
        continue;
      }
      List<FeedbackResponseAttributes> responsesGivenTeamAndQuestion=responsesGroupedByTeam.get(team).get(question);
      InstructorResultsQuestionTable statsTable=buildQuestionTable(question,responsesGivenTeamAndQuestion,viewType,"String_Node_Str",false);
      statsTable.setShowResponseRows(false);
      statsTable.setCollapsible(false);
      if (!statsTable.getQuestionStatisticsTable().isEmpty()) {
        statisticsTablesForTeam.add(statsTable);
      }
    }
    InstructorResultsQuestionTable.sortByQuestionNumber(statisticsTablesForTeam);
    teamToStatisticsTables.put(team,statisticsTablesForTeam);
  }
  panel.setTeamStatisticsTable(teamToStatisticsTables);
}
Program: 62789
Project: 62789
Buggy source:
private void configureResponseRowForViewType(FeedbackQuestionAttributes question,ViewType statisticsViewType,String giver,String recipient,InstructorResultsResponseRow responseRow){
switch (statisticsViewType) {
case QUESTION:
    responseRow.setGiverProfilePictureDisplayed(question.isGiverAStudent());
  responseRow.setGiverProfilePictureLink(new Url(getProfilePictureLink(giver)));
responseRow.setRecipientProfilePictureDisplayed(question.isRecipientAStudent());
responseRow.setRecipientProfilePictureLink(new Url(getProfilePictureLink(recipient)));
responseRow.setActionsDisplayed(true);
break;
case GIVER_QUESTION_RECIPIENT:
responseRow.setGiverDisplayed(false);
responseRow.setGiverProfilePictureDisplayed(false);
responseRow.setRecipientProfilePictureAColumn(true);
responseRow.setRecipientProfilePictureDisplayed(question.isRecipientAStudent());
responseRow.setRecipientProfilePictureLink(new Url(getProfilePictureLink(recipient)));
responseRow.setActionsDisplayed(false);
break;
case RECIPIENT_QUESTION_GIVER:
responseRow.setRecipientDisplayed(false);
responseRow.setRecipientProfilePictureDisplayed(false);
responseRow.setGiverProfilePictureAColumn(true);
responseRow.setGiverProfilePictureDisplayed(question.isGiverAStudent());
responseRow.setGiverProfilePictureLink(new Url(getProfilePictureLink(giver)));
responseRow.setActionsDisplayed(true);
break;
default :
Assumption.fail();
}
}

Fixed version (ground truth):
private void configureResponseRowForViewType(FeedbackQuestionAttributes question,ViewType statisticsViewType,String giver,String recipient,InstructorResultsResponseRow responseRow){
switch (statisticsViewType) {
case QUESTION:
    responseRow.setGiverProfilePictureDisplayed(question.isGiverAStudent() && validator.getInvalidityInfo(FieldValidator.FieldType.EMAIL,giver).isEmpty());
  responseRow.setGiverProfilePictureLink(new Url(getProfilePictureLink(giver)));
responseRow.setRecipientProfilePictureDisplayed(question.isRecipientAStudent() && validator.getInvalidityInfo(FieldValidator.FieldType.EMAIL,recipient).isEmpty());
responseRow.setRecipientProfilePictureLink(new Url(getProfilePictureLink(recipient)));
responseRow.setActionsDisplayed(true);
break;
case GIVER_QUESTION_RECIPIENT:
responseRow.setGiverDisplayed(false);
responseRow.setGiverProfilePictureDisplayed(false);
responseRow.setRecipientProfilePictureAColumn(true);
responseRow.setRecipientProfilePictureDisplayed(question.isRecipientAStudent() && validator.getInvalidityInfo(FieldValidator.FieldType.EMAIL,recipient).isEmpty());
responseRow.setRecipientProfilePictureLink(new Url(getProfilePictureLink(recipient)));
responseRow.setActionsDisplayed(false);
break;
case RECIPIENT_QUESTION_GIVER:
responseRow.setRecipientDisplayed(false);
responseRow.setRecipientProfilePictureDisplayed(false);
responseRow.setGiverProfilePictureAColumn(true);
responseRow.setGiverProfilePictureDisplayed(question.isGiverAStudent() && validator.getInvalidityInfo(FieldValidator.FieldType.EMAIL,giver).isEmpty());
responseRow.setGiverProfilePictureLink(new Url(getProfilePictureLink(giver)));
responseRow.setActionsDisplayed(true);
break;
default :
Assumption.fail();
}
}
Program: 62790
Project: 62790
Buggy source:
public InstructorResultsQuestionTable(InstructorFeedbackResultsPageData data,List<FeedbackResponseAttributes> responses,String questionStatisticsHtml,List<InstructorResultsResponseRow> responseRows,FeedbackQuestionAttributes question,String additionalInfoId,List<ElementTag> columns,Map<String,Boolean> isColumnSortable){
  this.courseId=question.courseId;
  this.feedbackSessionName=question.feedbackSessionName;
  this.questionStatisticsHtml=questionStatisticsHtml;
  this.responses=responseRows;
  this.isQuestionHasResponses=!responses.isEmpty();
  this.question=question;
  this.questionText=data.bundle.getQuestionText(question.getId());
  this.panelClass=responses.isEmpty() ? "String_Node_Str" : "String_Node_Str";
  this.responsesBodyClass=data.bundle.isComplete() && !data.isShouldCollapsed() ? "String_Node_Str" : "String_Node_Str";
  FeedbackQuestionDetails questionDetails=question.getQuestionDetails();
  this.additionalInfoText=questionDetails.getQuestionAdditionalInfoHtml(question.questionNumber,additionalInfoId);
  this.questionStatisticsTable=questionDetails.getQuestionResultStatisticsHtml(responses,question,data,data.bundle,"String_Node_Str");
  this.columns=columns;
  this.isBoldQuestionNumber=true;
  this.isColumnSortable=isColumnSortable;
}

Fixed version (ground truth):
public InstructorResultsQuestionTable(InstructorFeedbackResultsPageData data,List<FeedbackResponseAttributes> responses,String questionStatisticsHtml,List<InstructorResultsResponseRow> responseRows,FeedbackQuestionAttributes question,String additionalInfoId,List<ElementTag> columns,Map<String,Boolean> isColumnSortable){
  this.courseId=question.courseId;
  this.feedbackSessionName=question.feedbackSessionName;
  this.questionStatisticsTable=questionStatisticsHtml;
  this.responses=responseRows;
  this.isQuestionHasResponses=!responses.isEmpty();
  this.question=question;
  this.questionText=data.bundle.getQuestionText(question.getId());
  this.panelClass=responses.isEmpty() ? "String_Node_Str" : "String_Node_Str";
  this.responsesBodyClass=data.bundle.isComplete() && !data.isShouldCollapsed() ? "String_Node_Str" : "String_Node_Str";
  FeedbackQuestionDetails questionDetails=question.getQuestionDetails();
  this.additionalInfoText=questionDetails.getQuestionAdditionalInfoHtml(question.questionNumber,additionalInfoId);
  this.columns=columns;
  this.isBoldQuestionNumber=true;
  this.isColumnSortable=isColumnSortable;
}
Program: 62791
Project: 62791
Buggy source:
private void addMissingParticipantsForTeamToSectionPanelWithModerationButton(FieldValidator validator,InstructorFeedbackResultsSectionPanel sectionPanel,String teamName,List<String> teamMembers){
  for (  String teamMember : teamMembers) {
    InstructorResultsModerationButton moderationButton=buildModerationButtonForGiver(null,teamMember,"String_Node_Str","String_Node_Str");
    InstructorFeedbackResultsGroupByQuestionPanel giverPanel=buildInstructorFeedbackResultsGroupByQuestionPanel(validator,teamMember,bundle.getFullNameFromRoster(teamMember),null,new ArrayList<InstructorResultsQuestionTable>(),moderationButton,true,true);
    addParticipantPanelToSectionPanel(sectionPanel,teamName,giverPanel);
  }
}

Fixed version (ground truth):
private void addMissingParticipantsForTeamToSectionPanelWithModerationButton(FieldValidator validator,InstructorFeedbackResultsSectionPanel sectionPanel,String teamName,List<String> teamMembers){
  for (  String teamMember : teamMembers) {
    InstructorResultsModerationButton moderationButton=buildModerationButtonForGiver(null,teamMember,"String_Node_Str","String_Node_Str");
    InstructorFeedbackResultsGroupByQuestionPanel giverPanel=buildInstructorFeedbackResultsGroupByQuestionPanel(validator,teamMember,bundle.getFullNameFromRoster(teamMember),null,new ArrayList<InstructorResultsQuestionTable>(),moderationButton,true,true);
    giverPanel.setHasResponses(false);
    addParticipantPanelToSectionPanel(sectionPanel,teamName,giverPanel);
  }
}
Program: 62792
Project: 62792
Buggy source:
private void addMissingParticipantsForTeamToSectionPanelWithoutModerationButton(FieldValidator validator,InstructorFeedbackResultsSectionPanel sectionPanel,String teamName,List<String> teamMembers){
  for (  String teamMember : teamMembers) {
    InstructorFeedbackResultsGroupByQuestionPanel giverPanel=buildInstructorFeedbackResultsGroupByQuestionPanel(validator,teamMember,bundle.getFullNameFromRoster(teamMember),null,new ArrayList<InstructorResultsQuestionTable>(),null,false,false);
    addParticipantPanelToSectionPanel(sectionPanel,teamName,giverPanel);
  }
}

Fixed version (ground truth):
private void addMissingParticipantsForTeamToSectionPanelWithoutModerationButton(FieldValidator validator,InstructorFeedbackResultsSectionPanel sectionPanel,String teamName,List<String> teamMembers){
  for (  String teamMember : teamMembers) {
    InstructorFeedbackResultsGroupByQuestionPanel giverPanel=buildInstructorFeedbackResultsGroupByQuestionPanel(validator,teamMember,bundle.getFullNameFromRoster(teamMember),null,new ArrayList<InstructorResultsQuestionTable>(),null,false,false);
    giverPanel.setHasResponses(false);
    addParticipantPanelToSectionPanel(sectionPanel,teamName,giverPanel);
  }
}
Program: 62793
Project: 62793
Buggy source:
private InstructorFeedbackResultsGroupByQuestionPanel buildInstructorFeedbackResultsGroupByQuestionPanel(FieldValidator validator,String participantIdentifier,String participantName,FeedbackQuestionAttributes question,List<InstructorResultsQuestionTable> questionTables,InstructorResultsModerationButton moderationButton,boolean isModerationButtonDisplayed,boolean isGiver){
  boolean isEmailValid=validator.getInvalidityInfo(FieldValidator.FieldType.EMAIL,participantIdentifier).isEmpty();
  Url profilePictureLink=new Url(getProfilePictureLink(participantIdentifier));
  String mailtoStyle="String_Node_Str";
  if (question != null) {
    mailtoStyle=(question.giverType == FeedbackParticipantType.NONE || question.giverType == FeedbackParticipantType.TEAMS || participantIdentifier.contains("String_Node_Str")) ? "String_Node_Str" : "String_Node_Str";
  }
  InstructorResultsQuestionTable.sortByQuestionNumber(questionTables);
  InstructorFeedbackResultsGroupByQuestionPanel giverPanel=InstructorFeedbackResultsGroupByQuestionPanel.buildInstructorFeedbackResultsGroupByQuestionPanel(questionTables,isEmailValid,profilePictureLink,mailtoStyle,isGiver,participantIdentifier,participantName,moderationButton,isModerationButtonDisplayed);
  return giverPanel;
}

Fixed version (ground truth):
private InstructorFeedbackResultsGroupByQuestionPanel buildInstructorFeedbackResultsGroupByQuestionPanel(FieldValidator validator,String participantIdentifier,String participantName,FeedbackQuestionAttributes question,List<InstructorResultsQuestionTable> questionTables,InstructorResultsModerationButton moderationButton,boolean isModerationButtonDisplayed,boolean isGiver){
  boolean isEmailValid=validator.getInvalidityInfo(FieldValidator.FieldType.EMAIL,participantIdentifier).isEmpty();
  Url profilePictureLink=new Url(getProfilePictureLink(participantIdentifier));
  String mailtoStyle="String_Node_Str";
  if (question != null) {
    mailtoStyle=(question.giverType == FeedbackParticipantType.NONE || question.giverType == FeedbackParticipantType.TEAMS || participantIdentifier.contains("String_Node_Str")) ? "String_Node_Str" : "String_Node_Str";
  }
  InstructorResultsQuestionTable.sortByQuestionNumber(questionTables);
  InstructorFeedbackResultsGroupByQuestionPanel giverPanel=InstructorFeedbackResultsGroupByQuestionPanel.buildInstructorFeedbackResultsGroupByQuestionPanel(questionTables,isEmailValid,profilePictureLink,mailtoStyle,isGiver,participantIdentifier,participantName,moderationButton,isModerationButtonDisplayed);
  giverPanel.setHasResponses(true);
  return giverPanel;
}
Program: 62794
Project: 62794
Buggy source:
/** 
 * Creates   {@code InstructorFeedbackResultsSectionPanel}s for sectionPanels. Iterates through the responses and creates panels and questions for them. Keeps track  of missing sections, teams and participants who do not have responses  and create panels for these missing sections, teams and participants. TODO: simplify the logic in this method
 */
public void initForViewByGiverQuestionRecipient(){
  ViewType viewType=ViewType.GIVER_QUESTION_RECIPIENT;
  FieldValidator validator=new FieldValidator();
  if (!bundle.isComplete) {
    buildSectionPanelsForGiverQuestionRecipientForAjaxLoading(sections);
    return;
  }
  if (bundle.responses.size() == 0) {
    return;
  }
  setShouldCollapsed(bundle.responses.size() > 500);
  Map<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>> sortedResponses=bundle.getResponsesSortedByGiverQuestionRecipient(groupByTeam == null || groupByTeam.equals("String_Node_Str"));
  Map<String,FeedbackQuestionAttributes> questions=bundle.questions;
  LinkedHashMap<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>> responsesGroupedByTeam=buildResponsesPanelsForGiverQuestionRecipient(bundle,viewType,validator,sortedResponses);
  buildTeamStatisticsTables(bundle,sections,viewType,questions,responsesGroupedByTeam);
}

Fixed version (ground truth):
/** 
 * Creates   {@code InstructorFeedbackResultsSectionPanel}s for sectionPanels. Iterates through the responses and creates panels and questions for them. Keeps track  of missing sections, teams and participants who do not have responses  and create panels for these missing sections, teams and participants. TODO: simplify the logic in this method
 */
public void initForViewByGiverQuestionRecipient(){
  ViewType viewType=ViewType.GIVER_QUESTION_RECIPIENT;
  if (!bundle.isComplete) {
    buildSectionPanelsForGiverQuestionRecipientForAjaxLoading(sections);
    return;
  }
  if (bundle.responses.size() == 0) {
    return;
  }
  setShouldCollapsed(bundle.responses.size() > 500);
  Map<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>> sortedResponses=bundle.getResponsesSortedByGiverQuestionRecipient(groupByTeam == null || groupByTeam.equals("String_Node_Str"));
  buildResponsesPanelsForGiverQuestionRecipient(bundle,viewType,sortedResponses);
}
Program: 62795
Project: 62795
Buggy source:
/** 
 * Creates   {@code InstructorFeedbackResultsSectionPanel}s for sectionPanels. Iterates through the responses and creates panels and questions for them. Keeps track  of missing sections, teams and participants who do not have responses  and create panels for these missing sections, teams and participants. TODO: simplify the logic in this method
 */
public void initForViewByRecipientQuestionGiver(){
  ViewType viewType=ViewType.RECIPIENT_QUESTION_GIVER;
  FieldValidator validator=new FieldValidator();
  if (!bundle.isComplete) {
    buildSectionPanelsForGiverQuestionRecipientForAjaxLoading(sections);
    return;
  }
  if (bundle.responses.size() == 0) {
    return;
  }
  setShouldCollapsed(bundle.responses.size() > 500);
  Map<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>> sortedResponses=bundle.getResponsesSortedByRecipientQuestionGiver(groupByTeam == null || groupByTeam.equals("String_Node_Str"));
  Map<String,FeedbackQuestionAttributes> questions=bundle.questions;
  LinkedHashMap<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>> responsesGroupedByTeam=buildResponsesPanelsForRecipientQuestionGiver(bundle,viewType,validator,sortedResponses);
  buildTeamStatisticsTables(bundle,sections,viewType,questions,responsesGroupedByTeam);
}

Fixed version (ground truth):
/** 
 * Creates   {@code InstructorFeedbackResultsSectionPanel}s for sectionPanels. Iterates through the responses and creates panels and questions for them. Keeps track  of missing sections, teams and participants who do not have responses  and create panels for these missing sections, teams and participants. TODO: simplify the logic in this method
 */
public void initForViewByRecipientQuestionGiver(){
  ViewType viewType=ViewType.RECIPIENT_QUESTION_GIVER;
  if (!bundle.isComplete) {
    buildSectionPanelsForGiverQuestionRecipientForAjaxLoading(sections);
    return;
  }
  if (bundle.responses.size() == 0) {
    return;
  }
  setShouldCollapsed(bundle.responses.size() > 500);
  Map<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>> sortedResponses=bundle.getResponsesSortedByRecipientQuestionGiver(groupByTeam == null || groupByTeam.equals("String_Node_Str"));
  buildResponsesPanelsForRecipientQuestionGiver(bundle,viewType,sortedResponses);
}
Program: 62798
Project: 62798
Buggy source:
private void buildTeamStatisticsTableForSectionPanel(InstructorFeedbackResultsSectionPanel sectionPanel,String section,ViewType viewType,Map<String,FeedbackQuestionAttributes> questions,LinkedHashMap<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>> responsesGroupedByTeam,Collection<String> teamsInSection){
  InstructorFeedbackResultsSectionPanel panel=sectionPanels.get(section);
  panel.setArrowClass("String_Node_Str");
  panel.setPanelClass("String_Node_Str");
switch (viewType) {
case GIVER_QUESTION_RECIPIENT:
    panel.setStatisticsHeaderText("String_Node_Str");
  panel.setDetailedResponsesHeaderText("String_Node_Str");
break;
case RECIPIENT_QUESTION_GIVER:
panel.setStatisticsHeaderText("String_Node_Str");
panel.setDetailedResponsesHeaderText("String_Node_Str");
break;
default :
Assumption.fail("String_Node_Str");
}
constructStatisticsTablesForTeams(viewType,questions,responsesGroupedByTeam,panel,teamsInSection);
}

Fixed version (ground truth):
private void buildTeamStatisticsTableForSectionPanel(InstructorFeedbackResultsSectionPanel sectionPanel,String section,ViewType viewType,Map<String,FeedbackQuestionAttributes> questions,LinkedHashMap<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>> responsesGroupedByTeam,Collection<String> teamsInSection){
  System.out.println(teamsInSection);
  sectionPanel.setArrowClass("String_Node_Str");
  sectionPanel.setPanelClass("String_Node_Str");
switch (viewType) {
case GIVER_QUESTION_RECIPIENT:
    sectionPanel.setStatisticsHeaderText("String_Node_Str");
  sectionPanel.setDetailedResponsesHeaderText("String_Node_Str");
break;
case RECIPIENT_QUESTION_GIVER:
sectionPanel.setStatisticsHeaderText("String_Node_Str");
sectionPanel.setDetailedResponsesHeaderText("String_Node_Str");
break;
default :
Assumption.fail("String_Node_Str");
}
constructStatisticsTablesForTeams(viewType,questions,responsesGroupedByTeam,sectionPanel,teamsInSection);
}
Program: 62799
Project: 62799
Buggy source:
@Override public ActionResult execute() throws EntityDoesNotExistException {
  String courseId=getRequestParamValue(Const.ParamsNames.COURSE_ID);
  boolean isHtmlTableNeeded=getRequestParamAsBoolean(Const.ParamsNames.CSV_TO_HTML_TABLE_NEEDED);
  Assumption.assertNotNull(courseId);
  InstructorAttributes instructor=logic.getInstructorForGoogleId(courseId,account.googleId);
  new GateKeeper().verifyAccessible(instructor,logic.getCourse(courseId));
  InstructorCourseDetailsPageData data=new InstructorCourseDetailsPageData(account);
  if (isHtmlTableNeeded) {
    String courseStudentListAsCsv=logic.getCourseStudentListAsCsv(courseId,account.googleId);
    data.setStudentListHtmlTableAsString(StringHelper.csvToHtmlTable(courseStudentListAsCsv));
    statusToAdmin="String_Node_Str" + "String_Node_Str" + courseId + "String_Node_Str";
    return createAjaxResult(data);
  }
  CourseDetailsBundle courseDetails=logic.getCourseDetails(courseId);
  List<InstructorAttributes> instructors=logic.getInstructorsForCourse(courseId);
  List<StudentAttributes> students=logic.getStudentsForCourse(courseId);
  StudentAttributes.sortByNameAndThenByEmail(students);
  data.init(instructor,courseDetails,instructors,students);
  if (students.size() == 0) {
    statusToUser.add(Const.StatusMessages.INSTRUCTOR_COURSE_EMPTY);
  }
  statusToAdmin="String_Node_Str" + "String_Node_Str" + courseId + "String_Node_Str";
  ShowPageResult response=createShowPageResult(Const.ViewURIs.INSTRUCTOR_COURSE_DETAILS,data);
  return response;
}

Fixed version (ground truth):
@Override public ActionResult execute() throws EntityDoesNotExistException {
  String courseId=getRequestParamValue(Const.ParamsNames.COURSE_ID);
  boolean isHtmlTableNeeded=getRequestParamAsBoolean(Const.ParamsNames.CSV_TO_HTML_TABLE_NEEDED);
  Assumption.assertNotNull(courseId);
  InstructorAttributes instructor=logic.getInstructorForGoogleId(courseId,account.googleId);
  new GateKeeper().verifyAccessible(instructor,logic.getCourse(courseId));
  InstructorCourseDetailsPageData data=new InstructorCourseDetailsPageData(account);
  if (isHtmlTableNeeded) {
    String courseStudentListAsCsv=logic.getCourseStudentListAsCsv(courseId,account.googleId);
    data.setStudentListHtmlTableAsString(StringHelper.csvToHtmlTable(courseStudentListAsCsv));
    statusToAdmin="String_Node_Str" + "String_Node_Str" + courseId + "String_Node_Str";
    return createAjaxResult(data);
  }
  CourseDetailsBundle courseDetails=logic.getCourseDetails(courseId);
  List<InstructorAttributes> instructors=logic.getInstructorsForCourse(courseId);
  List<StudentAttributes> students=logic.getStudentsForCourse(courseId);
  StudentAttributes.sortByNameAndThenByEmail(students);
  data.init(instructor,courseDetails,instructors,students);
  if (students.isEmpty()) {
    statusToUser.add(Const.StatusMessages.INSTRUCTOR_COURSE_EMPTY);
  }
  statusToAdmin="String_Node_Str" + "String_Node_Str" + courseId + "String_Node_Str";
  ShowPageResult response=createShowPageResult(Const.ViewURIs.INSTRUCTOR_COURSE_DETAILS,data);
  return response;
}
Program: 62800
Project: 62800
Buggy source:
private List<CommentRow> createCommentRows(String giverEmail,String giverName){
  List<CommentRow> rows=new ArrayList<CommentRow>();
  List<CommentAttributes> commentsForGiver=comments.get(giverEmail);
  for (int i=0; i < commentsForGiver.size(); i++) {
    String recipientDetails=getRecipientNames(commentsForGiver.get(i).recipients);
    String creationTime=TimeHelper.formatTime(commentsForGiver.get(i).createdAt);
    Boolean isInstructorAllowedToModifyCommentInSection=commentModifyPermissions.get(giverEmail).get(i);
    String typeOfPeopleCanViewComment=getTypeOfPeopleCanViewComment(commentsForGiver.get(i));
    String editedAt=commentsForGiver.get(i).getEditedAtText(giverName.equals("String_Node_Str"));
    String showCommentsTo=getShowCommentsToForComment(commentsForGiver.get(i));
    String showGiverNameTo=getShowGiverNameToForComment(commentsForGiver.get(i));
    String showRecipientNameTo=getShowRecipientNameToForComment(commentsForGiver.get(i));
    VisibilityCheckboxes visibilityCheckboxes=createVisibilityCheckboxes(commentsForGiver.get(i));
    rows.add(new InstructorCommentsCommentRow(giverEmail,commentsForGiver.get(i),recipientDetails,creationTime,isInstructorAllowedToModifyCommentInSection,typeOfPeopleCanViewComment,editedAt,visibilityCheckboxes,showCommentsTo,showGiverNameTo,showRecipientNameTo));
  }
  return rows;
}

Fixed version (ground truth):
private List<CommentRow> createCommentRows(String giverEmail,String giverName){
  List<CommentRow> rows=new ArrayList<CommentRow>();
  List<CommentAttributes> commentsForGiver=comments.get(giverEmail);
  for (int i=0; i < commentsForGiver.size(); i++) {
    String recipientDetails=getRecipientNames(commentsForGiver.get(i).recipients);
    String creationTime=Const.SystemParams.COMMENTS_SIMPLE_DATE_FORMATTER.format(commentsForGiver.get(i).createdAt);
    Boolean isInstructorAllowedToModifyCommentInSection=commentModifyPermissions.get(giverEmail).get(i);
    String typeOfPeopleCanViewComment=getTypeOfPeopleCanViewComment(commentsForGiver.get(i));
    String editedAt=commentsForGiver.get(i).getEditedAtText(giverName.equals("String_Node_Str"));
    String showCommentsTo=getShowCommentsToForComment(commentsForGiver.get(i));
    String showGiverNameTo=getShowGiverNameToForComment(commentsForGiver.get(i));
    String showRecipientNameTo=getShowRecipientNameToForComment(commentsForGiver.get(i));
    VisibilityCheckboxes visibilityCheckboxes=createVisibilityCheckboxes(commentsForGiver.get(i));
    rows.add(new InstructorCommentsCommentRow(giverEmail,commentsForGiver.get(i),recipientDetails,creationTime,isInstructorAllowedToModifyCommentInSection,typeOfPeopleCanViewComment,editedAt,visibilityCheckboxes,showCommentsTo,showGiverNameTo,showRecipientNameTo));
  }
  return rows;
}
Program: 62801
Project: 62801
Buggy source:
private List<CommentRow> createCommentRows(String giverEmailPlusCourseId,CommentSearchResultBundle commentSearchResultBundle){
  List<CommentRow> rows=new ArrayList<CommentRow>();
  String giverDetails=commentSearchResultBundle.giverTable.get(giverEmailPlusCourseId);
  String instructorCommentsLink=getInstructorCommentsLink();
  for (  CommentAttributes comment : commentSearchResultBundle.giverCommentTable.get(giverEmailPlusCourseId)) {
    String recipientDetails=commentSearchResultBundle.recipientTable.get(comment.getCommentId().toString());
    String creationTime=TimeHelper.formatTime(comment.createdAt);
    String link=instructorCommentsLink + "String_Node_Str" + Const.ParamsNames.COURSE_ID+ "String_Node_Str"+ comment.courseId+ "String_Node_Str"+ comment.getCommentId();
    ElementTag editButton=createEditButton(link,Const.Tooltips.COMMENT_EDIT_IN_COMMENTS_PAGE);
    rows.add(new CommentRow(giverDetails,comment,recipientDetails,creationTime,editButton));
  }
  return rows;
}

Fixed version (ground truth):
private List<CommentRow> createCommentRows(String giverEmailPlusCourseId,CommentSearchResultBundle commentSearchResultBundle){
  List<CommentRow> rows=new ArrayList<CommentRow>();
  String giverDetails=commentSearchResultBundle.giverTable.get(giverEmailPlusCourseId);
  String instructorCommentsLink=getInstructorCommentsLink();
  for (  CommentAttributes comment : commentSearchResultBundle.giverCommentTable.get(giverEmailPlusCourseId)) {
    String recipientDetails=commentSearchResultBundle.recipientTable.get(comment.getCommentId().toString());
    String creationTime=Const.SystemParams.COMMENTS_SIMPLE_DATE_FORMATTER.format(comment.createdAt);
    String editedAt=comment.getEditedAtText(giverDetails.equals("String_Node_Str" + comment.courseId + "String_Node_Str"));
    String link=instructorCommentsLink + "String_Node_Str" + Const.ParamsNames.COURSE_ID+ "String_Node_Str"+ comment.courseId+ "String_Node_Str"+ comment.getCommentId();
    ElementTag editButton=createEditButton(link,Const.Tooltips.COMMENT_EDIT_IN_COMMENTS_PAGE);
    rows.add(new CommentRow(giverDetails,comment,recipientDetails,creationTime,editedAt,editButton));
  }
  return rows;
}
Program: 62802
Project: 62802
Buggy source:
private void setCommentRows(String studentEmail,CourseRoster roster,List<CommentAttributes> comments){
  commentRows=new ArrayList<CommentRow>();
  for (  CommentAttributes comment : comments) {
    String recipientDetails=getRecipientNames(comment.recipients,studentEmail,roster);
    InstructorAttributes instructor=roster.getInstructorForEmail(comment.giverEmail);
    String giverDetails=comment.giverEmail;
    if (instructor != null) {
      giverDetails=instructor.displayedName + "String_Node_Str" + instructor.name;
    }
    String creationTime=TimeHelper.formatDate(comment.createdAt);
    String editedAt=comment.getEditedAtText(giverDetails.equals("String_Node_Str"));
    CommentRow commentRow=new StudentCommentsCommentRow(giverDetails,comment,recipientDetails,creationTime,editedAt);
    commentRows.add(commentRow);
  }
}

Fixed version (ground truth):
private void setCommentRows(String studentEmail,CourseRoster roster,List<CommentAttributes> comments){
  commentRows=new ArrayList<CommentRow>();
  for (  CommentAttributes comment : comments) {
    String recipientDetails=getRecipientNames(comment.recipients,studentEmail,roster);
    InstructorAttributes instructor=roster.getInstructorForEmail(comment.giverEmail);
    String giverDetails=comment.giverEmail;
    if (instructor != null) {
      giverDetails=instructor.displayedName + "String_Node_Str" + instructor.name;
    }
    String creationTime=Const.SystemParams.COMMENTS_SIMPLE_DATE_FORMATTER.format(comment.createdAt);
    String editedAt=comment.getEditedAtText(giverDetails.equals("String_Node_Str"));
    CommentRow commentRow=new StudentCommentsCommentRow(giverDetails,comment,recipientDetails,creationTime,editedAt);
    commentRows.add(commentRow);
  }
}
Program: 62803
Project: 62803
Buggy source:
public CommentRow(String giverDetails,CommentAttributes comment,String recipientDetails,String creationTime,ElementTag editButton){
  this.giverDetails=giverDetails;
  this.comment=comment;
  this.recipientDetails=recipientDetails;
  this.creationTime=creationTime;
  this.editButton=editButton;
}

Fixed version (ground truth):
public CommentRow(String giverDetails,CommentAttributes comment,String recipientDetails,String creationTime,String editedAt,ElementTag editButton){
  this.giverDetails=giverDetails;
  this.comment=comment;
  this.recipientDetails=recipientDetails;
  this.creationTime=creationTime;
  this.editedAt=editedAt;
  this.editButton=editButton;
}
Program: 62805
Project: 62805
Buggy source:
private List<FeedbackResponseCommentRow> createFeedbackResponseCommentRows(FeedbackSessionResultsBundle feedbackResultBundle,FeedbackResponseAttributes responseEntry,CourseRoster roster){
  List<FeedbackResponseCommentRow> feedbackResponseCommentRows=new ArrayList<FeedbackResponseCommentRow>();
  List<FeedbackResponseCommentAttributes> frcList=feedbackResultBundle.responseComments.get(responseEntry.getId());
  for (  FeedbackResponseCommentAttributes frc : frcList) {
    String frCommentGiver=frc.giverEmail;
    InstructorAttributes instructor=roster.getInstructorForEmail(frc.giverEmail);
    if (instructor != null) {
      frCommentGiver=instructor.displayedName + "String_Node_Str" + instructor.name;
    }
    String lastEditorDisplay=null;
    if (frc.lastEditorEmail != null) {
      InstructorAttributes lastEditor=roster.getInstructorForEmail(frc.lastEditorEmail);
      lastEditorDisplay=lastEditor.displayedName + "String_Node_Str" + lastEditor.name;
    }
    String creationTime=TimeHelper.formatDate(frc.createdAt);
    String editedAt=frc.getEditedAtTextForStudent(frCommentGiver.equals("String_Node_Str"),lastEditorDisplay);
    String comment=frc.commentText.getValue();
    StudentCommentsFeedbackResponseCommentRow feedbackResponseCommentRow=new StudentCommentsFeedbackResponseCommentRow(frCommentGiver,comment,creationTime,editedAt);
    feedbackResponseCommentRows.add(feedbackResponseCommentRow);
  }
  return feedbackResponseCommentRows;
}

Fixed version (ground truth):
private List<FeedbackResponseComment> createFeedbackResponseCommentRows(FeedbackSessionResultsBundle feedbackResultBundle,FeedbackResponseAttributes responseEntry,CourseRoster roster){
  List<FeedbackResponseComment> feedbackResponseCommentRows=new ArrayList<FeedbackResponseComment>();
  List<FeedbackResponseCommentAttributes> frcList=feedbackResultBundle.responseComments.get(responseEntry.getId());
  for (  FeedbackResponseCommentAttributes frc : frcList) {
    String frCommentGiver=frc.giverEmail;
    InstructorAttributes instructor=roster.getInstructorForEmail(frc.giverEmail);
    if (instructor != null) {
      frCommentGiver=instructor.displayedName + "String_Node_Str" + instructor.name;
    }
    FeedbackResponseComment feedbackResponseCommentRow=new FeedbackResponseComment(frc,frCommentGiver);
    feedbackResponseCommentRows.add(feedbackResponseCommentRow);
  }
  return feedbackResponseCommentRows;
}
Program: 62807
Project: 62807
Buggy source:
@Override public ActionResult execute() throws EntityDoesNotExistException {
  String courseId=getRequestParamValue(Const.ParamsNames.COURSE_ID);
  Assumption.assertNotNull(courseId);
  String studentEmail=getRequestParamValue(Const.ParamsNames.STUDENT_EMAIL);
  Assumption.assertNotNull(studentEmail);
  InstructorAttributes instructor=logic.getInstructorForGoogleId(courseId,account.googleId);
  new GateKeeper().verifyAccessible(instructor,logic.getCourse(courseId),Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_STUDENT);
  InstructorCourseStudentDetailsEditPageData data=new InstructorCourseStudentDetailsEditPageData(account);
  data.student=logic.getStudentForEmail(courseId,studentEmail);
  data.regKey=logic.getEncryptedKeyForStudent(courseId,studentEmail);
  data.hasSection=logic.hasIndicatedSections(courseId);
  data.newEmail=data.student.email;
  statusToAdmin="String_Node_Str" + "String_Node_Str" + studentEmail + "String_Node_Str"+ "String_Node_Str"+ courseId+ "String_Node_Str";
  return createShowPageResult(Const.ViewURIs.INSTRUCTOR_COURSE_STUDENT_EDIT,data);
}

Fixed version (ground truth):
@Override public ActionResult execute() throws EntityDoesNotExistException {
  String courseId=getRequestParamValue(Const.ParamsNames.COURSE_ID);
  Assumption.assertNotNull(courseId);
  String studentEmail=getRequestParamValue(Const.ParamsNames.STUDENT_EMAIL);
  Assumption.assertNotNull(studentEmail);
  InstructorAttributes instructor=logic.getInstructorForGoogleId(courseId,account.googleId);
  new GateKeeper().verifyAccessible(instructor,logic.getCourse(courseId),Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_STUDENT);
  StudentAttributes student=logic.getStudentForEmail(courseId,studentEmail);
  boolean hasSection=logic.hasIndicatedSections(courseId);
  InstructorCourseStudentDetailsEditPageData data=new InstructorCourseStudentDetailsEditPageData(account);
  data.init(student,student.email,hasSection);
  statusToAdmin="String_Node_Str" + "String_Node_Str" + studentEmail + "String_Node_Str"+ "String_Node_Str"+ courseId+ "String_Node_Str";
  return createShowPageResult(Const.ViewURIs.INSTRUCTOR_COURSE_STUDENT_EDIT,data);
}