Program: 50982
Project: 50982
Buggy source:
public static void experiment(boolean fullGraph){
  long[] seeds={11,21,31,41,51,61,71,81,91,101};
  double[] cs={0.0001,0.001,0.01,0.1,1,10,100,1000,10000};
  List<EvaluationFunction> evalFuncs=new ArrayList<EvaluationFunction>();
  evalFuncs.add(new Error());
  evalFuncs.add(new F1());
  List<Double> target=EvaluationUtils.createTarget(labels);
  LibSVMParameters svmParms=new LibSVMParameters(LibSVMParameters.C_SVC,cs);
  svmParms.setNumFolds(10);
  svmParms.setWeightLabels(EvaluationUtils.computeWeightLabels(target));
  svmParms.setWeights(EvaluationUtils.computeWeights(target));
  List<Statement> allStmts3=GraphUtils.getStatements4Depth(dataset,instances,4,false);
  List<Statement> allStmts4;
  if (fullGraph) {
    allStmts4=dataset.getStatements(null,null,null,false);
  }
 else {
    allStmts4=GraphUtils.getStatements4Depth(dataset,instances,5,false);
  }
  allStmts3.removeAll(blackList);
  allStmts4.removeAll(blackList);
  DTGraph<String,String> graph3=org.nodes.data.RDF.createDirectedGraph(allStmts3,null,null);
  DTGraph<String,String> graph4=org.nodes.data.RDF.createDirectedGraph(allStmts4,null,null);
  System.out.println("String_Node_Str" + graph3.nodes().size() + "String_Node_Str"+ graph4.nodes().size());
  List<DTNode<String,String>> instanceNodes3=new ArrayList<DTNode<String,String>>();
  List<DTNode<String,String>> instanceNodes4=new ArrayList<DTNode<String,String>>();
  for (  Resource i : instances) {
    instanceNodes3.add(graph3.node(i.toString()));
    instanceNodes4.add(graph4.node(i.toString()));
  }
  int maxHubs=1000;
  List<DTNode<String,String>> RDFTypeHubs=GraphUtils.getTypeHubs(graph4);
  Comparator<Node<String>> compRegDeg=new DegreeComparator<String>();
  MaxObserver<Node<String>> obsRegDeg=new MaxObserver<Node<String>>(maxHubs + instances.size(),compRegDeg);
  obsRegDeg.observe(graph4.nodes());
  List<DTNode<String,String>> regDegreeHubs=new ArrayList<DTNode<String,String>>();
  for (  Node<String> n : obsRegDeg.elements()) {
    regDegreeHubs.add((DTNode<String,String>)n);
  }
  Comparator<DTNode<String,String>> compSigDeg=new SlashBurn.SignatureComparator<String,String>();
  MaxObserver<DTNode<String,String>> obsSigDeg=new MaxObserver<DTNode<String,String>>(maxHubs + instances.size(),compSigDeg);
  obsSigDeg.observe(graph4.nodes());
  List<DTNode<String,String>> sigDegreeHubs=new ArrayList<DTNode<String,String>>(obsSigDeg.elements());
  List<Integer> classes=new ArrayList<Integer>();
  for (  double d : target) {
    classes.add((int)d);
  }
  Classified<DTNode<String,String>> classified=Classification.combine(instanceNodes4,classes);
  InformedAvoidance ia=new InformedAvoidance(graph4,classified,4);
  Comparator<DTNode<String,String>> compUnInformed=ia.uninformedComparator(4);
  MaxObserver<DTNode<String,String>> obsUnInformed=new MaxObserver<DTNode<String,String>>(maxHubs + instances.size(),compUnInformed);
  obsUnInformed.observe(graph4.nodes());
  List<DTNode<String,String>> unInformedDegreeHubs=new ArrayList<DTNode<String,String>>(obsUnInformed.elements());
  Iterator<DTNode<String,String>> ite=unInformedDegreeHubs.iterator();
  while (ite.hasNext())   if (!ia.viableHub(ite.next(),4,4))   ite.remove();
  Comparator<DTNode<String,String>> compInformed=ia.informedComparator(4);
  MaxObserver<DTNode<String,String>> obsInformed=new MaxObserver<DTNode<String,String>>(maxHubs + instances.size(),compInformed);
  obsInformed.observe(graph4.nodes());
  List<DTNode<String,String>> informedDegreeHubs=new ArrayList<DTNode<String,String>>(obsInformed.elements());
  ite=informedDegreeHubs.iterator();
  while (ite.hasNext())   if (!ia.viableHub(ite.next(),4,4))   ite.remove();
  List<DTNode<String,String>> rn=new ArrayList<DTNode<String,String>>();
  Set<String> is=new HashSet<String>();
  for (  Resource r : instances) {
    is.add(r.toString());
  }
  for (  DTNode<String,String> n : graph4.nodes()) {
    if (is.contains(n.label())) {
      rn.add(n);
    }
  }
  RDFTypeHubs.removeAll(rn);
  regDegreeHubs.removeAll(rn);
  sigDegreeHubs.removeAll(rn);
  unInformedDegreeHubs.removeAll(rn);
  informedDegreeHubs.removeAll(rn);
  List<List<DTNode<String,String>>> hubLists=new ArrayList<List<DTNode<String,String>>>();
  hubLists.add(RDFTypeHubs);
  hubLists.add(regDegreeHubs);
  hubLists.add(sigDegreeHubs);
  boolean forward=true;
  int[] it={0,2,4,6};
  int depth=3;
  int[] hubThs={0,1,2,3,4,5,10,20,30,40,50,100};
  ResultsTable resTableWL=new ResultsTable();
  resTableWL.setDigits(3);
  ResultsTable resTableIST=new ResultsTable();
  resTableIST.setDigits(3);
  MoleculeListMultiGraphExperiment<DTGraph<String,String>> expWL;
  MoleculeListSingleGraphExperiment expIST;
  for (  int th : hubThs) {
    resTableWL.newRow("String_Node_Str" + th);
    resTableIST.newRow("String_Node_Str" + th);
    for (    List<DTNode<String,String>> hubList : hubLists) {
      List<List<DTNode<String,String>>> newIN=new ArrayList<List<DTNode<String,String>>>();
      List<DTGraph<String,String>> newGs=GraphUtils.simplifyGraph3Way(graph3,GraphUtils.createHubMap(hubList,th),instanceNodes3,newIN);
      List<WLSubTreeKernel> kernelsWL=new ArrayList<WLSubTreeKernel>();
      for (      int iti : it) {
        kernelsWL.add(new WLSubTreeKernel(iti,true,forward));
      }
      expWL=new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,seeds,svmParms,GraphUtils.getSubGraphs(newGs.get(0),newIN.get(0),depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      expWL.run();
      for (      Result res : expWL.getResults()) {
        resTableWL.addResult(res);
      }
      kernelsWL=new ArrayList<WLSubTreeKernel>();
      for (      int iti : it) {
        kernelsWL.add(new WLSubTreeKernel(iti,true,forward));
      }
      expWL=new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,seeds,svmParms,GraphUtils.getSubGraphs(newGs.get(1),newIN.get(1),depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      expWL.run();
      for (      Result res : expWL.getResults()) {
        resTableWL.addResult(res);
      }
      kernelsWL=new ArrayList<WLSubTreeKernel>();
      for (      int iti : it) {
        kernelsWL.add(new WLSubTreeKernel(iti,true,forward));
      }
      expWL=new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,seeds,svmParms,GraphUtils.getSubGraphs(newGs.get(2),newIN.get(2),depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      expWL.run();
      for (      Result res : expWL.getResults()) {
        resTableWL.addResult(res);
      }
      List<RDFDTGraphIntersectionSubTreeKernel> kernelsIST=new ArrayList<RDFDTGraphIntersectionSubTreeKernel>();
      kernelsIST.add(new RDFDTGraphIntersectionSubTreeKernel(depth,1,true));
      expIST=new MoleculeListSingleGraphExperiment(kernelsIST,seeds,svmParms,newGs.get(0),newIN.get(0),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      expIST.run();
      for (      Result res : expIST.getResults()) {
        resTableIST.addResult(res);
      }
      kernelsIST=new ArrayList<RDFDTGraphIntersectionSubTreeKernel>();
      kernelsIST.add(new RDFDTGraphIntersectionSubTreeKernel(3,1,true));
      expIST=new MoleculeListSingleGraphExperiment(kernelsIST,seeds,svmParms,newGs.get(1),newIN.get(1),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      expIST.run();
      for (      Result res : expIST.getResults()) {
        resTableIST.addResult(res);
      }
      kernelsIST=new ArrayList<RDFDTGraphIntersectionSubTreeKernel>();
      kernelsIST.add(new RDFDTGraphIntersectionSubTreeKernel(3,1,true));
      expIST=new MoleculeListSingleGraphExperiment(kernelsIST,seeds,svmParms,newGs.get(2),newIN.get(2),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      expIST.run();
      for (      Result res : expIST.getResults()) {
        resTableIST.addResult(res);
      }
    }
    System.out.println(resTableWL);
    System.out.println(resTableIST);
  }
  resTableWL.addCompResults(resTableWL.getBestResults(resTableIST.getBestResults()));
  resTableIST.addCompResults(resTableIST.getBestResults(resTableWL.getBestResults()));
  System.out.println(resTableWL);
  System.out.println(resTableWL.allScoresToString());
  System.out.println(resTableIST);
  System.out.println(resTableIST.allScoresToString());
  saveResults(resTableWL.toString() + "String_Node_Str" + resTableIST.toString(),"String_Node_Str" + System.currentTimeMillis() + "String_Node_Str");
  saveResults(resTableWL.allScoresToString() + "String_Node_Str" + resTableIST.allScoresToString(),"String_Node_Str" + System.currentTimeMillis() + "String_Node_Str");
}

Fixed version (ground truth):
public static void experiment(boolean fullGraph){
  long[] seeds={11,21,31,41,51,61,71,81,91,101};
  double[] cs={0.0001,0.001,0.01,0.1,1,10,100,1000,10000};
  List<EvaluationFunction> evalFuncs=new ArrayList<EvaluationFunction>();
  evalFuncs.add(new Error());
  evalFuncs.add(new F1());
  List<Double> target=EvaluationUtils.createTarget(labels);
  LibSVMParameters svmParms=new LibSVMParameters(LibSVMParameters.C_SVC,cs);
  svmParms.setNumFolds(10);
  svmParms.setWeightLabels(EvaluationUtils.computeWeightLabels(target));
  svmParms.setWeights(EvaluationUtils.computeWeights(target));
  List<Statement> allStmts3=GraphUtils.getStatements4Depth(dataset,instances,4,false);
  List<Statement> allStmts4;
  if (fullGraph) {
    allStmts4=dataset.getStatements(null,null,null,false);
  }
 else {
    allStmts4=GraphUtils.getStatements4Depth(dataset,instances,5,false);
  }
  allStmts3.removeAll(blackList);
  allStmts4.removeAll(blackList);
  DTGraph<String,String> graph3=org.nodes.data.RDF.createDirectedGraph(allStmts3,null,null);
  DTGraph<String,String> graph4=org.nodes.data.RDF.createDirectedGraph(allStmts4,null,null);
  System.out.println("String_Node_Str" + graph3.nodes().size() + "String_Node_Str"+ graph4.nodes().size());
  List<DTNode<String,String>> instanceNodes3=new ArrayList<DTNode<String,String>>();
  List<DTNode<String,String>> instanceNodes4=new ArrayList<DTNode<String,String>>();
  for (  Resource i : instances) {
    instanceNodes3.add(graph3.node(i.toString()));
    instanceNodes4.add(graph4.node(i.toString()));
  }
  int maxHubs=1000;
  List<DTNode<String,String>> RDFTypeHubs=GraphUtils.getTypeHubs(graph4);
  Comparator<Node<String>> compRegDeg=new DegreeComparator<String>();
  MaxObserver<Node<String>> obsRegDeg=new MaxObserver<Node<String>>(maxHubs + instances.size(),compRegDeg);
  obsRegDeg.observe(graph4.nodes());
  List<DTNode<String,String>> regDegreeHubs=new ArrayList<DTNode<String,String>>();
  for (  Node<String> n : obsRegDeg.elements()) {
    regDegreeHubs.add((DTNode<String,String>)n);
  }
  Comparator<DTNode<String,String>> compSigDeg=new SlashBurn.SignatureComparator<String,String>();
  MaxObserver<DTNode<String,String>> obsSigDeg=new MaxObserver<DTNode<String,String>>(maxHubs + instances.size(),compSigDeg);
  obsSigDeg.observe(graph4.nodes());
  List<DTNode<String,String>> sigDegreeHubs=new ArrayList<DTNode<String,String>>(obsSigDeg.elements());
  List<Integer> classes=new ArrayList<Integer>();
  for (  double d : target) {
    classes.add((int)d);
  }
  Classified<DTNode<String,String>> classified=Classification.combine(instanceNodes4,classes);
  InformedAvoidance ia=new InformedAvoidance(graph4,classified,4);
  Comparator<DTNode<String,String>> compUnInformed=ia.uninformedComparator(4);
  MaxObserver<DTNode<String,String>> obsUnInformed=new MaxObserver<DTNode<String,String>>(maxHubs + instances.size(),compUnInformed);
  obsUnInformed.observe(graph4.nodes());
  List<DTNode<String,String>> unInformedDegreeHubs=new ArrayList<DTNode<String,String>>(obsUnInformed.elements());
  Iterator<DTNode<String,String>> ite=unInformedDegreeHubs.iterator();
  while (ite.hasNext())   if (!ia.viableHub(ite.next(),4,4))   ite.remove();
  Comparator<DTNode<String,String>> compInformed=ia.informedComparator(4);
  MaxObserver<DTNode<String,String>> obsInformed=new MaxObserver<DTNode<String,String>>(maxHubs + instances.size(),compInformed);
  obsInformed.observe(graph4.nodes());
  List<DTNode<String,String>> informedDegreeHubs=new ArrayList<DTNode<String,String>>(obsInformed.elements());
  ite=informedDegreeHubs.iterator();
  while (ite.hasNext())   if (!ia.viableHub(ite.next(),4,4))   ite.remove();
  List<DTNode<String,String>> rn=new ArrayList<DTNode<String,String>>();
  Set<String> is=new HashSet<String>();
  for (  Resource r : instances) {
    is.add(r.toString());
  }
  for (  DTNode<String,String> n : graph4.nodes()) {
    if (is.contains(n.label())) {
      rn.add(n);
    }
  }
  RDFTypeHubs.removeAll(rn);
  regDegreeHubs.removeAll(rn);
  sigDegreeHubs.removeAll(rn);
  unInformedDegreeHubs.removeAll(rn);
  informedDegreeHubs.removeAll(rn);
  List<List<DTNode<String,String>>> hubLists=new ArrayList<List<DTNode<String,String>>>();
  hubLists.add(RDFTypeHubs);
  hubLists.add(regDegreeHubs);
  hubLists.add(sigDegreeHubs);
  boolean forward=true;
  int[] it={0,2,4,6};
  int depth=3;
  int[] hubThs={0,1,2,3,4,5,10,20,30,40,50,100};
  ResultsTable resTableWL=new ResultsTable();
  resTableWL.setDigits(3);
  ResultsTable resTableIST=new ResultsTable();
  resTableIST.setDigits(3);
  MoleculeListMultiGraphExperiment<DTGraph<String,String>> expWL;
  MoleculeListSingleGraphExperiment expIST;
  for (  int th : hubThs) {
    resTableWL.newRow("String_Node_Str" + th);
    resTableIST.newRow("String_Node_Str" + th);
    for (    List<DTNode<String,String>> hubList : hubLists) {
      List<List<DTNode<String,String>>> newIN=new ArrayList<List<DTNode<String,String>>>();
      List<DTGraph<String,String>> newGs=GraphUtils.simplifyGraph3Way(graph3,GraphUtils.createHubMap(hubList,th),instanceNodes3,newIN);
      List<WLSubTreeKernel> kernelsWL=new ArrayList<WLSubTreeKernel>();
      for (      int iti : it) {
        kernelsWL.add(new WLSubTreeKernel(iti,true,forward));
      }
      expWL=new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,seeds,svmParms,GraphUtils.getSubGraphs(newGs.get(0),newIN.get(0),depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      expWL.run();
      for (      Result res : expWL.getResults()) {
        resTableWL.addResult(res);
      }
      kernelsWL=new ArrayList<WLSubTreeKernel>();
      for (      int iti : it) {
        kernelsWL.add(new WLSubTreeKernel(iti,true,forward));
      }
      expWL=new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,seeds,svmParms,GraphUtils.getSubGraphs(newGs.get(1),newIN.get(1),depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      expWL.run();
      for (      Result res : expWL.getResults()) {
        resTableWL.addResult(res);
      }
      kernelsWL=new ArrayList<WLSubTreeKernel>();
      for (      int iti : it) {
        kernelsWL.add(new WLSubTreeKernel(iti,true,forward));
      }
      expWL=new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,seeds,svmParms,GraphUtils.getSubGraphs(newGs.get(2),newIN.get(2),depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      expWL.run();
      for (      Result res : expWL.getResults()) {
        resTableWL.addResult(res);
      }
      List<RDFDTGraphIntersectionSubTreeKernel> kernelsIST=new ArrayList<RDFDTGraphIntersectionSubTreeKernel>();
      kernelsIST.add(new RDFDTGraphIntersectionSubTreeKernel(depth,1,true));
      expIST=new MoleculeListSingleGraphExperiment(kernelsIST,seeds,svmParms,newGs.get(0),newIN.get(0),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      expIST.run();
      for (      Result res : expIST.getResults()) {
        resTableIST.addResult(res);
      }
      kernelsIST=new ArrayList<RDFDTGraphIntersectionSubTreeKernel>();
      kernelsIST.add(new RDFDTGraphIntersectionSubTreeKernel(depth,1,true));
      expIST=new MoleculeListSingleGraphExperiment(kernelsIST,seeds,svmParms,newGs.get(1),newIN.get(1),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      expIST.run();
      for (      Result res : expIST.getResults()) {
        resTableIST.addResult(res);
      }
      kernelsIST=new ArrayList<RDFDTGraphIntersectionSubTreeKernel>();
      kernelsIST.add(new RDFDTGraphIntersectionSubTreeKernel(depth,1,true));
      expIST=new MoleculeListSingleGraphExperiment(kernelsIST,seeds,svmParms,newGs.get(2),newIN.get(2),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      expIST.run();
      for (      Result res : expIST.getResults()) {
        resTableIST.addResult(res);
      }
    }
    System.out.println(resTableWL);
    System.out.println(resTableIST);
  }
  resTableWL.addCompResults(resTableWL.getBestResults(resTableIST.getBestResults()));
  resTableIST.addCompResults(resTableIST.getBestResults(resTableWL.getBestResults()));
  System.out.println(resTableWL);
  System.out.println(resTableWL.allScoresToString());
  System.out.println(resTableIST);
  System.out.println(resTableIST.allScoresToString());
  saveResults(resTableWL.toString() + "String_Node_Str" + resTableIST.toString(),"String_Node_Str" + System.currentTimeMillis() + "String_Node_Str");
  saveResults(resTableWL.allScoresToString() + "String_Node_Str" + resTableIST.allScoresToString(),"String_Node_Str" + System.currentTimeMillis() + "String_Node_Str");
}