Program: 84621
Project: 84621
Buggy source:
private void backtrack(long startTime,List<Lecture> initialLectures,List<Lecture> resolvedLectures,HashMap<Lecture,Placement> conflictsToResolve,int depth){
  int nrUnassigned=conflictsToResolve.size();
  if ((initialLectures == null || initialLectures.isEmpty()) && nrUnassigned == 0) {
    if (iSolution.getModel().assignedVariables().size() > iNrAssigned || (iSolution.getModel().assignedVariables().size() == iNrAssigned && iValue > iCmp.currentValue(iSolution))) {
      if (iSuggestionNeighbour == null || iSuggestionNeighbour.compareTo(iSolution) >= 0)       iSuggestionNeighbour=new SuggestionNeighbour(resolvedLectures);
    }
    return;
  }
  if (depth <= 0)   return;
  if (iSuggestionTimeout > 0 && JProf.currentTimeMillis() - startTime > iSuggestionTimeout) {
    return;
  }
  for (  Lecture lecture : initialLectures != null && !initialLectures.isEmpty() ? initialLectures : new ArrayList<Lecture>(conflictsToResolve.keySet())) {
    if (resolvedLectures.contains(lecture))     continue;
    resolvedLectures.add(lecture);
    for (    Placement placement : lecture.values()) {
      if (placement.equals(lecture.getAssignment()))       continue;
      if (placement.isHard())       continue;
      Set<Placement> conflicts=iSolution.getModel().conflictValues(placement);
      if (conflicts != null && (nrUnassigned + conflicts.size() > depth))       continue;
      if (conflicts != null && conflicts.contains(placement))       continue;
      if (containsCommited(conflicts))       continue;
      boolean containException=false;
      if (conflicts != null) {
        for (Iterator<Placement> i=conflicts.iterator(); !containException && i.hasNext(); ) {
          Placement c=i.next();
          if (resolvedLectures.contains((c.variable()).getClassId()))           containException=true;
        }
      }
      if (containException)       continue;
      Placement cur=lecture.getAssignment();
      if (conflicts != null) {
        for (Iterator<Placement> i=conflicts.iterator(); !containException && i.hasNext(); ) {
          Placement c=i.next();
          c.variable().unassign(0);
        }
      }
      if (cur != null)       cur.variable().unassign(0);
      for (Iterator<Placement> i=conflicts.iterator(); !containException && i.hasNext(); ) {
        Placement c=i.next();
        conflictsToResolve.put(c.variable(),c);
      }
      Placement resolvedConf=conflictsToResolve.remove(lecture);
      backtrack(startTime,null,resolvedLectures,conflictsToResolve,depth - 1);
      if (cur == null)       lecture.unassign(0);
 else       lecture.assign(0,cur);
      for (Iterator<Placement> i=conflicts.iterator(); i.hasNext(); ) {
        Placement p=i.next();
        p.variable().assign(0,p);
        conflictsToResolve.remove(p.variable());
      }
      if (resolvedConf != null)       conflictsToResolve.put(lecture,resolvedConf);
    }
    resolvedLectures.remove(lecture);
  }
}

Fixed version (ground truth):
private void backtrack(long startTime,List<Lecture> initialLectures,List<Lecture> resolvedLectures,HashMap<Lecture,Placement> conflictsToResolve,int depth){
  int nrUnassigned=conflictsToResolve.size();
  if ((initialLectures == null || initialLectures.isEmpty()) && nrUnassigned == 0) {
    if (iSolution.getModel().assignedVariables().size() > iNrAssigned || (iSolution.getModel().assignedVariables().size() == iNrAssigned && iValue > iCmp.currentValue(iSolution))) {
      if (iSuggestionNeighbour == null || iSuggestionNeighbour.compareTo(iSolution) >= 0)       iSuggestionNeighbour=new SuggestionNeighbour(resolvedLectures);
    }
    return;
  }
  if (depth <= 0)   return;
  if (iSuggestionTimeout > 0 && JProf.currentTimeMillis() - startTime > iSuggestionTimeout) {
    return;
  }
  for (  Lecture lecture : initialLectures != null && !initialLectures.isEmpty() ? initialLectures : new ArrayList<Lecture>(conflictsToResolve.keySet())) {
    if (resolvedLectures.contains(lecture))     continue;
    resolvedLectures.add(lecture);
    placements:     for (    Placement placement : lecture.values()) {
      if (placement.equals(lecture.getAssignment()))       continue;
      if (placement.isHard())       continue;
      Set<Placement> conflicts=iSolution.getModel().conflictValues(placement);
      if (nrUnassigned + conflicts.size() > depth)       continue;
      if (conflicts.contains(placement))       continue;
      if (containsCommited(conflicts))       continue;
      for (Iterator<Placement> i=conflicts.iterator(); i.hasNext(); ) {
        Placement c=i.next();
        if (resolvedLectures.contains(c.variable()))         continue placements;
      }
      Placement cur=lecture.getAssignment();
      for (Iterator<Placement> i=conflicts.iterator(); i.hasNext(); ) {
        Placement c=i.next();
        c.variable().unassign(0);
      }
      if (cur != null)       lecture.unassign(0);
      lecture.assign(0,placement);
      for (Iterator<Placement> i=conflicts.iterator(); i.hasNext(); ) {
        Placement c=i.next();
        conflictsToResolve.put(c.variable(),c);
      }
      Placement resolvedConf=conflictsToResolve.remove(lecture);
      backtrack(startTime,null,resolvedLectures,conflictsToResolve,depth - 1);
      if (cur == null)       lecture.unassign(0);
 else       lecture.assign(0,cur);
      for (Iterator<Placement> i=conflicts.iterator(); i.hasNext(); ) {
        Placement p=i.next();
        p.variable().assign(0,p);
        conflictsToResolve.remove(p.variable());
      }
      if (resolvedConf != null)       conflictsToResolve.put(lecture,resolvedConf);
    }
    resolvedLectures.remove(lecture);
  }
}