Program: 39865
Project: 39865
Buggy source:
@Override public Graph transform(Graph graph){
  Node root=selectRoot(graph,rootSelector);
  Node tempNodeFromList;
  int[] edges;
  Node[] nodes=graph.getNodes();
  int depth;
  LinkedList<Node> todoList=new LinkedList<Node>();
  LinkedList<Integer> handledNodes=new LinkedList<Integer>();
  LinkedList<Integer> linkedNodes=new LinkedList<Integer>();
  HashMap<Integer,ParentChild> parentChildMap=new HashMap<Integer,ParentChild>();
  todoList.add(root);
  linkedNodes.add(root.getIndex());
  while (!todoList.isEmpty()) {
    tempNodeFromList=todoList.pop();
    if (handledNodes.contains(tempNodeFromList.getIndex())) {
      continue;
    }
    ParentChild parent=parentChildMap.get(tempNodeFromList.getIndex());
    if (parent == null) {
      depth=0;
    }
 else {
      depth=parent.getDepth();
    }
    edges=tempNodeFromList.getOutgoingEdges();
    for (    int e : edges) {
      if (!linkedNodes.contains(e)) {
        todoList.add(nodes[e]);
        linkedNodes.add(e);
        parentChildMap.put(e,new ParentChild(tempNodeFromList.getIndex(),e,depth + 1));
      }
    }
    handledNodes.add(tempNodeFromList.getIndex());
  }
  int graphNodeSize=graph.getNodes().length;
  int spanningTreeSize=parentChildMap.size() + 1;
  if (spanningTreeSize < graphNodeSize) {
    throw new RuntimeException("String_Node_Str" + graphNodeSize + "String_Node_Str"+ spanningTreeSize+ "String_Node_Str");
  }
  ArrayList<ParentChild> parentChildList=new ArrayList<ParentChild>();
  parentChildList.addAll(parentChildMap.values());
  SpanningTree result=new SpanningTree(graph,parentChildList);
  graph.addProperty("String_Node_Str",result);
  return graph;
}

Fixed version (ground truth):
@Override public Graph transform(Graph graph){
  Node root=selectRoot(graph,rootSelector);
  Node tempNodeFromList;
  int[] edges;
  Node[] nodes=graph.getNodes();
  int depth;
  LinkedList<Node> todoList=new LinkedList<Node>();
  LinkedList<Integer> handledNodes=new LinkedList<Integer>();
  LinkedList<Integer> linkedNodes=new LinkedList<Integer>();
  HashMap<Integer,ParentChild> parentChildMap=new HashMap<Integer,ParentChild>();
  todoList.add(root);
  linkedNodes.add(root.getIndex());
  while (!todoList.isEmpty()) {
    tempNodeFromList=todoList.pop();
    if (handledNodes.contains(tempNodeFromList.getIndex())) {
      continue;
    }
    ParentChild parent=parentChildMap.get(tempNodeFromList.getIndex());
    if (parent == null) {
      depth=1;
    }
 else {
      depth=parent.getDepth() + 1;
    }
    edges=tempNodeFromList.getOutgoingEdges();
    for (    int e : edges) {
      if (!linkedNodes.contains(e)) {
        todoList.add(nodes[e]);
        linkedNodes.add(e);
        parentChildMap.put(e,new ParentChild(tempNodeFromList.getIndex(),e,depth));
      }
    }
    handledNodes.add(tempNodeFromList.getIndex());
  }
  int graphNodeSize=graph.getNodes().length;
  int spanningTreeSize=parentChildMap.size() + 1;
  if (spanningTreeSize < graphNodeSize) {
    throw new RuntimeException("String_Node_Str" + graphNodeSize + "String_Node_Str"+ spanningTreeSize+ "String_Node_Str");
  }
  ArrayList<ParentChild> parentChildList=new ArrayList<ParentChild>();
  parentChildList.addAll(parentChildMap.values());
  SpanningTree result=new SpanningTree(graph,parentChildList);
  graph.addProperty("String_Node_Str",result);
  return graph;
}