Program: 50978
Project: 50978
Buggy source:
public static void experiment(List<UGraph<String>> graphs,List<Double> labels){
  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);
  List<List<Statement>> rdfTriples2=createMoleculeRDFGraphs(graphs,false);
  RDFDataSet ts=new RDFSingleDataSet();
  for (  List<Statement> trips : rdfTriples2) {
    ts.addStatements(trips);
  }
  List<Resource> instances=new ArrayList<Resource>();
  List<Statement> stmts=ts.getStatementsFromStrings(null,RDF.TYPE.stringValue(),GraphUtils.NAMESPACE + "String_Node_Str");
  for (  Statement stmt : stmts) {
    instances.add(stmt.getSubject());
  }
  DTGraph<String,String> sGraph=org.nodes.data.RDF.createDirectedGraph(ts.getStatements(null,null,null,false),null,null);
  ResultsTable resTable=new ResultsTable();
  resTable.setDigits(3);
  List<DTNode<String,String>> instanceNodes=new ArrayList<DTNode<String,String>>();
  for (  Resource i : instances) {
    instanceNodes.add(sGraph.node(i.toString()));
  }
  int maxHubs=1000;
  List<DTNode<String,String>> RDFTypeHubs=GraphUtils.getTypeHubs(sGraph);
  Comparator<Node<String>> compRegDeg=new DegreeComparator<String>();
  MaxObserver<Node<String>> obsRegDeg=new MaxObserver<Node<String>>(maxHubs + instances.size(),compRegDeg);
  obsRegDeg.observe(sGraph.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(sGraph.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(instanceNodes,classes);
  InformedAvoidance ia=new InformedAvoidance(sGraph,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(sGraph.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(sGraph.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 : sGraph.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=6;
  int depth=3;
  int[] hubThs={0,1,2,3,4,5,6,7,8,9};
  int[] iterations={0,1,2,3,4,5,6};
  int[] iterations2={0,2,4,6,8,10,12};
  List<WLUSubTreeKernel> kernelsUWL=new ArrayList<WLUSubTreeKernel>();
  for (  int i : iterations) {
    kernelsUWL.add(new WLUSubTreeKernel(i,true));
  }
  MoleculeListMultiGraphExperiment<UGraph<String>> exp=new MoleculeListMultiGraphExperiment<UGraph<String>>(kernelsUWL,seeds,svmParms,graphs,labels,evalFuncs);
  System.out.println("String_Node_Str");
  exp.run();
  for (  Result res : exp.getResults()) {
    resTable.addResult(res);
  }
  System.out.println(resTable);
  MoleculeListMultiGraphExperiment<DTGraph<String,String>> exp2;
  for (  int th : hubThs) {
    resTable.newRow("String_Node_Str" + th);
    for (    List<DTNode<String,String>> hubList : hubLists) {
      List<WLSubTreeKernel> kernelsWL=new ArrayList<WLSubTreeKernel>();
      for (      int i : iterations2) {
        kernelsWL.add(new WLSubTreeKernel(i,true,forward));
      }
      List<DTNode<String,String>> newIN=new ArrayList<DTNode<String,String>>(instanceNodes);
      DTGraph<String,String> newG=GraphUtils.simplifyGraph(sGraph,GraphUtils.createHubMap(hubList,th),newIN,false,true);
      exp2=new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,seeds,svmParms,GraphUtils.getSubGraphs(newG,newIN,depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      exp2.run();
      for (      Result res : exp2.getResults()) {
        resTable.addResult(res);
      }
      kernelsWL=new ArrayList<WLSubTreeKernel>();
      for (      int i : iterations2) {
        kernelsWL.add(new WLSubTreeKernel(i,true,forward));
      }
      newIN=new ArrayList<DTNode<String,String>>(instanceNodes);
      newG=GraphUtils.simplifyGraph(sGraph,GraphUtils.createHubMap(hubList,th),newIN,true,false);
      exp2=new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,seeds,svmParms,GraphUtils.getSubGraphs(newG,newIN,depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      exp2.run();
      for (      Result res : exp2.getResults()) {
        resTable.addResult(res);
      }
      kernelsWL=new ArrayList<WLSubTreeKernel>();
      for (      int i : iterations2) {
        kernelsWL.add(new WLSubTreeKernel(i,true,forward));
      }
      newIN=new ArrayList<DTNode<String,String>>(instanceNodes);
      newG=GraphUtils.simplifyGraph(sGraph,GraphUtils.createHubMap(hubList,th),newIN,true,true);
      exp2=new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,seeds,svmParms,GraphUtils.getSubGraphs(newG,newIN,depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      exp2.run();
      for (      Result res : exp2.getResults()) {
        resTable.addResult(res);
      }
    }
    System.out.println(resTable);
  }
  resTable.addCompResults(resTable.getBestResults());
  System.out.println(resTable);
  System.out.println(resTable.allScoresToString());
}

Fixed version (ground truth):
public static void experiment(List<UGraph<String>> graphs,List<Double> labels){
  long[] seeds={11,21,31,41,51,61,71,81,91,101};
  double[] cs={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);
  List<List<Statement>> rdfTriples2=createMoleculeRDFGraphs(graphs,false);
  RDFDataSet ts=new RDFSingleDataSet();
  for (  List<Statement> trips : rdfTriples2) {
    ts.addStatements(trips);
  }
  List<Resource> instances=new ArrayList<Resource>();
  List<Statement> stmts=ts.getStatementsFromStrings(null,RDF.TYPE.stringValue(),GraphUtils.NAMESPACE + "String_Node_Str");
  for (  Statement stmt : stmts) {
    instances.add(stmt.getSubject());
  }
  DTGraph<String,String> sGraph=org.nodes.data.RDF.createDirectedGraph(ts.getStatements(null,null,null,false),null,null);
  ResultsTable resTable=new ResultsTable();
  resTable.setDigits(3);
  List<DTNode<String,String>> instanceNodes=new ArrayList<DTNode<String,String>>();
  for (  Resource i : instances) {
    instanceNodes.add(sGraph.node(i.toString()));
  }
  int maxHubs=1000;
  List<DTNode<String,String>> RDFTypeHubs=GraphUtils.getTypeHubs(sGraph);
  Comparator<Node<String>> compRegDeg=new DegreeComparator<String>();
  MaxObserver<Node<String>> obsRegDeg=new MaxObserver<Node<String>>(maxHubs + instances.size(),compRegDeg);
  obsRegDeg.observe(sGraph.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(sGraph.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(instanceNodes,classes);
  InformedAvoidance ia=new InformedAvoidance(sGraph,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(sGraph.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(sGraph.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 : sGraph.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=6;
  int depth=3;
  int[] hubThs={0,1,2,3,4,5,6,7,8,9};
  int[] iterations={1,2,3,4,5,6};
  int[] iterations2={0,2,4,6,8,10,12};
  List<WLUSubTreeKernel> kernelsUWL=new ArrayList<WLUSubTreeKernel>();
  for (  int i : iterations) {
    kernelsUWL.add(new WLUSubTreeKernel(i,true));
  }
  MoleculeListMultiGraphExperiment<UGraph<String>> exp=new MoleculeListMultiGraphExperiment<UGraph<String>>(kernelsUWL,seeds,svmParms,graphs,labels,evalFuncs);
  System.out.println("String_Node_Str");
  exp.run();
  resTable.newRow("String_Node_Str");
  for (  Result res : exp.getResults()) {
    resTable.addResult(res);
  }
  System.out.println(resTable);
  MoleculeListMultiGraphExperiment<DTGraph<String,String>> exp2;
  for (  int th : hubThs) {
    resTable.newRow("String_Node_Str" + th);
    for (    List<DTNode<String,String>> hubList : hubLists) {
      List<WLSubTreeKernel> kernelsWL=new ArrayList<WLSubTreeKernel>();
      for (      int i : iterations2) {
        kernelsWL.add(new WLSubTreeKernel(i,true,forward));
      }
      List<DTNode<String,String>> newIN=new ArrayList<DTNode<String,String>>(instanceNodes);
      DTGraph<String,String> newG=GraphUtils.simplifyGraph(sGraph,GraphUtils.createHubMap(hubList,th),newIN,false,true);
      exp2=new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,seeds,svmParms,GraphUtils.getSubGraphs(newG,newIN,depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      exp2.run();
      for (      Result res : exp2.getResults()) {
        resTable.addResult(res);
      }
      kernelsWL=new ArrayList<WLSubTreeKernel>();
      for (      int i : iterations2) {
        kernelsWL.add(new WLSubTreeKernel(i,true,forward));
      }
      newIN=new ArrayList<DTNode<String,String>>(instanceNodes);
      newG=GraphUtils.simplifyGraph(sGraph,GraphUtils.createHubMap(hubList,th),newIN,true,false);
      exp2=new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,seeds,svmParms,GraphUtils.getSubGraphs(newG,newIN,depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      exp2.run();
      for (      Result res : exp2.getResults()) {
        resTable.addResult(res);
      }
      kernelsWL=new ArrayList<WLSubTreeKernel>();
      for (      int i : iterations2) {
        kernelsWL.add(new WLSubTreeKernel(i,true,forward));
      }
      newIN=new ArrayList<DTNode<String,String>>(instanceNodes);
      newG=GraphUtils.simplifyGraph(sGraph,GraphUtils.createHubMap(hubList,th),newIN,true,true);
      exp2=new MoleculeListMultiGraphExperiment<DTGraph<String,String>>(kernelsWL,seeds,svmParms,GraphUtils.getSubGraphs(newG,newIN,depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      exp2.run();
      for (      Result res : exp2.getResults()) {
        resTable.addResult(res);
      }
    }
    System.out.println(resTable);
  }
  resTable.addCompResults(resTable.getBestResults());
  System.out.println(resTable);
  System.out.println(resTable.allScoresToString());
}