nus-yam/ex-repair huggingface dataset:
Program: 62724
Project: 62724
Buggy source:
private static void persistFeedbackResponses(Map<String,FeedbackResponseAttributes> map){
  Map<String,FeedbackResponseAttributes> responses=map;
  try {
    for (    FeedbackResponseAttributes response : responses.values()) {
      response=adjustFeedbackResponseId(response);
    }
    frDb.createFeedbackResponses(responses.values());
  }
 catch (  InvalidParametersException e) {
    System.out.println("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
private static void persistFeedbackResponses(Map<String,FeedbackResponseAttributes> map){
  Map<String,FeedbackResponseAttributes> responses=map;
  try {
    for (    FeedbackResponseAttributes response : responses.values()) {
      adjustFeedbackResponseId(response);
    }
    frDb.createFeedbackResponses(responses.values());
  }
 catch (  InvalidParametersException e) {
    System.out.println("String_Node_Str" + e.getMessage());
  }
}
Program: 62725
Project: 62725
Buggy source:
private static void persistFeedbackResponseComments(Map<String,FeedbackResponseCommentAttributes> map){
  Map<String,FeedbackResponseCommentAttributes> responseComments=map;
  try {
    for (    FeedbackResponseCommentAttributes responseComment : responseComments.values()) {
      responseComment=adjustFeedbackResponseCommentId(responseComment);
    }
    fcDb.createFeedbackResponseComments(responseComments.values());
  }
 catch (  InvalidParametersException e) {
    System.out.println("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
private static void persistFeedbackResponseComments(Map<String,FeedbackResponseCommentAttributes> map){
  Map<String,FeedbackResponseCommentAttributes> responseComments=map;
  try {
    for (    FeedbackResponseCommentAttributes responseComment : responseComments.values()) {
      adjustFeedbackResponseCommentId(responseComment);
    }
    fcDb.createFeedbackResponseComments(responseComments.values());
  }
 catch (  InvalidParametersException e) {
    System.out.println("String_Node_Str" + e.getMessage());
  }
}
Program: 62726
Project: 62726
Buggy source:
private static String[] getFolders(){
  File backupFolder=new File(BACKUP_FOLDER);
  String[] folders=backupFolder.list();
  List<String> listOfFolders=Arrays.asList(folders);
  Collections.sort(listOfFolders,new Comparator<String>(){
    @Override public int compare(    String o1,    String o2){
      DateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
      try {
        Date firstDate=dateFormat.parse(o1);
        Date secondDate=dateFormat.parse(o2);
        return secondDate.compareTo(firstDate);
      }
 catch (      ParseException e) {
        return 0;
      }
    }
  }
);
  listOfFolders.toArray(folders);
  return folders;
}

Fixed version (ground truth):
private static String[] getFolders(){
  File backupFolder=new File(BACKUP_FOLDER);
  String[] folders=backupFolder.list();
  if (folders == null) {
    return new String[]{};
  }
  List<String> listOfFolders=Arrays.asList(folders);
  Collections.sort(listOfFolders,new Comparator<String>(){
    @Override public int compare(    String o1,    String o2){
      DateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
      try {
        Date firstDate=dateFormat.parse(o1);
        Date secondDate=dateFormat.parse(o2);
        return secondDate.compareTo(firstDate);
      }
 catch (      ParseException e) {
        return 0;
      }
    }
  }
);
  listOfFolders.toArray(folders);
  return folders;
}
Program: 62727
Project: 62727
Buggy source:
public FeedbackSessionResponseStatus(){
  hasResponse=new ArrayList<String>();
  noResponse=new ArrayList<String>();
  emailNameTable=new HashMap<String,String>();
  emailSectionTable=new HashMap<String,String>();
  emailTeamNameTable=new HashMap<String,String>();
}

Fixed version (ground truth):
public FeedbackSessionResponseStatus(){
  noResponse=new ArrayList<String>();
  emailNameTable=new HashMap<String,String>();
  emailSectionTable=new HashMap<String,String>();
  emailTeamNameTable=new HashMap<String,String>();
}
Program: 62728
Project: 62728
Buggy source:
private void setDefaultPrivileges(Map<String,Boolean> defaultPrivileges){
  for (  String privilege : defaultPrivileges.keySet()) {
    courseLevel.put(privilege,defaultPrivileges.get(privilege));
  }
}

Fixed version (ground truth):
private void setDefaultPrivileges(Map<String,Boolean> defaultPrivileges){
  for (  Map.Entry<String,Boolean> entry : defaultPrivileges.entrySet()) {
    courseLevel.put(entry.getKey(),entry.getValue());
  }
}
Program: 62729
Project: 62729
Buggy source:
private boolean hasSamePrivileges(Map<String,Boolean> defaultPrivileges){
  for (  String privilege : defaultPrivileges.keySet()) {
    if (isAllowedForPrivilege(privilege) != defaultPrivileges.get(privilege)) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean hasSamePrivileges(Map<String,Boolean> defaultPrivileges){
  for (  Map.Entry<String,Boolean> entry : defaultPrivileges.entrySet()) {
    if (isAllowedForPrivilege(entry.getKey()) != entry.getValue()) {
      return false;
    }
  }
  return true;
}
Program: 62730
Project: 62730
Buggy source:
public void removeIrrelevantVisibilityOptions(){
  List<FeedbackParticipantType> optionsToRemove=new ArrayList<FeedbackParticipantType>();
switch (recipientType) {
case NONE:
    optionsToRemove.add(FeedbackParticipantType.RECEIVER);
  optionsToRemove.add(FeedbackParticipantType.RECEIVER_TEAM_MEMBERS);
break;
case TEAMS:
optionsToRemove.add(FeedbackParticipantType.RECEIVER_TEAM_MEMBERS);
break;
case INSTRUCTORS:
optionsToRemove.add(FeedbackParticipantType.RECEIVER_TEAM_MEMBERS);
break;
case OWN_TEAM:
optionsToRemove.add(FeedbackParticipantType.RECEIVER_TEAM_MEMBERS);
break;
case OWN_TEAM_MEMBERS:
optionsToRemove.add(FeedbackParticipantType.RECEIVER_TEAM_MEMBERS);
break;
default :
break;
}
switch (giverType) {
case TEAMS:
optionsToRemove.add(FeedbackParticipantType.OWN_TEAM_MEMBERS);
break;
case INSTRUCTORS:
optionsToRemove.add(FeedbackParticipantType.OWN_TEAM_MEMBERS);
break;
default :
break;
}
removeVisibilities(optionsToRemove);
}

Fixed version (ground truth):
public void removeIrrelevantVisibilityOptions(){
  List<FeedbackParticipantType> optionsToRemove=new ArrayList<FeedbackParticipantType>();
switch (recipientType) {
case NONE:
    optionsToRemove.add(FeedbackParticipantType.RECEIVER);
  optionsToRemove.add(FeedbackParticipantType.RECEIVER_TEAM_MEMBERS);
break;
case TEAMS:
case INSTRUCTORS:
case OWN_TEAM:
case OWN_TEAM_MEMBERS:
optionsToRemove.add(FeedbackParticipantType.RECEIVER_TEAM_MEMBERS);
break;
default :
break;
}
switch (giverType) {
case TEAMS:
case INSTRUCTORS:
optionsToRemove.add(FeedbackParticipantType.OWN_TEAM_MEMBERS);
break;
default :
break;
}
removeVisibilities(optionsToRemove);
}
Program: 62731
Project: 62731
Buggy source:
/** 
 * Checks whether the edit form of student has changed the team value.
 * @param originalStudentAttribute
 * @return true if team has changed from its original value.
 */
public boolean isTeamChanged(StudentAttributes originalStudentAttribute){
  return ((this.team != null) && !(this.team.equals(originalStudentAttribute.team)));
}

Fixed version (ground truth):
/** 
 * Checks whether the edit form of student has changed the team value.
 * @param originalStudentAttribute
 * @return true if team value has changed from its original value.
 */
public boolean isTeamChanged(StudentAttributes originalStudentAttribute){
  return ((this.team != null) && !(this.team.equals(originalStudentAttribute.team)));
}
Program: 62732
Project: 62732
Buggy source:
/** 
 * Checks whether the edit form of student has changed the section value.
 * @param originalStudentAttribute
 * @return true if section has changed from its original value.
 */
public boolean isSectionChanged(StudentAttributes originalStudentAttribute){
  return ((this.section != null) && !(this.section.equals(originalStudentAttribute.section)));
}

Fixed version (ground truth):
/** 
 * Checks whether the edit form of student has changed the section value.
 * @param originalStudentAttribute
 * @return true if section value has changed from its original value.
 */
public boolean isSectionChanged(StudentAttributes originalStudentAttribute){
  return ((this.section != null) && !(this.section.equals(originalStudentAttribute.section)));
}
Program: 62733
Project: 62733
Buggy source:
/** 
 * Validates teams for any limit violations
 * @param studentList
 * @param courseId
 * @throws EntityDoesNotExistException
 * @throws EnrollException
 */
public void validateTeams(List<StudentAttributes> studentList,String courseId) throws EntityDoesNotExistException, EnrollException {
  List<StudentAttributes> mergedList=getMergedList(studentList,courseId);
  if (mergedList.size() < 2) {
    return;
  }
  String errorMessage="String_Node_Str";
  errorMessage+=getTeamInvalidityInfo(mergedList);
  if (!errorMessage.isEmpty()) {
    throw new EnrollException(errorMessage);
  }
}

Fixed version (ground truth):
/** 
 * Validates teams for any team name violations
 * @param studentList
 * @param courseId
 * @throws EntityDoesNotExistException
 * @throws EnrollException
 */
public void validateTeams(List<StudentAttributes> studentList,String courseId) throws EntityDoesNotExistException, EnrollException {
  List<StudentAttributes> mergedList=getMergedList(studentList,courseId);
  if (mergedList.size() < 2) {
    return;
  }
  String errorMessage="String_Node_Str";
  errorMessage+=getTeamInvalidityInfo(mergedList);
  if (!errorMessage.isEmpty()) {
    throw new EnrollException(errorMessage);
  }
}
Program: 62734
Project: 62734
Buggy source:
/** 
 * Validates both sections and teams for any limit violations
 * @param studentList
 * @param courseId
 * @throws EntityDoesNotExistException
 * @throws EnrollException
 */
public void validateSectionsAndTeams(List<StudentAttributes> studentList,String courseId) throws EntityDoesNotExistException, EnrollException {
  List<StudentAttributes> mergedList=getMergedList(studentList,courseId);
  if (mergedList.size() < 2) {
    return;
  }
  String errorMessage="String_Node_Str";
  errorMessage+=getSectionInvalidityInfo(mergedList);
  errorMessage+=getTeamInvalidityInfo(mergedList);
  if (!errorMessage.isEmpty()) {
    throw new EnrollException(errorMessage);
  }
}

Fixed version (ground truth):
/** 
 * Validates sections for any limit violations and teams for any team name violations.
 * @param studentList
 * @param courseId
 * @throws EntityDoesNotExistException
 * @throws EnrollException
 */
public void validateSectionsAndTeams(List<StudentAttributes> studentList,String courseId) throws EntityDoesNotExistException, EnrollException {
  List<StudentAttributes> mergedList=getMergedList(studentList,courseId);
  if (mergedList.size() < 2) {
    return;
  }
  String errorMessage="String_Node_Str";
  errorMessage+=getSectionInvalidityInfo(mergedList);
  errorMessage+=getTeamInvalidityInfo(mergedList);
  if (!errorMessage.isEmpty()) {
    throw new EnrollException(errorMessage);
  }
}
Program: 62736
Project: 62736
Buggy source:
/** 
 * Converts to String in format XX-XX-XXXX
 */
public String toStringForQuery(){
  return originalRepresentation;
}

Fixed version (ground truth):
/** 
 * Converts to String in format XX-XX-XXXX
 */
public String toStringForQuery(){
  return originalRepresentation.replaceAll("String_Node_Str","String_Node_Str");
}
Program: 62740
Project: 62740
Buggy source:
/** 
 * @return true if the status message modal is visible.
 */
public boolean isFormSubmissionStatusMessageVisible(){
  WebElement copyModalErrorMessage=browser.driver.findElement(By.id("String_Node_Str"));
  return copyModalErrorMessage.isDisplayed();
}

Fixed version (ground truth):
/** 
 * @return true if the status message modal is visible.
 */
public boolean isFormSubmissionStatusMessageVisible(){
  return copyModalStatusMessage.isDisplayed();
}
Program: 62741
Project: 62741
Buggy source:
private String getFsCopyStatus(){
  WebElement copyModalStatusMessage=browser.driver.findElement(By.id("String_Node_Str"));
  return copyModalStatusMessage.getText();
}

Fixed version (ground truth):
private String getFsCopyStatus(){
  return copyModalStatusMessage.getText();
}
Program: 62742
Project: 62742
Buggy source:
/** 
 * Verifies that the status message on the copy modal is the   {@code expectedStatusMessage}
 * @param expectedStatusMessage
 */
public void verifyStatusMessage(String expectedStatusMessage){
  assertEquals(expectedStatusMessage,getFsCopyStatus());
}

Fixed version (ground truth):
/** 
 * Verifies that the status message on the copy modal is the   {@code expectedStatusMessage}
 */
public void verifyStatusMessage(String expectedStatusMessage){
  assertEquals(expectedStatusMessage,getFsCopyStatus());
}
Program: 62743
Project: 62743
Buggy source:
public void waitForModalToLoad(){
  waitForElementPresence(By.id(Const.ParamsNames.COPIED_FEEDBACK_SESSION_NAME));
}

Fixed version (ground truth):
public void waitForModalToLoad(){
  By byCopiedFsNameField=By.id(Const.ParamsNames.COPIED_FEEDBACK_SESSION_NAME);
  waitForElementPresence(byCopiedFsNameField);
  waitForElementVisibility(browser.driver.findElement(byCopiedFsNameField));
  copyModalStatusMessage=browser.driver.findElement(By.id(FEEDBACK_COPY_MODAL_STATUS));
}
Program: 62746
Project: 62746
Buggy source:
private FeedbackQuestionSubmitPage loginToStudentFeedbackQuestionSubmitPage(String studentName,String fsName,String questionId){
  StudentAttributes s=testData.students.get(studentName);
  Url editUrl=createUrl(Const.ActionURIs.STUDENT_FEEDBACK_QUESTION_SUBMISSION_EDIT_PAGE).withUserId(s.googleId).withCourseId(testData.feedbackSessions.get(fsName).courseId).withSessionName(testData.feedbackSessions.get(fsName).feedbackSessionName).withParam(Const.ParamsNames.FEEDBACK_QUESTION_ID,questionId);
  return loginAdminToPage(browser,editUrl,FeedbackQuestionSubmitPage.class);
}

Fixed version (ground truth):
private FeedbackQuestionSubmitPage loginToStudentFeedbackQuestionSubmitPage(String studentName,String fsName,String questionId){
  StudentAttributes s=testData.students.get(studentName);
  Url submitPageUrl=new Url(Const.ActionURIs.STUDENT_FEEDBACK_QUESTION_SUBMISSION_EDIT_PAGE).withUserId(s.googleId).withCourseId(testData.feedbackSessions.get(fsName).courseId).withSessionName(testData.feedbackSessions.get(fsName).feedbackSessionName).withParam(Const.ParamsNames.FEEDBACK_QUESTION_ID,questionId);
  return loginAdminToPage(browser,submitPageUrl,FeedbackQuestionSubmitPage.class);
}
Program: 62747
Project: 62747
Buggy source:
private InstructorFeedbackEditPage getFeedbackEditPage(){
  Url feedbackPageLink=createUrl(Const.ActionURIs.INSTRUCTOR_FEEDBACK_EDIT_PAGE).withUserId(instructorId).withCourseId(instructorCourseId).withSessionName(instructorEditFSName);
  return loginAdminToPage(browser,feedbackPageLink,InstructorFeedbackEditPage.class);
}

Fixed version (ground truth):
private InstructorFeedbackEditPage getFeedbackEditPage(){
  Url feedbackPageLink=new Url(Const.ActionURIs.INSTRUCTOR_FEEDBACK_EDIT_PAGE).withUserId(instructorId).withCourseId(instructorCourseId).withSessionName(instructorEditFSName);
  return loginAdminToPage(browser,feedbackPageLink,InstructorFeedbackEditPage.class);
}
Program: 62748
Project: 62748
Buggy source:
private FeedbackSubmitPage loginToInstructorFeedbackSubmitPage(String instructorName,String fsName){
  Url editUrl=createUrl(Const.ActionURIs.INSTRUCTOR_FEEDBACK_SUBMISSION_EDIT_PAGE).withUserId(testData.instructors.get(instructorName).googleId).withCourseId(testData.feedbackSessions.get(fsName).courseId).withSessionName(testData.feedbackSessions.get(fsName).feedbackSessionName);
  return loginAdminToPage(browser,editUrl,FeedbackSubmitPage.class);
}

Fixed version (ground truth):
private FeedbackSubmitPage loginToInstructorFeedbackSubmitPage(String instructorName,String fsName){
  Url submitPageUrl=new Url(Const.ActionURIs.INSTRUCTOR_FEEDBACK_SUBMISSION_EDIT_PAGE).withUserId(testData.instructors.get(instructorName).googleId).withCourseId(testData.feedbackSessions.get(fsName).courseId).withSessionName(testData.feedbackSessions.get(fsName).feedbackSessionName);
  return loginAdminToPage(browser,submitPageUrl,FeedbackSubmitPage.class);
}
Program: 62749
Project: 62749
Buggy source:
private InstructorFeedbackResultsPage loginToInstructorFeedbackResultsPageWithViewType(String instructorName,String fsName,boolean needAjax,String viewType){
  Url editUrl=createUrl(Const.ActionURIs.INSTRUCTOR_FEEDBACK_RESULTS_PAGE).withUserId(testData.instructors.get(instructorName).googleId).withCourseId(testData.feedbackSessions.get(fsName).courseId).withSessionName(testData.feedbackSessions.get(fsName).feedbackSessionName);
  if (needAjax) {
    editUrl=editUrl.withParam(Const.ParamsNames.FEEDBACK_RESULTS_NEED_AJAX,String.valueOf(needAjax));
  }
  if (viewType != null) {
    editUrl=editUrl.withParam(Const.ParamsNames.FEEDBACK_RESULTS_SORTTYPE,viewType);
  }
  return loginAdminToPage(browser,editUrl,InstructorFeedbackResultsPage.class);
}

Fixed version (ground truth):
private InstructorFeedbackResultsPage loginToInstructorFeedbackResultsPageWithViewType(String instructorName,String fsName,boolean needAjax,String viewType){
  Url resultsPageUrl=new Url(Const.ActionURIs.INSTRUCTOR_FEEDBACK_RESULTS_PAGE).withUserId(testData.instructors.get(instructorName).googleId).withCourseId(testData.feedbackSessions.get(fsName).courseId).withSessionName(testData.feedbackSessions.get(fsName).feedbackSessionName);
  if (needAjax) {
    resultsPageUrl=resultsPageUrl.withParam(Const.ParamsNames.FEEDBACK_RESULTS_NEED_AJAX,String.valueOf(needAjax));
  }
  if (viewType != null) {
    resultsPageUrl=resultsPageUrl.withParam(Const.ParamsNames.FEEDBACK_RESULTS_SORTTYPE,viewType);
  }
  return loginAdminToPage(browser,resultsPageUrl,InstructorFeedbackResultsPage.class);
}
Program: 62750
Project: 62750
Buggy source:
private StudentFeedbackResultsPage loginToStudentFeedbackResultsPage(String studentName,String fsName){
  Url editUrl=createUrl(Const.ActionURIs.STUDENT_FEEDBACK_RESULTS_PAGE).withUserId(testData.students.get(studentName).googleId).withCourseId(testData.feedbackSessions.get(fsName).courseId).withSessionName(testData.feedbackSessions.get(fsName).feedbackSessionName);
  return loginAdminToPage(browser,editUrl,StudentFeedbackResultsPage.class);
}

Fixed version (ground truth):
private StudentFeedbackResultsPage loginToStudentFeedbackResultsPage(String studentName,String fsName){
  Url resultsPageUrl=new Url(Const.ActionURIs.STUDENT_FEEDBACK_RESULTS_PAGE).withUserId(testData.students.get(studentName).googleId).withCourseId(testData.feedbackSessions.get(fsName).courseId).withSessionName(testData.feedbackSessions.get(fsName).feedbackSessionName);
  return loginAdminToPage(browser,resultsPageUrl,StudentFeedbackResultsPage.class);
}
Program: 62751
Project: 62751
Buggy source:
private FeedbackSubmitPage loginToStudentFeedbackSubmitPage(String studentName,String fsName){
  Url editUrl=createUrl(Const.ActionURIs.STUDENT_FEEDBACK_SUBMISSION_EDIT_PAGE).withUserId(testData.students.get(studentName).googleId).withCourseId(testData.feedbackSessions.get(fsName).courseId).withSessionName(testData.feedbackSessions.get(fsName).feedbackSessionName);
  return loginAdminToPage(browser,editUrl,FeedbackSubmitPage.class);
}

Fixed version (ground truth):
private FeedbackSubmitPage loginToStudentFeedbackSubmitPage(String studentName,String fsName){
  Url submitPageUrl=new Url(Const.ActionURIs.STUDENT_FEEDBACK_SUBMISSION_EDIT_PAGE).withUserId(testData.students.get(studentName).googleId).withCourseId(testData.feedbackSessions.get(fsName).courseId).withSessionName(testData.feedbackSessions.get(fsName).feedbackSessionName);
  return loginAdminToPage(browser,submitPageUrl,FeedbackSubmitPage.class);
}
Program: 62752
Project: 62752
Buggy source:
private boolean testAndRunGodMode(String filePath,String content,boolean isPart){
  if (content != null && !content.isEmpty() && System.getProperty("String_Node_Str") != null && System.getProperty("String_Node_Str").equals("String_Node_Str")) {
    assert(TestProperties.inst().isDevServer());
    if (areTestAccountsDefaultValues()) {
      Assumption.fail("String_Node_Str" + "String_Node_Str");
    }
    try {
      String processedPageSource=processPageSourceForGodMode(content);
      processedPageSource=HtmlHelper.convertToStandardHtml(processedPageSource,isPart);
      saveCurrentPage(filePath,processedPageSource);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
private boolean testAndRunGodMode(String filePath,String content,boolean isPart){
  if (content != null && !content.isEmpty() && System.getProperty("String_Node_Str") != null && System.getProperty("String_Node_Str").equals("String_Node_Str")) {
    assert(TestProperties.inst().isDevServer());
    if (areTestAccountsDefaultValues()) {
      Assumption.fail("String_Node_Str" + "String_Node_Str");
    }
    try {
      String processedPageSource=HtmlHelper.convertToStandardHtml(content,isPart);
      processedPageSource=processPageSourceForGodMode(processedPageSource);
      saveCurrentPage(filePath,processedPageSource);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return true;
  }
 else {
    return false;
  }
}
Program: 62753
Project: 62753
Buggy source:
/** 
 * Get the possible recipients for a TEAM giver for the question specified
 * @param fqa
 * @param givingTeam
 * @return a list of possible recipients that can receive a response from giver specified bythe givingTeam
 */
private List<String> getPossibleRecipientsForTeam(FeedbackQuestionAttributes fqa,String givingTeam){
  FeedbackParticipantType recipientType=fqa.recipientType;
  List<String> possibleRecipients=new ArrayList<String>();
switch (recipientType) {
case TEAMS:
    possibleRecipients=getSortedListOfTeams();
  possibleRecipients.remove(givingTeam);
break;
case OWN_TEAM:
possibleRecipients.add(givingTeam);
break;
case INSTRUCTORS:
possibleRecipients=getSortedListOfInstructorEmails();
break;
case STUDENTS:
possibleRecipients=getSortedListOfStudentEmails();
break;
case SELF:
case OWN_TEAM_MEMBERS_INCLUDING_SELF:
if (rosterTeamNameMembersTable.containsKey(givingTeam)) {
Set<String> studentEmailsToNames=rosterTeamNameMembersTable.get(givingTeam);
possibleRecipients=new ArrayList<String>(studentEmailsToNames);
}
break;
case NONE:
possibleRecipients.add(Const.GENERAL_QUESTION);
break;
default :
log.severe("String_Node_Str");
break;
}
return possibleRecipients;
}

Fixed version (ground truth):
/** 
 * Get the possible recipients for a TEAM giver for the question specified
 * @param fqa
 * @param givingTeam
 * @return a list of possible recipients that can receive a response from giver specified bythe givingTeam
 */
private List<String> getPossibleRecipientsForTeam(FeedbackQuestionAttributes fqa,String givingTeam){
  FeedbackParticipantType recipientType=fqa.recipientType;
  List<String> possibleRecipients=new ArrayList<String>();
switch (recipientType) {
case TEAMS:
    possibleRecipients=getSortedListOfTeams();
  possibleRecipients.remove(givingTeam);
break;
case OWN_TEAM:
possibleRecipients.add(givingTeam);
break;
case INSTRUCTORS:
possibleRecipients=getSortedListOfInstructorEmails();
break;
case STUDENTS:
possibleRecipients=getSortedListOfStudentEmails();
break;
case SELF:
case OWN_TEAM_MEMBERS_INCLUDING_SELF:
if (rosterTeamNameMembersTable.containsKey(givingTeam)) {
Set<String> studentEmailsToNames=rosterTeamNameMembersTable.get(givingTeam);
possibleRecipients=new ArrayList<String>(studentEmailsToNames);
Collections.sort(possibleRecipients);
}
break;
case NONE:
possibleRecipients.add(Const.GENERAL_QUESTION);
break;
default :
log.severe("String_Node_Str");
break;
}
return possibleRecipients;
}
Program: 62754
Project: 62754
Buggy source:
public CourseSummaryBundle getCourseSummaryWithFeedbackSessions(String courseId) throws EntityDoesNotExistException {
  Assumption.assertNotNull(courseId);
  return coursesLogic.getCourseSummaryWithFeedbackSessions(courseId);
}

Fixed version (ground truth):
public CourseSummaryBundle getCourseSummaryWithFeedbackSessions(InstructorAttributes instructor) throws EntityDoesNotExistException {
  Assumption.assertNotNull(instructor);
  return coursesLogic.getCourseSummaryWithFeedbackSessionsForInstructor(instructor);
}
Program: 62755
Project: 62755
Buggy source:
private ActionResult loadCourse(String courseToLoad) throws EntityDoesNotExistException {
  int index=Integer.parseInt(getRequestParamValue("String_Node_Str"));
  CourseSummaryBundle course=logic.getCourseSummaryWithFeedbackSessions(courseToLoad);
  FeedbackSessionAttributes.sortFeedbackSessionsByCreationTimeDescending(course.feedbackSessions);
  InstructorAttributes instructor=logic.getInstructorForGoogleId(courseToLoad,account.googleId);
  int commentsForSendingStateCount=logic.getCommentsForSendingState(courseToLoad,CommentSendingState.PENDING).size();
  int feedbackResponseCommentsForSendingStateCount=logic.getFeedbackResponseCommentsForSendingState(courseToLoad,CommentSendingState.PENDING).size();
  int pendingCommentsCount=commentsForSendingStateCount + feedbackResponseCommentsForSendingStateCount;
  InstructorHomeCourseAjaxPageData data=new InstructorHomeCourseAjaxPageData(account);
  data.init(index,course,instructor,pendingCommentsCount);
  return createShowPageResult(Const.ViewURIs.INSTRUCTOR_HOME_AJAX_COURSE_TABLE,data);
}

Fixed version (ground truth):
private ActionResult loadCourse(String courseToLoad) throws EntityDoesNotExistException {
  int index=Integer.parseInt(getRequestParamValue("String_Node_Str"));
  InstructorAttributes instructor=logic.getInstructorForGoogleId(courseToLoad,account.googleId);
  CourseSummaryBundle course=logic.getCourseSummaryWithFeedbackSessions(instructor);
  FeedbackSessionAttributes.sortFeedbackSessionsByCreationTimeDescending(course.feedbackSessions);
  int commentsForSendingStateCount=logic.getCommentsForSendingState(courseToLoad,CommentSendingState.PENDING).size();
  int feedbackResponseCommentsForSendingStateCount=logic.getFeedbackResponseCommentsForSendingState(courseToLoad,CommentSendingState.PENDING).size();
  int pendingCommentsCount=commentsForSendingStateCount + feedbackResponseCommentsForSendingStateCount;
  InstructorHomeCourseAjaxPageData data=new InstructorHomeCourseAjaxPageData(account);
  data.init(index,course,instructor,pendingCommentsCount);
  return createShowPageResult(Const.ViewURIs.INSTRUCTOR_HOME_AJAX_COURSE_TABLE,data);
}
Program: 62756
Project: 62756
Buggy source:
private FeedbackResponseComment buildFeedbackResponseCommentAddForm(FeedbackQuestionAttributes question,FeedbackResponseAttributes response,Map<FeedbackParticipantType,Boolean> responseVisibilityMap,String giverName,String recipientName){
  FeedbackParticipantType[] relevantTypes={FeedbackParticipantType.GIVER,FeedbackParticipantType.RECEIVER,FeedbackParticipantType.OWN_TEAM_MEMBERS,FeedbackParticipantType.RECEIVER_TEAM_MEMBERS,FeedbackParticipantType.STUDENTS,FeedbackParticipantType.INSTRUCTORS};
  List<FeedbackParticipantType> showCommentTo=new ArrayList<>();
  List<FeedbackParticipantType> showGiverNameTo=new ArrayList<>();
  for (  FeedbackParticipantType type : relevantTypes) {
    if (isResponseCommentVisibleTo(question,type)) {
      showCommentTo.add(type);
    }
    if (isResponseCommentGiverNameVisibleTo(question,type)) {
      showGiverNameTo.add(type);
    }
  }
  FeedbackResponseCommentAttributes frca=new FeedbackResponseCommentAttributes(question.courseId,question.feedbackSessionName,question.getFeedbackQuestionId(),response.getId());
  return new FeedbackResponseComment(frca,giverName,recipientName,getResponseCommentVisibilityString(question),getResponseCommentGiverNameVisibilityString(question),responseVisibilityMap.get(FeedbackParticipantType.RECEIVER),responseVisibilityMap.get(FeedbackParticipantType.OWN_TEAM_MEMBERS),responseVisibilityMap.get(FeedbackParticipantType.RECEIVER_TEAM_MEMBERS),responseVisibilityMap.get(FeedbackParticipantType.STUDENTS),responseVisibilityMap.get(FeedbackParticipantType.INSTRUCTORS),showCommentTo,showGiverNameTo,true);
}

Fixed version (ground truth):
private FeedbackResponseComment buildFeedbackResponseCommentAddForm(FeedbackQuestionAttributes question,FeedbackResponseAttributes response,Map<FeedbackParticipantType,Boolean> responseVisibilityMap,String giverName,String recipientName){
  FeedbackResponseCommentAttributes frca=new FeedbackResponseCommentAttributes(question.courseId,question.feedbackSessionName,question.getFeedbackQuestionId(),response.getId());
  FeedbackParticipantType[] relevantTypes={FeedbackParticipantType.GIVER,FeedbackParticipantType.RECEIVER,FeedbackParticipantType.OWN_TEAM_MEMBERS,FeedbackParticipantType.RECEIVER_TEAM_MEMBERS,FeedbackParticipantType.STUDENTS,FeedbackParticipantType.INSTRUCTORS};
  frca.showCommentTo=new ArrayList<FeedbackParticipantType>();
  frca.showGiverNameTo=new ArrayList<FeedbackParticipantType>();
  for (  FeedbackParticipantType type : relevantTypes) {
    if (isResponseCommentVisibleTo(question,type)) {
      frca.showCommentTo.add(type);
    }
    if (isResponseCommentGiverNameVisibleTo(question,type)) {
      frca.showGiverNameTo.add(type);
    }
  }
  return new FeedbackResponseComment(frca,giverName,recipientName,getResponseCommentVisibilityString(question),getResponseCommentGiverNameVisibilityString(question),responseVisibilityMap);
}
Program: 62760
Project: 62760
Buggy source:
private InstructorFeedbackResultsGroupByParticipantPanel buildGroupByParticipantPanel(String primaryParticipantIdentifier,String currentTeam,String additionalInfoId,int primaryParticipantIndex,Map.Entry<String,Map<String,List<FeedbackResponseAttributes>>> primaryToSecondaryToResponsesMap){
  Map<String,List<FeedbackResponseAttributes>> giverToResponsesMap=primaryToSecondaryToResponsesMap.getValue();
  List<InstructorFeedbackResultsSecondaryParticipantPanelBody> secondaryParticipantPanels=buildSecondaryParticipantPanels(additionalInfoId,primaryParticipantIndex,giverToResponsesMap);
  String primaryParticipantNameWithTeamNameAppended=bundle.appendTeamNameToName(bundle.getNameForEmail(primaryParticipantIdentifier),bundle.getTeamNameForEmail(primaryParticipantIdentifier));
  InstructorFeedbackResultsGroupByParticipantPanel recipientPanel=buildInstructorFeedbackResultsGroupBySecondaryParticipantPanel(primaryParticipantIdentifier,primaryParticipantNameWithTeamNameAppended,secondaryParticipantPanels,null);
  return recipientPanel;
}

Fixed version (ground truth):
private InstructorFeedbackResultsGroupByParticipantPanel buildGroupByParticipantPanel(String primaryParticipantIdentifier,String currentTeam,String additionalInfoId,int primaryParticipantIndex,Map.Entry<String,Map<String,List<FeedbackResponseAttributes>>> primaryToSecondaryToResponsesMap){
  Map<String,List<FeedbackResponseAttributes>> giverToResponsesMap=primaryToSecondaryToResponsesMap.getValue();
  List<InstructorFeedbackResultsSecondaryParticipantPanelBody> secondaryParticipantPanels=buildSecondaryParticipantPanels(additionalInfoId,primaryParticipantIndex,giverToResponsesMap);
  String primaryParticipantNameWithTeamNameAppended=bundle.appendTeamNameToName(bundle.getNameForEmail(primaryParticipantIdentifier),bundle.getTeamNameForEmail(primaryParticipantIdentifier));
  InstructorResultsModerationButton moderationButton=viewType.isPrimaryGrouperOfGiverType() ? buildModerationButtonForGiver(null,primaryParticipantIdentifier,"String_Node_Str","String_Node_Str") : null;
  InstructorFeedbackResultsGroupByParticipantPanel recipientPanel=buildInstructorFeedbackResultsGroupBySecondaryParticipantPanel(primaryParticipantIdentifier,primaryParticipantNameWithTeamNameAppended,secondaryParticipantPanels,moderationButton);
  return recipientPanel;
}
Program: 62761
Project: 62761
Buggy source:
private InstructorFeedbackResultsGroupByParticipantPanel buildInstructorFeedbackResultsGroupBySecondaryParticipantPanel(String participantIdentifier,String participantName,List<InstructorFeedbackResultsSecondaryParticipantPanelBody> secondaryParticipantPanels,InstructorResultsModerationButton moderationButton){
  Url profilePictureLink=new Url(getProfilePictureLink(participantIdentifier));
  InstructorFeedbackResultsGroupByParticipantPanel bySecondaryParticipantPanel=new InstructorFeedbackResultsGroupByParticipantPanel(secondaryParticipantPanels);
  bySecondaryParticipantPanel.setParticipantIdentifier(participantIdentifier);
  bySecondaryParticipantPanel.setName(participantName);
  bySecondaryParticipantPanel.setGiver(viewType.isPrimaryGrouperOfGiverType());
  boolean isEmailValid=validator.getInvalidityInfo(FieldValidator.FieldType.EMAIL,participantIdentifier).isEmpty();
  bySecondaryParticipantPanel.setEmailValid(isEmailValid);
  bySecondaryParticipantPanel.setProfilePictureLink(profilePictureLink.toString());
  bySecondaryParticipantPanel.setModerationButton(viewType.isPrimaryGrouperOfGiverType() ? moderationButton : null);
  bySecondaryParticipantPanel.setHasResponses(true);
  return bySecondaryParticipantPanel;
}

Fixed version (ground truth):
private InstructorFeedbackResultsGroupByParticipantPanel buildInstructorFeedbackResultsGroupBySecondaryParticipantPanel(String participantIdentifier,String participantName,List<InstructorFeedbackResultsSecondaryParticipantPanelBody> secondaryParticipantPanels,InstructorResultsModerationButton moderationButton){
  Url profilePictureLink=new Url(getProfilePictureLink(participantIdentifier));
  InstructorFeedbackResultsGroupByParticipantPanel bySecondaryParticipantPanel=new InstructorFeedbackResultsGroupByParticipantPanel(secondaryParticipantPanels);
  bySecondaryParticipantPanel.setParticipantIdentifier(participantIdentifier);
  bySecondaryParticipantPanel.setName(participantName);
  bySecondaryParticipantPanel.setGiver(viewType.isPrimaryGrouperOfGiverType());
  boolean isEmailValid=validator.getInvalidityInfo(FieldValidator.FieldType.EMAIL,participantIdentifier).isEmpty();
  bySecondaryParticipantPanel.setEmailValid(isEmailValid);
  bySecondaryParticipantPanel.setProfilePictureLink(profilePictureLink.toString());
  bySecondaryParticipantPanel.setModerationButton(moderationButton);
  bySecondaryParticipantPanel.setHasResponses(true);
  return bySecondaryParticipantPanel;
}
Program: 62763
Project: 62763
Buggy source:
private void finaliseBuildingSectionPanelWithoutStats(InstructorFeedbackResultsSectionPanel sectionPanel,String sectionWithoutResponses){
  LinkedHashMap<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>> emptyResponseMap=new LinkedHashMap<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>>();
  Set<String> emptyTeamList=new LinkedHashSet<String>();
  finalizeBuildingSectionPanel(sectionPanel,sectionWithoutResponses,emptyResponseMap,emptyTeamList);
}

Fixed version (ground truth):
private void finaliseBuildingSectionPanelWithoutStats(InstructorFeedbackResultsSectionPanel sectionPanel,String sectionWithoutResponses){
  LinkedHashMap<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>> emptyResponseMap=new LinkedHashMap<String,Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>>>();
  LinkedHashSet<String> emptyTeamList=new LinkedHashSet<String>();
  finalizeBuildingSectionPanel(sectionPanel,sectionWithoutResponses,emptyResponseMap,emptyTeamList);
}
Program: 62764
Project: 62764
Buggy source:
private InstructorFeedbackResultsGroupByParticipantPanel buildGroupByParticipantPanel(String primaryParticipantIdentifier,String currentTeam,String additionalInfoId,int primaryParticipantIndex,Map.Entry<String,Map<String,List<FeedbackResponseAttributes>>> primaryToSecondaryToResponsesMap){
  Map<String,List<FeedbackResponseAttributes>> giverToResponsesMap=primaryToSecondaryToResponsesMap.getValue();
  List<InstructorFeedbackResultsSecondaryParticipantPanelBody> secondaryParticipantPanels=buildSecondaryParticipantPanels(additionalInfoId,primaryParticipantIndex,giverToResponsesMap);
  String primaryParticipantNameWithTeamNameAppended=bundle.appendTeamNameToName(bundle.getNameForEmail(primaryParticipantIdentifier),bundle.getTeamNameForEmail(primaryParticipantIdentifier));
  InstructorFeedbackResultsGroupByParticipantPanel recipientPanel=buildInstructorFeedbackResultsGroupBySecondaryParticipantPanel(primaryParticipantIdentifier,primaryParticipantNameWithTeamNameAppended,secondaryParticipantPanels,null,false);
  return recipientPanel;
}

Fixed version (ground truth):
private InstructorFeedbackResultsGroupByParticipantPanel buildGroupByParticipantPanel(String primaryParticipantIdentifier,String currentTeam,String additionalInfoId,int primaryParticipantIndex,Map.Entry<String,Map<String,List<FeedbackResponseAttributes>>> primaryToSecondaryToResponsesMap){
  Map<String,List<FeedbackResponseAttributes>> giverToResponsesMap=primaryToSecondaryToResponsesMap.getValue();
  List<InstructorFeedbackResultsSecondaryParticipantPanelBody> secondaryParticipantPanels=buildSecondaryParticipantPanels(additionalInfoId,primaryParticipantIndex,giverToResponsesMap);
  String primaryParticipantNameWithTeamNameAppended=bundle.appendTeamNameToName(bundle.getNameForEmail(primaryParticipantIdentifier),bundle.getTeamNameForEmail(primaryParticipantIdentifier));
  InstructorFeedbackResultsGroupByParticipantPanel recipientPanel=buildInstructorFeedbackResultsGroupBySecondaryParticipantPanel(primaryParticipantIdentifier,primaryParticipantNameWithTeamNameAppended,secondaryParticipantPanels,null);
  return recipientPanel;
}
Program: 62765
Project: 62765
Buggy source:
public void initForViewByRecipientGiverQuestion(InstructorAttributes instructor,String selectedSection,String showStats,String groupByTeam){
  viewType=ViewType.RECIPIENT_GIVER_QUESTION;
  this.instructor=instructor;
  this.selectedSection=selectedSection;
  this.showStats=showStats;
  this.groupByTeam=groupByTeam;
  if (!bundle.isComplete) {
    buildSectionPanelsForForAjaxLoading(sections);
    return;
  }
  if (bundle.responses.isEmpty()) {
    return;
  }
  setShouldCollapsed(bundle.responses.size() > RESPONSE_LIMIT_FOR_COLLAPSING_PANEL);
  Map<String,Map<String,List<FeedbackResponseAttributes>>> sortedResponses=bundle.getResponsesSortedByRecipient(true);
  buildSectionPanelsForRecipientGiverQuestion(sortedResponses);
}

Fixed version (ground truth):
public void initForViewByRecipientGiverQuestion(InstructorAttributes instructor,String selectedSection,String showStats,String groupByTeam){
  viewType=ViewType.RECIPIENT_GIVER_QUESTION;
  this.instructor=instructor;
  this.selectedSection=selectedSection;
  this.showStats=showStats;
  this.groupByTeam=groupByTeam;
  if (!bundle.isComplete) {
    if (isAllSectionsSelected()) {
      buildSectionPanelsForForAjaxLoading(sections);
    }
 else {
      buildSectionPanelWithErrorMessage();
    }
    return;
  }
  if (bundle.responses.isEmpty()) {
    return;
  }
  setShouldCollapsed(bundle.responses.size() > RESPONSE_LIMIT_FOR_COLLAPSING_PANEL);
  Map<String,Map<String,List<FeedbackResponseAttributes>>> sortedResponses=bundle.getResponsesSortedByRecipient(true);
  buildSectionPanelsForRecipientGiverQuestion(sortedResponses);
}
Program: 62766
Project: 62766
Buggy source:
private void addMissingParticipantsForTeamToSectionPanelWithModerationButton(InstructorFeedbackResultsSectionPanel sectionPanel,String teamName,List<String> teamMembers){
  for (  String teamMember : teamMembers) {
    InstructorResultsModerationButton moderationButton=buildModerationButtonForGiver(null,teamMember,"String_Node_Str","String_Node_Str");
    InstructorResultsParticipantPanel giverPanel;
    if (!viewType.isGroupedBySecondaryParticipant()) {
      giverPanel=InstructorFeedbackResultsGroupByQuestionPanel.buildInstructorFeedbackResultsGroupByQuestionPanelWithModerationButton(teamMember,bundle.getFullNameFromRoster(teamMember),new ArrayList<InstructorResultsQuestionTable>(),getProfilePictureLink(teamMember),viewType.isFirstGroupedByGiver(),moderationButton);
    }
 else {
      giverPanel=buildInstructorFeedbackResultsGroupBySecondaryParticipantPanel(teamMember,bundle.getFullNameFromRoster(teamMember) + "String_Node_Str" + bundle.getTeamNameForEmail(teamMember)+ "String_Node_Str",new ArrayList<InstructorFeedbackResultsSecondaryParticipantPanelBody>(),moderationButton,true);
    }
    giverPanel.setHasResponses(false);
    addParticipantPanelToSectionPanel(sectionPanel,teamName,giverPanel);
  }
}

Fixed version (ground truth):
private void addMissingParticipantsForTeamToSectionPanelWithModerationButton(InstructorFeedbackResultsSectionPanel sectionPanel,String teamName,List<String> teamMembers){
  for (  String teamMember : teamMembers) {
    InstructorResultsModerationButton moderationButton=buildModerationButtonForGiver(null,teamMember,"String_Node_Str","String_Node_Str");
    InstructorResultsParticipantPanel giverPanel;
    if (!viewType.isGroupedBySecondaryParticipant()) {
      giverPanel=InstructorFeedbackResultsGroupByQuestionPanel.buildInstructorFeedbackResultsGroupByQuestionPanelWithModerationButton(teamMember,bundle.getFullNameFromRoster(teamMember),new ArrayList<InstructorResultsQuestionTable>(),getProfilePictureLink(teamMember),viewType.isFirstGroupedByGiver(),moderationButton);
    }
 else {
      giverPanel=buildInstructorFeedbackResultsGroupBySecondaryParticipantPanel(teamMember,bundle.getFullNameFromRoster(teamMember) + "String_Node_Str" + bundle.getTeamNameForEmail(teamMember)+ "String_Node_Str",new ArrayList<InstructorFeedbackResultsSecondaryParticipantPanelBody>(),moderationButton);
    }
    giverPanel.setHasResponses(false);
    addParticipantPanelToSectionPanel(sectionPanel,teamName,giverPanel);
  }
}
Program: 62767
Project: 62767
Buggy source:
private void addMissingParticipantsForTeamToSectionPanelWithoutModerationButton(InstructorFeedbackResultsSectionPanel sectionPanel,String teamName,List<String> teamMembers){
  for (  String teamMember : teamMembers) {
    InstructorResultsParticipantPanel giverPanel;
    if (!viewType.isGroupedBySecondaryParticipant()) {
      giverPanel=InstructorFeedbackResultsGroupByQuestionPanel.buildInstructorFeedbackResultsGroupByQuestionPanelWithoutModerationButton(new ArrayList<InstructorResultsQuestionTable>(),getProfilePictureLink(teamMember),viewType.isFirstGroupedByGiver(),teamMember,bundle.getFullNameFromRoster(teamMember));
    }
 else {
      giverPanel=buildInstructorFeedbackResultsGroupBySecondaryParticipantPanel(teamMember,bundle.getFullNameFromRoster(teamMember) + "String_Node_Str" + bundle.getTeamNameFromRoster(teamMember)+ "String_Node_Str",new ArrayList<InstructorFeedbackResultsSecondaryParticipantPanelBody>(),null,false);
    }
    giverPanel.setHasResponses(false);
    addParticipantPanelToSectionPanel(sectionPanel,teamName,giverPanel);
  }
}

Fixed version (ground truth):
private void addMissingParticipantsForTeamToSectionPanelWithoutModerationButton(InstructorFeedbackResultsSectionPanel sectionPanel,String teamName,List<String> teamMembers){
  for (  String teamMember : teamMembers) {
    InstructorResultsParticipantPanel giverPanel;
    if (!viewType.isGroupedBySecondaryParticipant()) {
      giverPanel=InstructorFeedbackResultsGroupByQuestionPanel.buildInstructorFeedbackResultsGroupByQuestionPanelWithoutModerationButton(new ArrayList<InstructorResultsQuestionTable>(),getProfilePictureLink(teamMember),viewType.isFirstGroupedByGiver(),teamMember,bundle.getFullNameFromRoster(teamMember));
    }
 else {
      giverPanel=buildInstructorFeedbackResultsGroupBySecondaryParticipantPanel(teamMember,bundle.getFullNameFromRoster(teamMember) + "String_Node_Str" + bundle.getTeamNameFromRoster(teamMember)+ "String_Node_Str",new ArrayList<InstructorFeedbackResultsSecondaryParticipantPanelBody>(),null);
    }
    giverPanel.setHasResponses(false);
    addParticipantPanelToSectionPanel(sectionPanel,teamName,giverPanel);
  }
}
Program: 62768
Project: 62768
Buggy source:
private InstructorFeedbackResultsGroupByParticipantPanel buildInstructorFeedbackResultsGroupBySecondaryParticipantPanel(String participantIdentifier,String participantName,List<InstructorFeedbackResultsSecondaryParticipantPanelBody> secondaryParticipantPanels,InstructorResultsModerationButton moderationButton,boolean isModerationButtonDisplayed){
  boolean isEmailValid=validator.getInvalidityInfo(FieldValidator.FieldType.EMAIL,participantIdentifier).isEmpty();
  Url profilePictureLink=new Url(getProfilePictureLink(participantIdentifier));
  InstructorFeedbackResultsGroupByParticipantPanel bySecondaryParticipantPanel=new InstructorFeedbackResultsGroupByParticipantPanel(secondaryParticipantPanels);
  bySecondaryParticipantPanel.setParticipantIdentifier(participantIdentifier);
  bySecondaryParticipantPanel.setName(participantName);
  bySecondaryParticipantPanel.setGiver(viewType.isFirstGroupedByGiver());
  bySecondaryParticipantPanel.setEmailValid(isEmailValid);
  bySecondaryParticipantPanel.setProfilePictureLink(profilePictureLink.toString());
  bySecondaryParticipantPanel.setModerationButton(moderationButton);
  bySecondaryParticipantPanel.setModerationButtonDisplayed(isModerationButtonDisplayed);
  bySecondaryParticipantPanel.setHasResponses(true);
  return bySecondaryParticipantPanel;
}

Fixed version (ground truth):
private InstructorFeedbackResultsGroupByParticipantPanel buildInstructorFeedbackResultsGroupBySecondaryParticipantPanel(String participantIdentifier,String participantName,List<InstructorFeedbackResultsSecondaryParticipantPanelBody> secondaryParticipantPanels,InstructorResultsModerationButton moderationButton){
  boolean isEmailValid=validator.getInvalidityInfo(FieldValidator.FieldType.EMAIL,participantIdentifier).isEmpty();
  Url profilePictureLink=new Url(getProfilePictureLink(participantIdentifier));
  InstructorFeedbackResultsGroupByParticipantPanel bySecondaryParticipantPanel=new InstructorFeedbackResultsGroupByParticipantPanel(secondaryParticipantPanels);
  bySecondaryParticipantPanel.setParticipantIdentifier(participantIdentifier);
  bySecondaryParticipantPanel.setName(participantName);
  bySecondaryParticipantPanel.setGiver(viewType.isFirstGroupedByGiver());
  bySecondaryParticipantPanel.setEmailValid(isEmailValid);
  bySecondaryParticipantPanel.setProfilePictureLink(profilePictureLink.toString());
  bySecondaryParticipantPanel.setModerationButton(moderationButton);
  bySecondaryParticipantPanel.setHasResponses(true);
  return bySecondaryParticipantPanel;
}
Program: 62770
Project: 62770
Buggy source:
private List<AdminAccountDetailsStudentCourseListTableRow> createStudentCourseListTable(List<CourseAttributes> studentCourseList){
  List<AdminAccountDetailsStudentCourseListTableRow> courseListTable=new ArrayList<AdminAccountDetailsStudentCourseListTableRow>();
  for (  CourseAttributes courseDetails : studentCourseList) {
    AdminAccountDetailsStudentCourseListTableRow row=new AdminAccountDetailsStudentCourseListTableRow(accountInformation.googleId,courseDetails);
    courseListTable.add(row);
  }
  return courseListTable;
}

Fixed version (ground truth):
private List<AdminAccountDetailsStudentCourseListTableRow> createStudentCourseListTable(List<CourseAttributes> studentCourseList){
  List<AdminAccountDetailsStudentCourseListTableRow> courseListTable=new ArrayList<AdminAccountDetailsStudentCourseListTableRow>();
  if (studentCourseList != null) {
    for (    CourseAttributes courseDetails : studentCourseList) {
      AdminAccountDetailsStudentCourseListTableRow row=new AdminAccountDetailsStudentCourseListTableRow(accountInformation.googleId,courseDetails);
      courseListTable.add(row);
    }
  }
  return courseListTable;
}