Program: 98523
Project: 98523
Buggy source:
public List<CourseVoVwFull> getSearchResults(String query){
  CoursesFacade coursesFacade=facadeFactory.getCoursesFacade();
  Date beforeSearch=new Date();
  List<Long> search=coursesFacade.search(query);
  Date afterSearch=new Date();
  Config.getInstance().getServiceFactory().getLogService().info("String_Node_Str" + query + "String_Node_Str"+ String.valueOf(afterSearch.getTime() - beforeSearch.getTime()));
  ArrayList<CourseVoVwFull> results=new ArrayList<CourseVoVwFull>(search.size());
  HashMap<Long,ProfessorVoVwFull> professorsVo=new HashMap<Long,ProfessorVoVwFull>();
  HashMap<Long,SubjectVoVwSmall> subjectsVo=new HashMap<Long,SubjectVoVwSmall>();
  ProfessorVoVwFull professor;
  SubjectVoVwSmall subject;
  for (  Long courseId : search) {
    CourseVoFull course=coursesFacade.getCourse(courseId);
    Long professorId=course.getProfessorVo().getId();
    Long subjectId=course.getSubjectVo().getId();
    if (!professorsVo.containsKey(professorId)) {
      professorsVo.put(professorId,ProfessorVoVwBuilder.getInstance().getProfessorFull(professorId));
    }
    professor=professorsVo.get(professorId);
    if (subjectsVo.containsKey(subjectId)) {
      subject=subjectsVo.get(subjectId);
    }
 else {
      SubjectVoFull subjectFull=facadeFactory.getSubjectsFacade().getSubject(subjectId);
      subject=new SubjectVoVwSmall(subjectId,subjectFull.getVo().getName(),subjectFull.getVo().getCode(),subjectFull.getRatingSummary());
      subjectsVo.put(subjectId,subject);
    }
    results.add(new CourseVoVwFull(course.getVo(),subject,professor));
  }
  return results;
}

Fixed version (ground truth):
public List<CourseVoVwFull> getSearchResults(String query){
  CoursesFacade coursesFacade=facadeFactory.getCoursesFacade();
  Date beforeSearch=new Date();
  List<Long> search=coursesFacade.search(query);
  Date afterSearch=new Date();
  Config.getInstance().getServiceFactory().getLogService().info("String_Node_Str" + query + "String_Node_Str"+ String.valueOf(afterSearch.getTime() - beforeSearch.getTime()));
  ArrayList<CourseVoVwFull> results=new ArrayList<CourseVoVwFull>(search.size());
  HashMap<Long,ProfessorVoVwFull> professorsVo=new HashMap<Long,ProfessorVoVwFull>();
  HashMap<Long,SubjectVoVwSmall> subjectsVo=new HashMap<Long,SubjectVoVwSmall>();
  HashMap<Long,String> periods=new HashMap<Long,String>();
  ProfessorVoVwFull professor;
  SubjectVoVwSmall subject;
  for (  Long courseId : search) {
    CourseVoFull course=coursesFacade.getCourse(courseId);
    Long professorId=course.getProfessorVo().getId();
    Long subjectId=course.getSubjectVo().getId();
    String periodString=NO_PERIOD_STRING;
    if (!professorsVo.containsKey(professorId)) {
      professorsVo.put(professorId,ProfessorVoVwBuilder.getInstance().getProfessorFull(professorId));
    }
    professor=professorsVo.get(professorId);
    if (subjectsVo.containsKey(subjectId)) {
      subject=subjectsVo.get(subjectId);
    }
 else {
      SubjectVoFull subjectFull=facadeFactory.getSubjectsFacade().getSubject(subjectId);
      subject=new SubjectVoVwSmall(subjectId,subjectFull.getVo().getName(),subjectFull.getVo().getCode(),subjectFull.getRatingSummary());
      subjectsVo.put(subjectId,subject);
    }
    PeriodVo period=facadeFactory.getPeriodsFacade().getPeriod(course.getVo().getPeriodId());
    if (period != null) {
      if (!periods.containsKey(course.getVo().getPeriodId())) {
        periods.put(course.getVo().getPeriodId(),String.valueOf(period.getYear()) + "String_Node_Str" + String.valueOf(period.getSemester()));
      }
      periodString=periods.get(course.getVo().getPeriodId());
    }
    results.add(new CourseVoVwFull(course.getVo(),subject,professor,periodString));
  }
  return results;
}