nus-yam/ex-repair huggingface dataset:
Program: 62809
Project: 62809
Buggy source:
private List<Map<String,String>> createSessionRows(List<FeedbackSessionDetailsBundle> feedbackSessions,String courseId,Map<String,Boolean> sessionSubmissionStatusMap){
  List<Map<String,String>> rows=new ArrayList<Map<String,String>>();
  int sessionIndex=0;
  for (  FeedbackSessionDetailsBundle session : feedbackSessions) {
    FeedbackSessionAttributes feedbackSession=session.feedbackSession;
    String sessionName=feedbackSession.feedbackSessionName;
    boolean hasSubmitted=sessionSubmissionStatusMap.get(courseId + "String_Node_Str" + sessionName);
    Map<String,String> columns=new HashMap<String,String>();
    columns.put("String_Node_Str",PageData.sanitizeForHtml(sessionName));
    columns.put("String_Node_Str",TimeHelper.formatTime(feedbackSession.endTime));
    columns.put("String_Node_Str",getStudentHoverMessageForSession(feedbackSession,hasSubmitted));
    columns.put("String_Node_Str",getStudentStatusForSession(feedbackSession,hasSubmitted));
    columns.put("String_Node_Str",getStudentFeedbackSessionActions(feedbackSession,sessionIndex,hasSubmitted));
    rows.add(columns);
  }
  return rows;
}

Fixed version (ground truth):
private List<Map<String,String>> createSessionRows(List<FeedbackSessionDetailsBundle> feedbackSessions,String courseId,Map<String,Boolean> sessionSubmissionStatusMap,int sessionIdx){
  List<Map<String,String>> rows=new ArrayList<Map<String,String>>();
  for (  FeedbackSessionDetailsBundle session : feedbackSessions) {
    FeedbackSessionAttributes feedbackSession=session.feedbackSession;
    String sessionName=feedbackSession.feedbackSessionName;
    boolean hasSubmitted=sessionSubmissionStatusMap.get(courseId + "String_Node_Str" + sessionName);
    Map<String,String> columns=new HashMap<String,String>();
    columns.put("String_Node_Str",PageData.sanitizeForHtml(sessionName));
    columns.put("String_Node_Str",TimeHelper.formatTime(feedbackSession.endTime));
    columns.put("String_Node_Str",getStudentHoverMessageForSession(feedbackSession,hasSubmitted));
    columns.put("String_Node_Str",getStudentStatusForSession(feedbackSession,hasSubmitted));
    columns.put("String_Node_Str",getStudentFeedbackSessionActions(feedbackSession,sessionIdx,hasSubmitted));
    columns.put("String_Node_Str",Integer.toString(sessionIdx));
    rows.add(columns);
    ++sessionIdx;
  }
  return rows;
}
Program: 62810
Project: 62810
Buggy source:
private void setCourseTables(List<CourseDetailsBundle> courses,Map<String,Boolean> sessionSubmissionStatusMap){
  courseTables=new ArrayList<CourseTable>();
  for (  CourseDetailsBundle courseDetails : courses) {
    CourseTable courseTable=new CourseTable(courseDetails.course,createCourseTableLinks(courseDetails.course.id),createSessionRows(courseDetails.feedbackSessions,courseDetails.course.id,sessionSubmissionStatusMap));
    courseTables.add(courseTable);
  }
}

Fixed version (ground truth):
private void setCourseTables(List<CourseDetailsBundle> courses,Map<String,Boolean> sessionSubmissionStatusMap){
  courseTables=new ArrayList<CourseTable>();
  int startingSessionIdx=0;
  for (  CourseDetailsBundle courseDetails : courses) {
    CourseTable courseTable=new CourseTable(courseDetails.course,createCourseTableLinks(courseDetails.course.id),createSessionRows(courseDetails.feedbackSessions,courseDetails.course.id,sessionSubmissionStatusMap,startingSessionIdx));
    startingSessionIdx+=courseDetails.feedbackSessions.size();
    courseTables.add(courseTable);
  }
}
Program: 62811
Project: 62811
Buggy source:
@Override public String getQuestionResultStatisticsHtml(List<FeedbackResponseAttributes> responses,FeedbackQuestionAttributes question,PageData pageData,FeedbackSessionResultsBundle bundle,String view){
  @SuppressWarnings("String_Node_Str") String html="String_Node_Str";
  int averageLength=0;
  int minLength=Integer.MAX_VALUE;
  int maxLength=Integer.MIN_VALUE;
  int numResponses=0;
  int totalLength=0;
  for (  FeedbackResponseAttributes response : responses) {
    numResponses++;
    String answerString=response.getResponseDetails().getAnswerString();
    minLength=(StringHelper.countWords(answerString) < minLength) ? StringHelper.countWords(answerString) : minLength;
    maxLength=(StringHelper.countWords(answerString) > maxLength) ? StringHelper.countWords(answerString) : maxLength;
    totalLength+=StringHelper.countWords(answerString);
  }
  averageLength=totalLength / numResponses;
  html=FeedbackQuestionFormTemplates.populateTemplate(FeedbackQuestionFormTemplates.TEXT_RESULT_STATS,"String_Node_Str",Integer.toString(averageLength),"String_Node_Str",(minLength == Integer.MAX_VALUE) ? "String_Node_Str" : Integer.toString(minLength),"String_Node_Str",(maxLength == Integer.MIN_VALUE) ? "String_Node_Str" : Integer.toString(maxLength));
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getQuestionResultStatisticsHtml(List<FeedbackResponseAttributes> responses,FeedbackQuestionAttributes question,PageData pageData,FeedbackSessionResultsBundle bundle,String view){
  if (responses.isEmpty()) {
    return "String_Node_Str";
  }
  @SuppressWarnings("String_Node_Str") String html="String_Node_Str";
  int averageLength=0;
  int minLength=Integer.MAX_VALUE;
  int maxLength=Integer.MIN_VALUE;
  int numResponses=0;
  int totalLength=0;
  for (  FeedbackResponseAttributes response : responses) {
    numResponses++;
    String answerString=response.getResponseDetails().getAnswerString();
    minLength=(StringHelper.countWords(answerString) < minLength) ? StringHelper.countWords(answerString) : minLength;
    maxLength=(StringHelper.countWords(answerString) > maxLength) ? StringHelper.countWords(answerString) : maxLength;
    totalLength+=StringHelper.countWords(answerString);
  }
  averageLength=totalLength / numResponses;
  html=FeedbackQuestionFormTemplates.populateTemplate(FeedbackQuestionFormTemplates.TEXT_RESULT_STATS,"String_Node_Str",Integer.toString(averageLength),"String_Node_Str",(minLength == Integer.MAX_VALUE) ? "String_Node_Str" : Integer.toString(minLength),"String_Node_Str",(maxLength == Integer.MIN_VALUE) ? "String_Node_Str" : Integer.toString(maxLength));
  return "String_Node_Str";
}
Program: 62813
Project: 62813
Buggy source:
public void init(){
}

Fixed version (ground truth):
public void init(FeedbackSessionResultsBundle bundle){
  this.bundle=bundle;
  Map<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>> questionToResponseMap=bundle.getQuestionResponseMap();
  questionPanels=new ArrayList<InstructorResultsQuestionTable>();
  for (  Map.Entry<FeedbackQuestionAttributes,List<FeedbackResponseAttributes>> entry : questionToResponseMap.entrySet()) {
    FeedbackQuestionAttributes question=entry.getKey();
    List<FeedbackResponseAttributes> responses=entry.getValue();
    questionPanels.add(buildQuestionTable(question,responses));
  }
}
Program: 62814
Project: 62814
Buggy source:
public InstructorResultsQuestionTable(FeedbackSessionResultsBundle bundle,String questionStatisticsHtml,List<InstructorResultsResponseRow> responses,FeedbackQuestionAttributes question){
  this.questionStatisticsHtml=questionStatisticsHtml;
  this.responses=responses;
  this.question=question;
  this.questionText=bundle.getQuestionText(question.getId());
  FeedbackQuestionDetails questionDetails=question.getQuestionDetails();
  this.additionalInfoText=questionDetails.getQuestionAdditionalInfoHtml(question.questionNumber,"String_Node_Str");
}

Fixed version (ground truth):
public InstructorResultsQuestionTable(InstructorFeedbackResultsPageData data,List<FeedbackResponseAttributes> responses,String questionStatisticsHtml,List<InstructorResultsResponseRow> responseRows,FeedbackQuestionAttributes question){
  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";
  FeedbackQuestionDetails questionDetails=question.getQuestionDetails();
  this.additionalInfoText=questionDetails.getQuestionAdditionalInfoHtml(question.questionNumber,"String_Node_Str");
  this.questionStatisticsTable=questionDetails.getQuestionResultStatisticsHtml(responses,question,data,data.bundle,"String_Node_Str");
}
Program: 62815
Project: 62815
Buggy source:
public ModerationsButton getModerationButton(){
  return moderationButton;
}

Fixed version (ground truth):
public ModerationButton getModerationButton(){
  return moderationButton;
}
Program: 62816
Project: 62816
Buggy source:
public InstructorResultsResponseRow(String giverDisplayableIdentifier,String giverTeam,String recipientDisplayableIdentifier,String recipientTeam,String displayableResponse,boolean isModerationsButtonShown,ModerationsButton moderationButton){
  this.giverDisplayableIdentifier=giverDisplayableIdentifier;
  this.giverTeam=giverTeam;
  this.recipientDisplayableIdentifier=recipientDisplayableIdentifier;
  this.recipientTeam=recipientTeam;
  this.displayableResponse=displayableResponse;
  this.isModerationsButtonShown=isModerationsButtonShown;
  this.moderationButton=moderationButton;
}

Fixed version (ground truth):
public InstructorResultsResponseRow(String giverDisplayableIdentifier,String giverTeam,String recipientDisplayableIdentifier,String recipientTeam,String displayableResponse,boolean isModerationsButtonShown,ModerationButton moderationButton){
  this.giverDisplayableIdentifier=giverDisplayableIdentifier;
  this.giverTeam=giverTeam;
  this.recipientDisplayableIdentifier=recipientDisplayableIdentifier;
  this.recipientTeam=recipientTeam;
  this.displayableResponse=displayableResponse;
  this.isModerationsButtonDisplayed=isModerationsButtonShown;
  this.moderationButton=moderationButton;
}
Program: 62817
Project: 62817
Buggy source:
public ModerationButton(boolean isAllowedToModerate,boolean isDisabled,int questionNumber,String giverIdentifier,String courseId,String feedbackSessionName,FeedbackQuestionAttributes question){
  this.isAllowedToModerate=isAllowedToModerate;
  this.isDisabled=isDisabled;
  this.questionNumber=questionNumber;
  this.giverIdentifier=question.giverType.isTeam() ? giverIdentifier.replace(Const.TEAM_OF_EMAIL_OWNER,"String_Node_Str") : giverIdentifier;
  this.courseId=courseId;
  this.feedbackSessionName=feedbackSessionName;
}

Fixed version (ground truth):
public ModerationButton(boolean isAllowedToModerate,boolean isDisabled,int questionNumber,String giverIdentifier,String courseId,String feedbackSessionName,FeedbackQuestionAttributes question){
  this.isAllowedToModerate=isAllowedToModerate;
  this.isDisabled=isDisabled;
  this.questionNumber=questionNumber;
  this.giverIdentifier=giverIdentifier;
  this.courseId=courseId;
  this.feedbackSessionName=feedbackSessionName;
}
Program: 62821
Project: 62821
Buggy source:
public void init(ArrayList<CourseDetailsBundle> allCourses,String courseIdToShowParam,String courseNameToShowParam){
  archivedCourses=extractArchivedCourses(allCourses);
  activeCourses=extractActiveCourses(allCourses);
  courseIdToShow=courseIdToShowParam;
  courseNameToShow=courseNameToShowParam;
}

Fixed version (ground truth):
public void init(ArrayList<CourseDetailsBundle> allCourses,String courseIdToShowParam,String courseNameToShowParam){
  activeCourses=extractActiveCourses(allCourses);
  archivedCourses=extractArchivedCourses(allCourses);
  courseIdToShow=courseIdToShowParam;
  courseNameToShow=courseNameToShowParam;
}
Program: 62824
Project: 62824
Buggy source:
public void testViewActionsLink(){
  ______TS("String_Node_Str");
  try {
    String expectedPersonInfo=logPage.getPersonInfoOfFirstEntry();
    logPage.clickViewActionsButtonOfFirstEntry();
    String actualPersonInfo=logPage.getFilterBoxString();
    assertEqualsIfQueryStringNotEmpty(expectedPersonInfo,actualPersonInfo);
  }
 catch (  NoSuchElementException emptylogs) {
  }
catch (  IndexOutOfBoundsException e) {
  }
}

Fixed version (ground truth):
public void testViewActionsLink(){
  ______TS("String_Node_Str");
  try {
    String expectedPersonInfo=logPage.getPersonInfoOfFirstEntry();
    logPage.clickViewActionsButtonOfFirstEntry();
    String actualPersonInfo=logPage.getFilterBoxString();
    assertEqualsIfQueryStringNotEmpty(expectedPersonInfo,actualPersonInfo);
  }
 catch (  NoSuchElementException emptylogs) {
  }
catch (  IndexOutOfBoundsException invisibletmtlogs) {
  }
}
Program: 62825
Project: 62825
Buggy source:
private void updateStudentSection(String currentSection,StudentAttributes student){
  try {
    if (isPreview) {
      System.out.println("String_Node_Str" + student.email + "String_Node_Str"+ currentSection);
      return;
    }
    PersistenceManager pm=Datastore.getPersistenceManager();
    Student studentEntity=getStudent(student.email,student.course,pm);
    updateStudentToBeInSection(studentEntity,currentSection);
    List<FeedbackResponse> responsesForStudent=getResponsesForStudent(student.email,pm);
    updateFeedbackResponsesToBeInSection(responsesForStudent,student,currentSection);
    pm.close();
  }
 catch (  InvalidParametersException|EntityDoesNotExistException e) {
    System.out.println("String_Node_Str" + student.email);
    e.printStackTrace();
    confirmToContinue();
  }
}

Fixed version (ground truth):
private void updateStudentSection(String currentSection,StudentAttributes student){
  try {
    if (isPreview) {
      System.out.println("String_Node_Str" + student.email + "String_Node_Str"+ currentSection);
      return;
    }
    PersistenceManager pm=Datastore.getPersistenceManager();
    Student studentEntity=getStudent(student.email,student.course,pm);
    updateStudentToBeInSection(studentEntity,currentSection);
    List<FeedbackResponse> responsesForStudent=getResponsesForStudent(student,pm);
    updateFeedbackResponsesToBeInSection(responsesForStudent,student,currentSection);
    pm.close();
  }
 catch (  InvalidParametersException|EntityDoesNotExistException e) {
    System.out.println("String_Node_Str" + student.email);
    e.printStackTrace();
    confirmToContinue();
  }
}
Program: 62826
Project: 62826
Buggy source:
private List<FeedbackResponse> getResponsesForStudent(String studentEmail,PersistenceManager pm){
  String q="String_Node_Str" + FeedbackResponse.class.getName() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  @SuppressWarnings("String_Node_Str") List<FeedbackResponse> responsesAsGiver=(List<FeedbackResponse>)pm.newQuery(q).execute(studentEmail);
  q="String_Node_Str" + FeedbackResponse.class.getName() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  @SuppressWarnings("String_Node_Str") List<FeedbackResponse> responsesAsReceiver=(List<FeedbackResponse>)Datastore.getPersistenceManager().newQuery(q).execute(studentEmail);
  List<FeedbackResponse> responses=new ArrayList<FeedbackResponse>();
  responses.addAll(responsesAsGiver);
  responses.addAll(responsesAsReceiver);
  return responses;
}

Fixed version (ground truth):
private List<FeedbackResponse> getResponsesForStudent(StudentAttributes student,PersistenceManager pm){
  String studentEmail=student.email;
  String studentTeam=student.team;
  String course=student.course;
  String q="String_Node_Str" + FeedbackResponse.class.getName() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  @SuppressWarnings("String_Node_Str") List<FeedbackResponse> responsesAsGiver=(List<FeedbackResponse>)pm.newQuery(q).execute(studentEmail,course);
  q="String_Node_Str" + FeedbackResponse.class.getName() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  @SuppressWarnings("String_Node_Str") List<FeedbackResponse> responsesAsReceiver=(List<FeedbackResponse>)Datastore.getPersistenceManager().newQuery(q).execute(studentEmail,studentTeam,course);
  List<FeedbackResponse> responses=new ArrayList<FeedbackResponse>();
  responses.addAll(responsesAsGiver);
  responses.addAll(responsesAsReceiver);
  return responses;
}
Program: 62827
Project: 62827
Buggy source:
public void addSectionsToCourse(String courseId){
  System.out.println("String_Node_Str" + courseId + "String_Node_Str");
  List<TeamDetailsBundle> teams;
  try {
    teams=logic.getTeamsForCourse(courseId);
  }
 catch (  EntityDoesNotExistException e1) {
    System.out.println("String_Node_Str" + courseId);
    e1.printStackTrace();
    return;
  }
  int numSections=1;
  String sectionPrefix="String_Node_Str";
  String currentSection=sectionPrefix + numSections;
  int currentSectionSize=0;
  for (  TeamDetailsBundle team : teams) {
    String teamName=team.name;
    List<StudentAttributes> students=logic.getStudentsForTeam(teamName,courseId);
    for (    StudentAttributes student : students) {
      updateStudentSection(currentSection,student);
      currentSectionSize=currentSectionSize + 1;
    }
    if (currentSectionSize >= numOfStudentsInSection) {
      numSections++;
      currentSection=sectionPrefix + numSections;
    }
  }
  System.out.println();
}

Fixed version (ground truth):
public void addSectionsToCourse(String courseId){
  System.out.println("String_Node_Str" + courseId + "String_Node_Str");
  List<TeamDetailsBundle> teams;
  try {
    teams=logic.getTeamsForCourse(courseId);
  }
 catch (  EntityDoesNotExistException e1) {
    System.out.println("String_Node_Str" + courseId);
    e1.printStackTrace();
    return;
  }
  int numSections=1;
  String sectionPrefix="String_Node_Str";
  String currentSection=sectionPrefix + numSections;
  int currentSectionSize=0;
  for (  TeamDetailsBundle team : teams) {
    String teamName=team.name;
    List<StudentAttributes> students=logic.getStudentsForTeam(teamName,courseId);
    for (    StudentAttributes student : students) {
      updateStudentSection(currentSection,student);
      currentSectionSize=currentSectionSize + 1;
    }
    if (currentSectionSize >= numOfStudentsInSection) {
      numSections++;
      currentSection=sectionPrefix + numSections;
      currentSectionSize=0;
    }
  }
  System.out.println();
}
Program: 62830
Project: 62830
Buggy source:
@Override protected ActionResult execute() throws EntityDoesNotExistException {
  String courseId=getRequestParamValue(Const.ParamsNames.COURSE_ID);
  Assumption.assertNotNull(courseId);
  String fsname=getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME);
  Assumption.assertNotNull(fsname);
  instructor=logic.getInstructorForGoogleId(courseId,account.googleId);
  new GateKeeper().verifyAccessible(instructor,logic.getCourse(courseId));
  CourseRoster roster=new CourseRoster(logic.getStudentsForCourse(courseId),logic.getInstructorsForCourse(courseId));
  data=new InstructorFeedbackResponseCommentsLoadPageData(account);
  data.feedbackResultBundles=getFeedbackResultBundles(courseId,fsname,roster);
  data.instructorEmail=instructor.email;
  data.currentInstructor=instructor;
  data.roster=roster;
  data.numberOfPendingComments=logic.getCommentsForSendingState(courseId,CommentSendingState.PENDING).size() + logic.getFeedbackResponseCommentsForSendingState(courseId,CommentSendingState.PENDING).size();
  return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESPONSE_COMMENTS_LOAD,data);
}

Fixed version (ground truth):
@Override protected ActionResult execute() throws EntityDoesNotExistException {
  String courseId=getRequestParamValue(Const.ParamsNames.COURSE_ID);
  Assumption.assertNotNull(courseId);
  String fsname=getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME);
  int fsindex=Integer.parseInt(getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_INDEX));
  Assumption.assertNotNull(fsname);
  instructor=logic.getInstructorForGoogleId(courseId,account.googleId);
  new GateKeeper().verifyAccessible(instructor,logic.getCourse(courseId));
  CourseRoster roster=new CourseRoster(logic.getStudentsForCourse(courseId),logic.getInstructorsForCourse(courseId));
  data=new InstructorFeedbackResponseCommentsLoadPageData(account);
  data.feedbackResultBundles=getFeedbackResultBundles(courseId,fsname,roster);
  data.instructorEmail=instructor.email;
  data.currentInstructor=instructor;
  data.roster=roster;
  data.feedbackSessionIndex=fsindex;
  data.numberOfPendingComments=logic.getCommentsForSendingState(courseId,CommentSendingState.PENDING).size() + logic.getFeedbackResponseCommentsForSendingState(courseId,CommentSendingState.PENDING).size();
  return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESPONSE_COMMENTS_LOAD,data);
}
Program: 62833
Project: 62833
Buggy source:
protected abstract RedirectResult createSpecificRedirectResult();

Fixed version (ground truth):
protected abstract RedirectResult createSpecificRedirectResult() throws EntityDoesNotExistException ;
Program: 62834
Project: 62834
Buggy source:
@Override protected RedirectResult createSpecificRedirectResult(){
  if (regkey == null) {
    return createRedirectResult(Const.ActionURIs.STUDENT_HOME_PAGE);
  }
 else {
    return createRedirectResult(Const.ActionURIs.STUDENT_FEEDBACK_SUBMISSION_EDIT_PAGE);
  }
}

Fixed version (ground truth):
@Override protected RedirectResult createSpecificRedirectResult() throws EntityDoesNotExistException {
  if (regkey == null) {
    return createRedirectResult(Const.ActionURIs.STUDENT_HOME_PAGE);
  }
 else {
    throw new EntityDoesNotExistException("String_Node_Str");
  }
}
Program: 62840
Project: 62840
Buggy source:
@Override public boolean isChangesRequiresResponseDeletion(FeedbackQuestionDetails newDetails){
  FeedbackRubricQuestionDetails newRubricDetails=(FeedbackRubricQuestionDetails)newDetails;
  if (this.numOfRubricChoices != newRubricDetails.numOfRubricChoices || this.rubricChoices.containsAll(newRubricDetails.rubricChoices) == false || newRubricDetails.rubricChoices.containsAll(this.rubricChoices) == false) {
    return true;
  }
  if (this.numOfRubricSubQuestions != newRubricDetails.numOfRubricSubQuestions || this.rubricSubQuestions.containsAll(newRubricDetails.rubricChoices) == false || newRubricDetails.rubricSubQuestions.containsAll(this.rubricSubQuestions) == false) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isChangesRequiresResponseDeletion(FeedbackQuestionDetails newDetails){
  FeedbackRubricQuestionDetails newRubricDetails=(FeedbackRubricQuestionDetails)newDetails;
  if (this.numOfRubricChoices != newRubricDetails.numOfRubricChoices || this.rubricChoices.containsAll(newRubricDetails.rubricChoices) == false || newRubricDetails.rubricChoices.containsAll(this.rubricChoices) == false) {
    return true;
  }
  if (this.numOfRubricSubQuestions != newRubricDetails.numOfRubricSubQuestions || this.rubricSubQuestions.containsAll(newRubricDetails.rubricSubQuestions) == false || newRubricDetails.rubricSubQuestions.containsAll(this.rubricSubQuestions) == false) {
    return true;
  }
  return false;
}
Program: 62841
Project: 62841
Buggy source:
/** 
 * For rubric questions, 1) Description size should be valid 2) At least 2 choices 3) At least 1 sub-question 4) Choices and sub-questions should not be empty
 */
@Override public List<String> validateQuestionDetails(){
  List<String> errors=new ArrayList<String>();
  if (!isValidDescriptionSize()) {
    errors.add(ERROR_RUBRIC_DESC_INVALID_SIZE);
  }
  if (this.numOfRubricChoices < MIN_NUM_OF_RUBRIC_CHOICES) {
    errors.add(ERROR_NOT_ENOUGH_RUBRIC_CHOICES + MIN_NUM_OF_RUBRIC_CHOICES);
  }
  if (this.numOfRubricChoices < MIN_NUM_OF_RUBRIC_SUB_QUESTIONS) {
    errors.add(ERROR_NOT_ENOUGH_RUBRIC_SUB_QUESTIONS + MIN_NUM_OF_RUBRIC_SUB_QUESTIONS);
  }
  for (  String choice : this.rubricChoices) {
    if (choice.trim().isEmpty()) {
      errors.add(ERROR_RUBRIC_EMPTY_CHOICE);
      break;
    }
  }
  for (  String subQn : this.rubricSubQuestions) {
    if (subQn.trim().isEmpty()) {
      errors.add(ERROR_RUBRIC_EMPTY_SUB_QUESTION);
      break;
    }
  }
  return errors;
}

Fixed version (ground truth):
/** 
 * For rubric questions, 1) Description size should be valid 2) At least 2 choices 3) At least 1 sub-question 4) Choices and sub-questions should not be empty
 */
@Override public List<String> validateQuestionDetails(){
  List<String> errors=new ArrayList<String>();
  if (!isValidDescriptionSize()) {
    errors.add(ERROR_RUBRIC_DESC_INVALID_SIZE);
  }
  if (this.numOfRubricChoices < MIN_NUM_OF_RUBRIC_CHOICES) {
    errors.add(ERROR_NOT_ENOUGH_RUBRIC_CHOICES + MIN_NUM_OF_RUBRIC_CHOICES);
  }
  if (this.numOfRubricSubQuestions < MIN_NUM_OF_RUBRIC_SUB_QUESTIONS) {
    errors.add(ERROR_NOT_ENOUGH_RUBRIC_SUB_QUESTIONS + MIN_NUM_OF_RUBRIC_SUB_QUESTIONS);
  }
  for (  String choice : this.rubricChoices) {
    if (choice.trim().isEmpty()) {
      errors.add(ERROR_RUBRIC_EMPTY_CHOICE);
      break;
    }
  }
  for (  String subQn : this.rubricSubQuestions) {
    if (subQn.trim().isEmpty()) {
      errors.add(ERROR_RUBRIC_EMPTY_SUB_QUESTION);
      break;
    }
  }
  return errors;
}
Program: 62843
Project: 62843
Buggy source:
public String getLastNameFromRoster(String email){
  StudentAttributes student=roster.getStudentForEmail(email);
  InstructorAttributes instructor=roster.getInstructorForEmail(email);
  if (student != null) {
    return student.lastName;
  }
 else   if (instructor != null) {
    return instructor.name;
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public String getLastNameFromRoster(String email){
  StudentAttributes student=roster.getStudentForEmail(email);
  InstructorAttributes instructor=roster.getInstructorForEmail(email);
  if (student != null) {
    return student.lastName;
  }
 else   if (instructor != null) {
    return instructor.name;
  }
  if (rosterTeamNameEmailTable.containsKey(email)) {
    return email;
  }
  if (email.contains(Const.TEAM_OF_EMAIL_OWNER)) {
    int index=email.indexOf(Const.TEAM_OF_EMAIL_OWNER);
    return getTeamNameFromRoster(email.substring(0,index));
  }
  return "String_Node_Str";
}
Program: 62844
Project: 62844
Buggy source:
public List<String> getPossibleRecipientsForTeam(FeedbackQuestionAttributes fqa,String team){
  FeedbackParticipantType recipienttype=fqa.recipientType;
  List<String> possibleRecipients=new ArrayList<String>();
switch (recipienttype) {
case TEAMS:
    possibleRecipients=getListOfTeams();
  break;
case OWN_TEAM:
possibleRecipients.add(team);
break;
case INSTRUCTORS:
possibleRecipients=getListOfInstructorEmails();
break;
case STUDENTS:
possibleRecipients=getListOfStudentEmailsSortedBySection();
break;
case SELF:
possibleRecipients.add(team);
break;
case OWN_TEAM_MEMBERS:
case OWN_TEAM_MEMBERS_INCLUDING_SELF:
if (rosterTeamNameEmailTable.containsKey(team)) {
Map<String,String> teamToEmails=rosterTeamNameEmailTable.get(team);
if (teamToEmails != null) {
possibleRecipients=new ArrayList<String>(teamToEmails.keySet());
}
}
case NONE:
default :
break;
}
return possibleRecipients;
}

Fixed version (ground truth):
public List<String> getPossibleRecipientsForTeam(FeedbackQuestionAttributes fqa,String team){
  FeedbackParticipantType recipienttype=fqa.recipientType;
  List<String> possibleRecipients=new ArrayList<String>();
switch (recipienttype) {
case TEAMS:
    possibleRecipients=getListOfTeams();
  possibleRecipients.remove(team);
possibleRecipients.remove("String_Node_Str");
break;
case OWN_TEAM:
possibleRecipients.add(team);
break;
case INSTRUCTORS:
possibleRecipients=getListOfInstructorEmails();
break;
case STUDENTS:
possibleRecipients=getListOfStudentEmailsSortedBySection();
break;
case SELF:
possibleRecipients.add(team);
break;
case OWN_TEAM_MEMBERS:
case OWN_TEAM_MEMBERS_INCLUDING_SELF:
if (rosterTeamNameEmailTable.containsKey(team)) {
Map<String,String> teamToEmails=rosterTeamNameEmailTable.get(team);
if (teamToEmails != null) {
possibleRecipients=new ArrayList<String>(teamToEmails.keySet());
}
}
case NONE:
default :
break;
}
return possibleRecipients;
}
Program: 62845
Project: 62845
Buggy source:
public String getNameFromRoster(String email){
  StudentAttributes student=roster.getStudentForEmail(email);
  InstructorAttributes instructor=roster.getInstructorForEmail(email);
  if (student != null) {
    return student.name;
  }
 else   if (instructor != null) {
    return instructor.name;
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public String getNameFromRoster(String email){
  StudentAttributes student=roster.getStudentForEmail(email);
  InstructorAttributes instructor=roster.getInstructorForEmail(email);
  if (student != null) {
    return student.name;
  }
 else   if (instructor != null) {
    return instructor.name;
  }
  if (rosterTeamNameEmailTable.containsKey(email)) {
    return email;
  }
  if (email.contains(Const.TEAM_OF_EMAIL_OWNER)) {
    int index=email.indexOf(Const.TEAM_OF_EMAIL_OWNER);
    return getTeamNameFromRoster(email.substring(0,index));
  }
  return "String_Node_Str";
}
Program: 62848
Project: 62848
Buggy source:
public void deleteDocument(StudentAttributes studentToDelete){
  if (studentToDelete.key == null) {
    StudentAttributes student=getStudentForEmail(studentToDelete.course,studentToDelete.email);
    deleteDocument(Const.SearchIndex.STUDENT,student.key);
  }
 else {
    deleteDocument(Const.SearchIndex.STUDENT,studentToDelete.key);
  }
}

Fixed version (ground truth):
public void deleteDocument(StudentAttributes studentToDelete){
  if (studentToDelete.key == null) {
    StudentAttributes student=getStudentForEmail(studentToDelete.course,studentToDelete.email);
    if (student != null) {
      deleteDocument(Const.SearchIndex.STUDENT,student.key);
    }
  }
 else {
    deleteDocument(Const.SearchIndex.STUDENT,studentToDelete.key);
  }
}
Program: 62853
Project: 62853
Buggy source:
/** 
 * This recovers a html-sanitized string to original encoding for appropriate display in files such as csv file <br> It restores encoding for < > \ / ' &  <br>
 * @param sanitized string 
 * @return recovered string  
 */
public static String recoverFromSanitizedText(String str){
  if (str == null) {
    return null;
  }
  return str.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
/** 
 * This recovers a set of html-sanitized string to original encoding for appropriate display in files such as csv file <br> It restores encoding for < > \ / ' &  <br>
 * @param sanitized string set
 * @return recovered string set
 */
public static Set<String> recoverFromSanitizedText(Set<String> textSet){
  Set<String> textSetTemp=new HashSet<String>();
  for (  String text : textSet) {
    textSetTemp.add(StringHelper.recoverFromSanitizedText(text));
  }
  return textSetTemp;
}
Program: 62854
Project: 62854
Buggy source:
public List<String> getRecipientOptionsForQuestion(String feedbackQuestionId,String currentlySelectedOption){
  ArrayList<String> result=new ArrayList<String>();
  if (this.bundle == null) {
    return null;
  }
  Map<String,String> emailNamePair=this.bundle.getSortedRecipientList(feedbackQuestionId);
  result.add("String_Node_Str" + (currentlySelectedOption == null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str");
  for (  Map.Entry<String,String> pair : emailNamePair.entrySet()) {
    result.add("String_Node_Str" + pair.getKey() + "String_Node_Str"+ (pair.getKey().equals(currentlySelectedOption) ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ sanitizeForHtml(pair.getValue())+ "String_Node_Str");
  }
  return result;
}

Fixed version (ground truth):
public List<String> getRecipientOptionsForQuestion(String feedbackQuestionId,String currentlySelectedOption){
  ArrayList<String> result=new ArrayList<String>();
  if (this.bundle == null) {
    return null;
  }
  Map<String,String> emailNamePair=this.bundle.getSortedRecipientList(feedbackQuestionId);
  result.add("String_Node_Str" + (currentlySelectedOption == null ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str");
  for (  Map.Entry<String,String> pair : emailNamePair.entrySet()) {
    result.add("String_Node_Str" + pair.getKey() + "String_Node_Str"+ (StringHelper.recoverFromSanitizedText(pair.getKey()).equals(currentlySelectedOption) ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ sanitizeForHtml(pair.getValue())+ "String_Node_Str");
  }
  return result;
}
Program: 62856
Project: 62856
Buggy source:
private Map<String,TeamEvalResult> getContribQnTeamEvalResult(FeedbackQuestionAttributes question){
  Map<String,TeamEvalResult> contribQnStats=contributionQuestionTeamEvalResults.get(question.getId());
  if (contribQnStats == null) {
    FeedbackContributionQuestionDetails fqcd=(FeedbackContributionQuestionDetails)question.getQuestionDetails();
    contribQnStats=fqcd.getTeamEvalResults(this,question);
  }
  return contribQnStats;
}

Fixed version (ground truth):
private Map<String,TeamEvalResult> getContribQnTeamEvalResult(FeedbackQuestionAttributes question){
  Map<String,TeamEvalResult> contribQnStats=contributionQuestionTeamEvalResults.get(question.getId());
  if (contribQnStats == null) {
    FeedbackContributionQuestionDetails fqcd=(FeedbackContributionQuestionDetails)question.getQuestionDetails();
    contribQnStats=fqcd.getTeamEvalResults(this,question);
    contributionQuestionTeamEvalResults.put(question.getId(),contribQnStats);
  }
  return contribQnStats;
}
Program: 62857
Project: 62857
Buggy source:
/** 
 * Used for instructor feedback results views.
 */
@SuppressWarnings("String_Node_Str") public String getResponseAnswerHtml(FeedbackResponseAttributes response,FeedbackQuestionAttributes question){
  FeedbackAbstractQuestionDetails questionDetails=question.getQuestionDetails();
  if (question.questionType == FeedbackQuestionType.CONTRIB) {
    Map<String,TeamEvalResult> teamResults=getContribQnTeamEvalResult(question);
    Map<String,StudentResultSummary> stats=getContribQnStudentResultSummary(question);
    FeedbackResponseAttributes actualResponse=getActualResponse(response);
    String giverTeamName=emailTeamNameTable.get(actualResponse.giverEmail);
    TeamEvalResult teamResult=teamResults.get(giverTeamName);
    int giverIndex=teamResult.studentEmails.indexOf(actualResponse.giverEmail);
    int recipientIndex=teamResult.studentEmails.indexOf(actualResponse.recipientEmail);
    String responseAnswerHtml=FeedbackContributionQuestionDetails.convertToEqualShareFormatHtml(teamResult.normalizedPeerContributionRatio[giverIndex][recipientIndex]);
    if (response.giverEmail.equals(response.recipientEmail)) {
      responseAnswerHtml=response.getResponseDetails().getAnswerHtml(questionDetails);
      StudentResultSummary studentResult=stats.get(response.giverEmail);
      if (studentResult != null) {
        int pc=studentResult.perceivedToInstructor;
        String pcHtml=((FeedbackContributionQuestionDetails)questionDetails).convertToEqualShareFormatHtml(pc);
        responseAnswerHtml+="String_Node_Str" + "String_Node_Str" + pcHtml + "String_Node_Str";
      }
    }
    return responseAnswerHtml;
  }
 else {
    return response.getResponseDetails().getAnswerHtml(questionDetails);
  }
}

Fixed version (ground truth):
/** 
 * Used for instructor feedback results views.
 */
public String getResponseAnswerHtml(FeedbackResponseAttributes response,FeedbackQuestionAttributes question){
  FeedbackAbstractQuestionDetails questionDetails=question.getQuestionDetails();
  if (question.questionType == FeedbackQuestionType.CONTRIB) {
    return getContributionQuestionResponseAnswerHtml(response,question,questionDetails);
  }
 else {
    return response.getResponseDetails().getAnswerHtml(questionDetails);
  }
}
Program: 62859
Project: 62859
Buggy source:
@Override public void send(HttpServletRequest req,HttpServletResponse resp) throws IOException {
  resp.setContentType("String_Node_Str");
  resp.setHeader("String_Node_Str","String_Node_Str" + fileName + "String_Node_Str");
  PrintWriter writer=resp.getWriter();
  writer.append(fileContent);
}

Fixed version (ground truth):
@Override public void send(HttpServletRequest req,HttpServletResponse resp) throws IOException {
  resp.setContentType("String_Node_Str");
  resp.setHeader("String_Node_Str","String_Node_Str" + fileName + "String_Node_Str");
  PrintWriter writer=resp.getWriter();
  writer.write("String_Node_Str");
  writer.append(fileContent);
}
Program: 62860
Project: 62860
Buggy source:
@Override public ActionResult execute() throws EntityDoesNotExistException {
  String courseId=getRequestParamValue(Const.ParamsNames.COURSE_ID);
  Assumption.assertNotNull(courseId);
  InstructorAttributes instructor=logic.getInstructorForGoogleId(courseId,account.googleId);
  new GateKeeper().verifyAccessible(instructor,logic.getCourse(courseId));
  InstructorCourseDetailsPageData data=new InstructorCourseDetailsPageData(account);
  data.currentInstructor=instructor;
  data.courseDetails=logic.getCourseDetails(courseId);
  data.students=logic.getStudentsForCourse(courseId);
  data.instructors=logic.getInstructorsForCourse(courseId);
  StudentAttributes.sortByNameAndThenByEmail(data.students);
  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);
  Assumption.assertNotNull(courseId);
  InstructorAttributes instructor=logic.getInstructorForGoogleId(courseId,account.googleId);
  new GateKeeper().verifyAccessible(instructor,logic.getCourse(courseId));
  InstructorCourseDetailsPageData data=new InstructorCourseDetailsPageData(account);
  data.currentInstructor=instructor;
  data.courseDetails=logic.getCourseDetails(courseId);
  data.students=logic.getStudentsForCourse(courseId);
  data.instructors=logic.getInstructorsForCourse(courseId);
  data.studentListHtmlTableAsString=logic.getCourseStudentListAsHtml(courseId,account.googleId);
  StudentAttributes.sortByNameAndThenByEmail(data.students);
  statusToAdmin="String_Node_Str" + "String_Node_Str" + courseId + "String_Node_Str";
  ShowPageResult response=createShowPageResult(Const.ViewURIs.INSTRUCTOR_COURSE_DETAILS,data);
  return response;
}
Program: 62861
Project: 62861
Buggy source:
@Override protected ActionResult execute() throws EntityDoesNotExistException {
  String courseId=getRequestParamValue(Const.ParamsNames.COURSE_ID);
  String fsname=getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME);
  instructor=logic.getInstructorForGoogleId(courseId,account.googleId);
  new GateKeeper().verifyAccessible(instructor,logic.getCourse(courseId));
  CourseRoster roster=new CourseRoster(logic.getStudentsForCourse(courseId),logic.getInstructorsForCourse(courseId));
  data=new InstructorFeedbackResponseCommentsLoadPageData(account);
  data.feedbackResultBundles=getFeedbackResultBundles(courseId,fsname,roster);
  data.instructorEmail=instructor.email;
  data.currentInstructor=instructor;
  data.roster=roster;
  data.numberOfPendingComments=logic.getCommentsForSendingState(courseId,CommentSendingState.PENDING).size() + logic.getFeedbackResponseCommentsForSendingState(courseId,CommentSendingState.PENDING).size();
  return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESPONSE_COMMENTS_LOAD,data);
}

Fixed version (ground truth):
@Override protected ActionResult execute() throws EntityDoesNotExistException {
  String courseId=getRequestParamValue(Const.ParamsNames.COURSE_ID);
  Assumption.assertNotNull(courseId);
  String fsname=getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME);
  Assumption.assertNotNull(fsname);
  instructor=logic.getInstructorForGoogleId(courseId,account.googleId);
  new GateKeeper().verifyAccessible(instructor,logic.getCourse(courseId));
  CourseRoster roster=new CourseRoster(logic.getStudentsForCourse(courseId),logic.getInstructorsForCourse(courseId));
  data=new InstructorFeedbackResponseCommentsLoadPageData(account);
  data.feedbackResultBundles=getFeedbackResultBundles(courseId,fsname,roster);
  data.instructorEmail=instructor.email;
  data.currentInstructor=instructor;
  data.roster=roster;
  data.numberOfPendingComments=logic.getCommentsForSendingState(courseId,CommentSendingState.PENDING).size() + logic.getFeedbackResponseCommentsForSendingState(courseId,CommentSendingState.PENDING).size();
  return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_RESPONSE_COMMENTS_LOAD,data);
}
Program: 62863
Project: 62863
Buggy source:
public InstructorCourseEditPageData(AccountAttributes account){
  super(account);
}

Fixed version (ground truth):
public InstructorCourseEditPageData(AccountAttributes account){
  super(account);
  index=-1;
}
Program: 62865
Project: 62865
Buggy source:
public List<FeedbackResponseCommentAttributes> getFeedbackResponseCommentsForSendingState(String courseId,CommentSendingState state) throws EntityDoesNotExistException {
  verifyIsCoursePresent(courseId);
  List<FeedbackResponseCommentAttributes> frcList=new ArrayList<FeedbackResponseCommentAttributes>();
  List<FeedbackSessionAttributes> feedbackSessions=fsLogic.getFeedbackSessionsForCourse(courseId);
  for (  FeedbackSessionAttributes fs : feedbackSessions) {
    if (fs.isPublished()) {
      frcList=frcDb.getFeedbackResponseCommentsForSendingState(courseId,fs.feedbackSessionName,state);
    }
  }
  return frcList;
}

Fixed version (ground truth):
public List<FeedbackResponseCommentAttributes> getFeedbackResponseCommentsForSendingState(String courseId,CommentSendingState state) throws EntityDoesNotExistException {
  verifyIsCoursePresent(courseId);
  List<FeedbackResponseCommentAttributes> frcList=new ArrayList<FeedbackResponseCommentAttributes>();
  List<FeedbackSessionAttributes> feedbackSessions=fsLogic.getFeedbackSessionsForCourse(courseId);
  for (  FeedbackSessionAttributes fs : feedbackSessions) {
    if (fs.isPublished()) {
      frcList.addAll(frcDb.getFeedbackResponseCommentsForSendingState(courseId,fs.feedbackSessionName,state));
    }
  }
  return frcList;
}
Program: 62868
Project: 62868
Buggy source:
/** 
 * Creates in the datastore a fresh copy of data in typicalDataBundle.json
 */
protected static void restoreTypicalDataInDatastore() throws Exception {
  BackDoorLogic backDoorLogic=new BackDoorLogic();
  DataBundle dataBundle=getTypicalDataBundle();
  backDoorLogic.persistDataBundle(dataBundle);
}

Fixed version (ground truth):
/** 
 * Creates in the datastore a fresh copy of data in typicalDataBundle.json
 */
protected static void restoreTypicalDataInDatastore() throws Exception {
  BackDoorLogic backDoorLogic=new BackDoorLogic();
  DataBundle dataBundle=getTypicalDataBundle();
  backDoorLogic.deleteExistingData(dataBundle);
  backDoorLogic.persistDataBundle(dataBundle);
}
Program: 62869
Project: 62869
Buggy source:
@Override public void sanitizeForSaving(){
  this.courseId=this.courseId.trim();
  this.feedbackSessionName=this.feedbackSessionName.trim();
  this.commentText=Sanitizer.sanitizeTextField(this.commentText);
  this.courseId=Sanitizer.sanitizeForHtml(courseId);
  this.feedbackSessionName=Sanitizer.sanitizeForHtml(feedbackSessionName);
  this.feedbackQuestionId=Sanitizer.sanitizeForHtml(feedbackQuestionId);
  this.giverEmail=Sanitizer.sanitizeForHtml(giverEmail);
  this.feedbackResponseId=Sanitizer.sanitizeForHtml(feedbackResponseId);
  if (commentText != null) {
    this.commentText=new Text(Sanitizer.sanitizeForHtml(commentText.getValue()));
  }
}

Fixed version (ground truth):
@Override public void sanitizeForSaving(){
  this.courseId=this.courseId.trim();
  this.feedbackSessionName=this.feedbackSessionName.trim();
  this.commentText=Sanitizer.sanitizeTextField(this.commentText);
  this.courseId=Sanitizer.sanitizeForHtml(courseId);
  this.feedbackSessionName=Sanitizer.sanitizeForHtml(feedbackSessionName);
  this.feedbackQuestionId=Sanitizer.sanitizeForHtml(feedbackQuestionId);
  this.giverEmail=Sanitizer.sanitizeForHtml(giverEmail);
  this.feedbackResponseId=Sanitizer.sanitizeForHtml(feedbackResponseId);
  if (commentText != null) {
    String sanitizedText=Sanitizer.sanitizeForHtml(commentText.getValue()).replace("String_Node_Str","String_Node_Str");
    this.commentText=new Text(sanitizedText);
  }
}
Program: 62871
Project: 62871
Buggy source:
public String getColorCode(Long timeTaken){
  String colorCode="String_Node_Str";
  if (timeTaken >= 10000 && timeTaken <= 20000) {
    colorCode="String_Node_Str";
  }
 else   if (timeTaken > 20000 && timeTaken <= 60000) {
    colorCode="String_Node_Str";
  }
  return colorCode;
}

Fixed version (ground truth):
public String getColorCode(Long timeTaken){
  if (timeTaken == null) {
    return "String_Node_Str";
  }
  String colorCode="String_Node_Str";
  if (timeTaken >= 10000 && timeTaken <= 20000) {
    colorCode="String_Node_Str";
  }
 else   if (timeTaken > 20000 && timeTaken <= 60000) {
    colorCode="String_Node_Str";
  }
  return colorCode;
}
Program: 62873
Project: 62873
Buggy source:
protected List<CourseDetailsBundle> loadCoursesList(String userId,HashMap<String,InstructorAttributes> instructors) throws EntityDoesNotExistException {
  HashMap<String,CourseDetailsBundle> summary=logic.getCourseSummariesForInstructor(userId);
  List<CourseDetailsBundle> courses=new ArrayList<CourseDetailsBundle>(summary.values());
  List<CourseDetailsBundle> allowedCourses=new ArrayList<CourseDetailsBundle>();
  for (  CourseDetailsBundle courseDetails : courses) {
    InstructorAttributes instructor=logic.getInstructorForGoogleId(courseDetails.course.id,account.googleId);
    instructors.put(courseDetails.course.id,instructor);
    if (instructor.isAllowedForPrivilege(Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION)) {
      allowedCourses.add(courseDetails);
    }
  }
  CourseDetailsBundle.sortDetailedCoursesByCourseId(allowedCourses);
  return allowedCourses;
}

Fixed version (ground truth):
protected List<CourseDetailsBundle> loadCoursesList(String userId,HashMap<String,InstructorAttributes> instructors) throws EntityDoesNotExistException {
  HashMap<String,CourseDetailsBundle> summary=logic.getCourseSummariesForInstructor(userId);
  List<CourseDetailsBundle> courses=new ArrayList<CourseDetailsBundle>(summary.values());
  for (  CourseDetailsBundle courseDetails : courses) {
    InstructorAttributes instructor=logic.getInstructorForGoogleId(courseDetails.course.id,account.googleId);
    instructors.put(courseDetails.course.id,instructor);
  }
  CourseDetailsBundle.sortDetailedCoursesByCourseId(courses);
  return courses;
}