Program: 50983
Project: 50983
Buggy source:
public static void main(String[] args){
  List<UGraph<String>> graphs=new ArrayList<UGraph<String>>();
  List<Double> labels=new ArrayList<Double>();
  createDataSet(ENZYMES_DIR,graphs,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);
  hubLists.add(unInformedDegreeHubs);
  hubLists.add(informedDegreeHubs);
  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};
  for (  int i : iterations) {
    resTable.newRow("String_Node_Str" + it);
    MoleculeGraphExperiment<UGraph<String>> exp=new MoleculeGraphExperiment<UGraph<String>>(new WLUSubTreeKernel(i,true),seeds,svmParms,graphs,labels,evalFuncs);
    System.out.println("String_Node_Str" + i);
    exp.run();
    for (    Result res : exp.getResults()) {
      resTable.addResult(res);
    }
  }
  System.out.println(resTable);
  MoleculeGraphExperiment<DTGraph<String,String>> exp;
  for (  int th : hubThs) {
    resTable.newRow("String_Node_Str" + th);
    for (    List<DTNode<String,String>> hubList : hubLists) {
      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);
      exp=new MoleculeGraphExperiment<DTGraph<String,String>>(new WLSubTreeKernel(it,true,forward),seeds,svmParms,GraphUtils.getSubGraphs(newG,newIN,depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      exp.run();
      for (      Result res : exp.getResults()) {
        resTable.addResult(res);
      }
      newIN=new ArrayList<DTNode<String,String>>(instanceNodes);
      newG=GraphUtils.simplifyGraph(sGraph,GraphUtils.createHubMap(hubList,th),newIN,true,false);
      exp=new MoleculeGraphExperiment<DTGraph<String,String>>(new WLSubTreeKernel(it,true,forward),seeds,svmParms,GraphUtils.getSubGraphs(newG,newIN,depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      exp.run();
      for (      Result res : exp.getResults()) {
        resTable.addResult(res);
      }
      newIN=new ArrayList<DTNode<String,String>>(instanceNodes);
      newG=GraphUtils.simplifyGraph(sGraph,GraphUtils.createHubMap(hubList,th),newIN,true,true);
      exp=new MoleculeGraphExperiment<DTGraph<String,String>>(new WLSubTreeKernel(it,true,forward),seeds,svmParms,GraphUtils.getSubGraphs(newG,newIN,depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      exp.run();
      for (      Result res : exp.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 main(String[] args){
  List<UGraph<String>> graphs=new ArrayList<UGraph<String>>();
  List<Double> labels=new ArrayList<Double>();
  createDataSet(MUTAG_DIR,graphs,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);
  hubLists.add(unInformedDegreeHubs);
  hubLists.add(informedDegreeHubs);
  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};
  for (  int i : iterations) {
    resTable.newRow("String_Node_Str" + i);
    MoleculeGraphExperiment<UGraph<String>> exp=new MoleculeGraphExperiment<UGraph<String>>(new WLUSubTreeKernel(i,true),seeds,svmParms,graphs,labels,evalFuncs);
    System.out.println("String_Node_Str" + i);
    exp.run();
    for (    Result res : exp.getResults()) {
      resTable.addResult(res);
    }
  }
  System.out.println(resTable);
  MoleculeGraphExperiment<DTGraph<String,String>> exp;
  for (  int th : hubThs) {
    resTable.newRow("String_Node_Str" + th);
    for (    List<DTNode<String,String>> hubList : hubLists) {
      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);
      exp=new MoleculeGraphExperiment<DTGraph<String,String>>(new WLSubTreeKernel(it,true,forward),seeds,svmParms,GraphUtils.getSubGraphs(newG,newIN,depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      exp.run();
      for (      Result res : exp.getResults()) {
        resTable.addResult(res);
      }
      newIN=new ArrayList<DTNode<String,String>>(instanceNodes);
      newG=GraphUtils.simplifyGraph(sGraph,GraphUtils.createHubMap(hubList,th),newIN,true,false);
      exp=new MoleculeGraphExperiment<DTGraph<String,String>>(new WLSubTreeKernel(it,true,forward),seeds,svmParms,GraphUtils.getSubGraphs(newG,newIN,depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      exp.run();
      for (      Result res : exp.getResults()) {
        resTable.addResult(res);
      }
      newIN=new ArrayList<DTNode<String,String>>(instanceNodes);
      newG=GraphUtils.simplifyGraph(sGraph,GraphUtils.createHubMap(hubList,th),newIN,true,true);
      exp=new MoleculeGraphExperiment<DTGraph<String,String>>(new WLSubTreeKernel(it,true,forward),seeds,svmParms,GraphUtils.getSubGraphs(newG,newIN,depth),target,evalFuncs);
      System.out.println("String_Node_Str" + th);
      exp.run();
      for (      Result res : exp.getResults()) {
        resTable.addResult(res);
      }
    }
    System.out.println(resTable);
  }
  resTable.addCompResults(resTable.getBestResults());
  System.out.println(resTable);
  System.out.println(resTable.allScoresToString());
}