Program: 62820
Project: 62820
Buggy source:
private void buildNewForm(List<CourseAttributes> courses,String courseIdForNewSession,HashMap<String,InstructorAttributes> instructors,FeedbackSessionAttributes newFeedbackSession,String feedbackSessionType,String feedbackSessionNameForSessionList){
  newForm=new FeedbackSessionsNewForm();
  List<String> courseIds=new ArrayList<String>();
  for (  CourseAttributes course : courses) {
    courseIds.add(course.id);
  }
  newForm.setCourseIdForNewSession(courseIdForNewSession);
  newForm.setFsName(newFeedbackSession == null ? "String_Node_Str" : newFeedbackSession.feedbackSessionName);
  newForm.setCourses(courseIds);
  newForm.setCourseOptionsEmpty(courses.isEmpty());
  newForm.setFeedbackSessionTypeOptions(getFeedbackSessionTypeOptions(feedbackSessionType));
  newForm.setCoursesSelectField(getCourseIdOptions(courses,courseIdForNewSession,instructors,newFeedbackSession));
  newForm.setTimezoneSelectField(getTimeZoneOptionsAsHtml(newFeedbackSession));
  newForm.setInstructions(newFeedbackSession == null ? "String_Node_Str" : InstructorFeedbacksPageData.sanitizeForHtml(newFeedbackSession.instructions.getValue()));
  newForm.setFsStartDate(newFeedbackSession == null ? TimeHelper.formatDate(TimeHelper.getNextHour()) : TimeHelper.formatDate(newFeedbackSession.startTime));
  Date date;
  date=newFeedbackSession == null ? null : newFeedbackSession.startTime;
  newForm.setFsStartTimeOptions(getTimeOptionsAsElementTags(date));
  newForm.setFsEndDate(newFeedbackSession == null ? "String_Node_Str" : TimeHelper.formatDate(newFeedbackSession.endTime));
  date=newFeedbackSession == null ? null : newFeedbackSession.endTime;
  newForm.setFsEndTimeOptions(getTimeOptionsAsElementTags(date));
  newForm.setGracePeriodOptions(getGracePeriodOptionsAsElementTags(newFeedbackSession));
  boolean hasSessionVisibleDate=newFeedbackSession != null && !TimeHelper.isSpecialTime(newFeedbackSession.sessionVisibleFromTime);
  newForm.setSessionVisibleDateButtonChecked(hasSessionVisibleDate);
  newForm.setSessionVisibleDateValue(hasSessionVisibleDate ? TimeHelper.formatDate(newFeedbackSession.sessionVisibleFromTime) : "String_Node_Str");
  newForm.setSessionVisibleDateDisabled(!hasSessionVisibleDate);
  date=hasSessionVisibleDate ? newFeedbackSession.sessionVisibleFromTime : null;
  newForm.setSessionVisibleTimeOptions(getTimeOptionsAsElementTags(date));
  newForm.setSessionVisibleAtOpenChecked(newFeedbackSession == null || Const.TIME_REPRESENTS_FOLLOW_OPENING.equals(newFeedbackSession.sessionVisibleFromTime));
  newForm.setSessionVisiblePrivateChecked(newFeedbackSession != null && Const.TIME_REPRESENTS_NEVER.equals(newFeedbackSession.sessionVisibleFromTime));
  boolean hasResultVisibleDate=newFeedbackSession != null && !TimeHelper.isSpecialTime(newFeedbackSession.resultsVisibleFromTime);
  newForm.setResponseVisibleDateChecked(hasResultVisibleDate);
  newForm.setResponseVisibleDateValue(hasResultVisibleDate ? TimeHelper.formatDate(newFeedbackSession.resultsVisibleFromTime) : "String_Node_Str");
  newForm.setResponseVisibleDisabled(!hasResultVisibleDate);
  date=hasResultVisibleDate ? newFeedbackSession.resultsVisibleFromTime : null;
  newForm.setResponseVisibleTimeOptions(getTimeOptionsAsElementTags(date));
  newForm.setResponseVisibleImmediatelyChecked((newFeedbackSession != null && Const.TIME_REPRESENTS_FOLLOW_VISIBLE.equals(newFeedbackSession.resultsVisibleFromTime)));
  newForm.setResponseVisiblePublishManuallyChecked((newFeedbackSession == null || Const.TIME_REPRESENTS_LATER.equals(newFeedbackSession.resultsVisibleFromTime) || Const.TIME_REPRESENTS_NOW.equals(newFeedbackSession.resultsVisibleFromTime)));
  newForm.setResponseVisibleNeverChecked((newFeedbackSession != null && Const.TIME_REPRESENTS_NEVER.equals(newFeedbackSession.resultsVisibleFromTime)));
  newForm.setSubmitButtonDisabled(courses.isEmpty());
}

Fixed version (ground truth):
private void buildNewForm(List<CourseAttributes> courses,String courseIdForNewSession,HashMap<String,InstructorAttributes> instructors,FeedbackSessionAttributes newFeedbackSession,String feedbackSessionType,String feedbackSessionNameForSessionList){
  newForm=new FeedbackSessionsNewForm();
  List<String> courseIds=new ArrayList<String>();
  for (  CourseAttributes course : courses) {
    courseIds.add(course.id);
  }
  newForm.setCourseIdForNewSession(courseIdForNewSession);
  newForm.setFsName(newFeedbackSession == null ? "String_Node_Str" : newFeedbackSession.feedbackSessionName);
  newForm.setCourses(courseIds);
  newForm.setCourseOptionsEmpty(courses.isEmpty());
  newForm.setFeedbackSessionTypeOptions(getFeedbackSessionTypeOptions(feedbackSessionType));
  newForm.setFeedbackSessionNameForSessionList(feedbackSessionNameForSessionList);
  newForm.setCoursesSelectField(getCourseIdOptions(courses,courseIdForNewSession,instructors,newFeedbackSession));
  newForm.setTimezoneSelectField(getTimeZoneOptionsAsHtml(newFeedbackSession));
  newForm.setInstructions(newFeedbackSession == null ? "String_Node_Str" : InstructorFeedbacksPageData.sanitizeForHtml(newFeedbackSession.instructions.getValue()));
  newForm.setFsStartDate(newFeedbackSession == null ? TimeHelper.formatDate(TimeHelper.getNextHour()) : TimeHelper.formatDate(newFeedbackSession.startTime));
  Date date;
  date=newFeedbackSession == null ? null : newFeedbackSession.startTime;
  newForm.setFsStartTimeOptions(getTimeOptionsAsElementTags(date));
  newForm.setFsEndDate(newFeedbackSession == null ? "String_Node_Str" : TimeHelper.formatDate(newFeedbackSession.endTime));
  date=newFeedbackSession == null ? null : newFeedbackSession.endTime;
  newForm.setFsEndTimeOptions(getTimeOptionsAsElementTags(date));
  newForm.setGracePeriodOptions(getGracePeriodOptionsAsElementTags(newFeedbackSession));
  boolean hasSessionVisibleDate=newFeedbackSession != null && !TimeHelper.isSpecialTime(newFeedbackSession.sessionVisibleFromTime);
  newForm.setSessionVisibleDateButtonChecked(hasSessionVisibleDate);
  newForm.setSessionVisibleDateValue(hasSessionVisibleDate ? TimeHelper.formatDate(newFeedbackSession.sessionVisibleFromTime) : "String_Node_Str");
  newForm.setSessionVisibleDateDisabled(!hasSessionVisibleDate);
  date=hasSessionVisibleDate ? newFeedbackSession.sessionVisibleFromTime : null;
  newForm.setSessionVisibleTimeOptions(getTimeOptionsAsElementTags(date));
  newForm.setSessionVisibleAtOpenChecked(newFeedbackSession == null || Const.TIME_REPRESENTS_FOLLOW_OPENING.equals(newFeedbackSession.sessionVisibleFromTime));
  newForm.setSessionVisiblePrivateChecked(newFeedbackSession != null && Const.TIME_REPRESENTS_NEVER.equals(newFeedbackSession.sessionVisibleFromTime));
  boolean hasResultVisibleDate=newFeedbackSession != null && !TimeHelper.isSpecialTime(newFeedbackSession.resultsVisibleFromTime);
  newForm.setResponseVisibleDateChecked(hasResultVisibleDate);
  newForm.setResponseVisibleDateValue(hasResultVisibleDate ? TimeHelper.formatDate(newFeedbackSession.resultsVisibleFromTime) : "String_Node_Str");
  newForm.setResponseVisibleDisabled(!hasResultVisibleDate);
  date=hasResultVisibleDate ? newFeedbackSession.resultsVisibleFromTime : null;
  newForm.setResponseVisibleTimeOptions(getTimeOptionsAsElementTags(date));
  newForm.setResponseVisibleImmediatelyChecked((newFeedbackSession != null && Const.TIME_REPRESENTS_FOLLOW_VISIBLE.equals(newFeedbackSession.resultsVisibleFromTime)));
  newForm.setResponseVisiblePublishManuallyChecked((newFeedbackSession == null || Const.TIME_REPRESENTS_LATER.equals(newFeedbackSession.resultsVisibleFromTime) || Const.TIME_REPRESENTS_NOW.equals(newFeedbackSession.resultsVisibleFromTime)));
  newForm.setResponseVisibleNeverChecked((newFeedbackSession != null && Const.TIME_REPRESENTS_NEVER.equals(newFeedbackSession.resultsVisibleFromTime)));
  newForm.setSubmitButtonDisabled(courses.isEmpty());
}