Program: 70943
Project: 70943
Buggy source:
public static LinkedList<ModelComponent> findDependentComponents(List<ModelComponent> update,List<? extends ModelComponent> comps){
  ModelComponent acomp=findCommonAncestor(comps);
  if (acomp == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  CompositeComponent ancestor=nearestEncapsulatingAncestor(acomp);
  HashMap<ModelComponent,Dependencies> depMap=buildDependencyMap(ancestor);
  HashSet<ModelComponent> updateSet=new LinkedHashSet<ModelComponent>();
  LinkedList<ModelComponent> delete=new LinkedList<ModelComponent>();
  for (  ModelComponent c : comps) {
    recursivelyAddDependenices(delete,updateSet,c,depMap);
  }
  for (  ModelComponent c : delete) {
    c.setMarked(false);
  }
  update.addAll(updateSet);
  LinkedHashMap<ModelComponent,LinkedList<ModelComponent>> parentMap=new LinkedHashMap<ModelComponent,LinkedList<ModelComponent>>();
  ModelComponent currentParent=null;
  LinkedList<ModelComponent> listForParent=null;
  ModelComponent root=null;
  for (  ModelComponent c : delete) {
    ModelComponent parent=c.getParent();
    if (parent == null) {
      if (root == null) {
        root=c;
      }
 else       if (c != root) {
        throw new InternalErrorException("String_Node_Str" + getPathName(c) + "String_Node_Str"+ getPathName(root));
      }
    }
 else {
      if (parent != currentParent) {
        listForParent=parentMap.get(parent);
        if (listForParent == null) {
          listForParent=new LinkedList<ModelComponent>();
          parentMap.put(parent,listForParent);
        }
        currentParent=parent;
      }
      listForParent.add(c);
    }
  }
  delete.clear();
  if (root != null) {
    delete.add(root);
  }
  for (  LinkedList<ModelComponent> l : parentMap.values()) {
    delete.addAll(l);
  }
  return delete;
}

Fixed version (ground truth):
public static LinkedList<ModelComponent> findDependentComponents(List<ModelComponent> update,List<? extends ModelComponent> comps){
  ModelComponent acomp=findCommonAncestor(comps);
  if (acomp == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  CompositeComponent ancestor=farthestEncapsulatingAncestor(acomp);
  HashMap<ModelComponent,Dependencies> depMap=buildDependencyMap(ancestor);
  HashSet<ModelComponent> updateSet=new LinkedHashSet<ModelComponent>();
  LinkedList<ModelComponent> delete=new LinkedList<ModelComponent>();
  for (  ModelComponent c : comps) {
    recursivelyAddDependenices(delete,updateSet,c,depMap);
  }
  for (  ModelComponent c : delete) {
    c.setMarked(false);
  }
  update.addAll(updateSet);
  LinkedHashMap<ModelComponent,LinkedList<ModelComponent>> parentMap=new LinkedHashMap<ModelComponent,LinkedList<ModelComponent>>();
  ModelComponent currentParent=null;
  LinkedList<ModelComponent> listForParent=null;
  ModelComponent root=null;
  for (  ModelComponent c : delete) {
    ModelComponent parent=c.getParent();
    if (parent == null) {
      if (root == null) {
        root=c;
      }
 else       if (c != root) {
        throw new InternalErrorException("String_Node_Str" + getPathName(c) + "String_Node_Str"+ getPathName(root));
      }
    }
 else {
      if (parent != currentParent) {
        listForParent=parentMap.get(parent);
        if (listForParent == null) {
          listForParent=new LinkedList<ModelComponent>();
          parentMap.put(parent,listForParent);
        }
        currentParent=parent;
      }
      listForParent.add(c);
    }
  }
  delete.clear();
  if (root != null) {
    delete.add(root);
  }
  for (  LinkedList<ModelComponent> l : parentMap.values()) {
    delete.addAll(l);
  }
  return delete;
}