Program: 10047
Project: 10047
Buggy source:
private Set<ELDescriptionTree> attachSubtree(ELDescriptionTree tree,ELDescriptionNode v,int[] position){
  Set<ELDescriptionTree> refinements=new HashSet<ELDescriptionTree>();
  Description index;
  if (v.isRoot()) {
    index=Thing.instance;
  }
 else {
    index=opRanges.get(v.getParentEdge().getLabel());
  }
  SortedSet<ObjectProperty> appOPs=utility.computeApplicableObjectProperties(index);
  Set<ObjectProperty> mgr=utility.computeMgr(appOPs);
  for (  ObjectProperty op : mgr) {
    LinkedList<ELDescriptionEdge> m=new LinkedList<ELDescriptionEdge>();
    ELDescriptionTree topTree=new ELDescriptionTree(rs,Thing.instance);
    m.add(new ELDescriptionEdge(op,topTree.getRootNode()));
    while (!m.isEmpty()) {
      ELDescriptionEdge edge=m.pollFirst();
      ObjectProperty r=edge.getLabel();
      ELDescriptionTree tp=edge.getNode().getTree();
      ELDescriptionTree mergedTree=mergeTrees(tree,v,position,r,tp);
      if (mergedTree.isMinimal()) {
        refinements.add(mergedTree);
      }
 else {
        boolean check=asCheck(v);
        if (check) {
          for (          ObjectProperty subRole : rs.getSubProperties(r)) {
            m.add(new ELDescriptionEdge(subRole,tp.getRootNode()));
          }
          Set<ELDescriptionTree> recRefs=refine(tp);
          for (          ELDescriptionTree tpp : recRefs) {
            m.add(new ELDescriptionEdge(r,tpp.getRootNode()));
          }
        }
      }
    }
  }
  return refinements;
}

Fixed version (ground truth):
private Set<ELDescriptionTree> attachSubtree(ELDescriptionTree tree,ELDescriptionNode v,int[] position){
  Set<ELDescriptionTree> refinements=new HashSet<ELDescriptionTree>();
  Description index;
  if (v.isRoot()) {
    index=Thing.instance;
  }
 else {
    index=opRanges.get(v.getParentEdge().getLabel());
  }
  SortedSet<ObjectProperty> appOPs=utility.computeApplicableObjectProperties(index);
  Set<ObjectProperty> mgr=utility.computeMgr(appOPs);
  for (  ObjectProperty op : mgr) {
    System.out.println("String_Node_Str" + op);
    LinkedList<ELDescriptionEdge> m=new LinkedList<ELDescriptionEdge>();
    ELDescriptionTree topTree=new ELDescriptionTree(rs,Thing.instance);
    m.add(new ELDescriptionEdge(op,topTree.getRootNode()));
    while (!m.isEmpty()) {
      ELDescriptionEdge edge=m.pollFirst();
      System.out.println("String_Node_Str" + edge);
      ObjectProperty r=edge.getLabel();
      ELDescriptionTree tp=edge.getNode().getTree();
      ELDescriptionTree mergedTree=mergeTrees(tree,v,position,r,tp);
      ELDescriptionNode vClone=mergedTree.getNode(position);
      System.out.println("String_Node_Str" + mergedTree);
      if (mergedTree.isMinimal()) {
        System.out.println("String_Node_Str");
        refinements.add(mergedTree);
      }
 else {
        System.out.println("String_Node_Str");
        boolean check=asCheck(vClone);
        System.out.println("String_Node_Str" + check);
        if (check) {
          for (          ObjectProperty subRole : rs.getSubProperties(r)) {
            m.add(new ELDescriptionEdge(subRole,tp.getRootNode()));
          }
          System.out.println("String_Node_Str");
          Set<ELDescriptionTree> recRefs=refine(tp);
          System.out.println("String_Node_Str");
          for (          ELDescriptionTree tpp : recRefs) {
            m.add(new ELDescriptionEdge(r,tpp.getRootNode()));
          }
        }
      }
      System.out.println("String_Node_Str" + m);
    }
  }
  return refinements;
}