Program: 58894
Project: 58894
Buggy source:
private void treeStructureToTree(ClusterNode node,Node[] treeStructure,int index){
  ClusterNode left=null;
  ClusterNode right=null;
  if (treeStructure[index].getLeft() >= 0) {
    String NodeName=IDMappingHelper.get().getRefSeqStringFromStorageIndex(treeStructure[index].getLeft());
    left=new ClusterNode(NodeName,treeStructure[index].getLeft(),0,0);
    left.setNrElements(1);
    tree.addChild(node,left);
  }
 else {
    left=new ClusterNode("String_Node_Str" + (-(treeStructure[index].getLeft()) - 1),-(treeStructure[index].getLeft()) - 1,treeStructure[index].getCorrelation(),0);
    tree.addChild(node,left);
    treeStructureToTree(left,treeStructure,-(treeStructure[index].getLeft()) - 1);
  }
  if (treeStructure[index].getRight() >= 0) {
    String NodeName=IDMappingHelper.get().getRefSeqStringFromStorageIndex(treeStructure[index].getRight());
    right=new ClusterNode(NodeName,treeStructure[index].getRight(),0,0);
    right.setNrElements(1);
    tree.addChild(node,right);
  }
 else {
    right=new ClusterNode("String_Node_Str" + (-(treeStructure[index].getRight()) - 1),-(treeStructure[index].getRight()) - 1,treeStructure[index].getCorrelation(),0);
    tree.addChild(node,right);
    treeStructureToTree(right,treeStructure,-(treeStructure[index].getRight()) - 1);
  }
}

Fixed version (ground truth):
private void treeStructureToTree(ClusterNode node,Node[] treeStructure,int index){
  ClusterNode left=null;
  ClusterNode right=null;
  if (treeStructure[index].getLeft() >= 0) {
    String NodeName;
    NodeName=IDMappingHelper.get().getShortNameFromDavid(treeStructure[index].getLeft() + 1);
    if (NodeName == null) {
      NodeName="String_Node_Str";
    }
    NodeName+="String_Node_Str";
    NodeName+=IDMappingHelper.get().getRefSeqStringFromStorageIndex(treeStructure[index].getLeft() + 1);
    left=new ClusterNode(NodeName,treeStructure[index].getLeft(),treeStructure[index].getCorrelation(),0);
    left.setNrElements(1);
    tree.addChild(node,left);
  }
 else {
    int random=(int)((Math.random() * Integer.MAX_VALUE) + 1);
    left=new ClusterNode("String_Node_Str" + (-(treeStructure[index].getLeft()) - 1),random,treeStructure[index].getCorrelation(),0);
    tree.addChild(node,left);
    treeStructureToTree(left,treeStructure,-(treeStructure[index].getLeft()) - 1);
  }
  if (treeStructure[index].getRight() >= 0) {
    String NodeName;
    NodeName=IDMappingHelper.get().getShortNameFromDavid(treeStructure[index].getRight() + 1);
    if (NodeName == null) {
      NodeName="String_Node_Str";
    }
    NodeName+="String_Node_Str";
    NodeName+=IDMappingHelper.get().getRefSeqStringFromStorageIndex(treeStructure[index].getRight() + 1);
    right=new ClusterNode(NodeName,treeStructure[index].getRight(),treeStructure[index].getCorrelation(),0);
    right.setNrElements(1);
    tree.addChild(node,right);
  }
 else {
    int random=(int)((Math.random() * Integer.MAX_VALUE) + 1);
    right=new ClusterNode("String_Node_Str" + (-(treeStructure[index].getRight()) - 1),random,treeStructure[index].getCorrelation(),0);
    tree.addChild(node,right);
    treeStructureToTree(right,treeStructure,-(treeStructure[index].getRight()) - 1);
  }
}