Program: 51063
Project: 51063
Buggy source:
@Override public void run(){
  double acc=0, f=0;
  double p5=0, p10=0, p20=0;
  double map=0, rPrec=0;
  List<String> labels;
  for (int i=0; i < seeds.length; i++) {
    createRandomSubSet(200,200,seeds[i]);
    double[][] matrixA=kernelA.compute(trainGraphsA);
    double[][] matrixB=kernelB.compute(trainGraphsB);
    double[][] testMatrixA=kernelA.compute(trainGraphsA,testGraphsA);
    double[][] testMatrixB=kernelB.compute(trainGraphsB,testGraphsB);
    double[][] matrix=combineTrainKernels(matrixA,matrixB);
    Collections.shuffle(trainSet,new Random(seeds[i]));
    labels=new ArrayList<String>();
    for (    Pair<DirectedMultigraphWithRoot<Vertex<String>,Edge<String>>> pair : trainSet) {
      if (dataSet.getLabels().get(pair)) {
        labels.add("String_Node_Str");
      }
 else {
        labels.add("String_Node_Str");
      }
    }
    Map<String,Integer> labelMap=new TreeMap<String,Integer>();
    labelMap.put("String_Node_Str",1);
    labelMap.put("String_Node_Str",-1);
    LibSVMModel model=LibSVM.trainSVMModel(matrix,LibSVM.createTargets(labels,labelMap),new LibSVMParameters(cs));
    double[][] testMatrix=combineTestKernels(testMatrixA,testMatrixB);
    labels=new ArrayList<String>();
    for (    Pair<DirectedMultigraphWithRoot<Vertex<String>,Edge<String>>> pair : testSet) {
      if (dataSet.getLabels().get(pair)) {
        labels.add("String_Node_Str");
      }
 else {
        labels.add("String_Node_Str");
      }
    }
    LibSVMPrediction[] pred=LibSVM.testSVMModel(model,testMatrix);
    double[] target=LibSVM.createTargets(labels,labelMap);
    acc+=LibSVM.computeAccuracy(target,LibSVM.extractLabels(pred));
    f+=LibSVM.computeF1(target,LibSVM.extractLabels(pred));
    p5+=LibSVM.computePrecisionAt(target,LibSVM.computeRanking(pred),5,1);
    p10+=LibSVM.computePrecisionAt(target,LibSVM.computeRanking(pred),10,1);
    p20+=LibSVM.computePrecisionAt(target,LibSVM.computeRanking(pred),20,1);
    map+=LibSVM.computeAveragePrecision(target,LibSVM.computeRanking(pred),1);
    rPrec+=LibSVM.computeRPrecision(target,LibSVM.computeRanking(pred),1);
  }
  acc=acc / seeds.length;
  f=f / seeds.length;
  p5=p5 / seeds.length;
  p10=p10 / seeds.length;
  p20=p20 / seeds.length;
  map=map / seeds.length;
  rPrec=rPrec / seeds.length;
  results.setAccuracy(acc);
  results.setF1(f);
  results.setAveragePrecision(map);
  results.setrPrecision(rPrec);
  output.println(dataSet.getLabel());
  output.println(kernelA.getLabel() + "String_Node_Str" + weightA+ "String_Node_Str"+ kernelB.getLabel()+ "String_Node_Str"+ weightB+ "String_Node_Str"+ Arrays.toString(seeds)+ "String_Node_Str"+ Arrays.toString(cs));
  output.print("String_Node_Str" + acc);
  output.print("String_Node_Str" + f);
  output.print("String_Node_Str" + p5);
  output.print("String_Node_Str" + p10);
  output.print("String_Node_Str" + p20);
  output.print("String_Node_Str" + map);
  output.print("String_Node_Str" + rPrec);
  output.println("String_Node_Str");
  output.flush();
}

Fixed version (ground truth):
@Override public void run(){
  double acc=0, f=0;
  double p5=0, p10=0, p20=0;
  double map=0, rPrec=0;
  List<String> labels;
  for (int i=0; i < seeds.length; i++) {
    createRandomSubSet(200,200,seeds[i]);
    double[][] matrixA=kernelA.compute(trainGraphsA);
    double[][] matrixB=kernelB.compute(trainGraphsB);
    double[][] testMatrixA=kernelA.compute(trainGraphsA,testGraphsA);
    double[][] testMatrixB=kernelB.compute(trainGraphsB,testGraphsB);
    double[][] matrix=combineTrainKernels(matrixA,matrixB);
    Collections.shuffle(trainSet,new Random(seeds[i]));
    labels=new ArrayList<String>();
    for (    Pair<DirectedMultigraphWithRoot<Vertex<String>,Edge<String>>> pair : trainSet) {
      if (dataSet.getLabels().get(pair)) {
        labels.add("String_Node_Str");
      }
 else {
        labels.add("String_Node_Str");
      }
    }
    Map<String,Integer> labelMap=new TreeMap<String,Integer>();
    labelMap.put("String_Node_Str",1);
    labelMap.put("String_Node_Str",-1);
    LibSVMModel model=LibSVM.trainSVMModel(matrix,LibSVM.createTargets(labels,labelMap),new LibSVMParameters(cs));
    double[][] testMatrix=combineTestKernels(testMatrixA,testMatrixB);
    labels=new ArrayList<String>();
    for (    Pair<DirectedMultigraphWithRoot<Vertex<String>,Edge<String>>> pair : testSet) {
      if (dataSet.getLabels().get(pair)) {
        labels.add("String_Node_Str");
      }
 else {
        labels.add("String_Node_Str");
      }
    }
    LibSVMPrediction[] pred=LibSVM.testSVMModel(model,testMatrix);
    double[] target=LibSVM.createTargets(labels,labelMap);
    acc+=LibSVM.computeAccuracy(target,LibSVM.extractLabels(pred));
    f+=LibSVM.computeF1(target,LibSVM.extractLabels(pred));
    p5+=LibSVM.computePrecisionAt(target,LibSVM.computeRanking(pred),5,1);
    p10+=LibSVM.computePrecisionAt(target,LibSVM.computeRanking(pred),10,1);
    p20+=LibSVM.computePrecisionAt(target,LibSVM.computeRanking(pred),20,1);
    map+=LibSVM.computeAveragePrecision(target,LibSVM.computeRanking(pred),1);
    rPrec+=LibSVM.computeRPrecision(target,LibSVM.computeRanking(pred),1);
  }
  acc=acc / seeds.length;
  f=f / seeds.length;
  p5=p5 / seeds.length;
  p10=p10 / seeds.length;
  p20=p20 / seeds.length;
  map=map / seeds.length;
  rPrec=rPrec / seeds.length;
  results.setLabel(dataSet.getLabel() + "String_Node_Str" + Arrays.toString(seeds)+ "String_Node_Str"+ Arrays.toString(cs)+ "String_Node_Str"+ kernelA.getLabel()+ "String_Node_Str"+ kernelB.getLabel());
  results.setAccuracy(acc);
  results.setF1(f);
  results.setAveragePrecision(map);
  results.setrPrecision(rPrec);
  output.println(dataSet.getLabel());
  output.println(kernelA.getLabel() + "String_Node_Str" + weightA+ "String_Node_Str"+ kernelB.getLabel()+ "String_Node_Str"+ weightB+ "String_Node_Str"+ Arrays.toString(seeds)+ "String_Node_Str"+ Arrays.toString(cs));
  output.print("String_Node_Str" + acc);
  output.print("String_Node_Str" + f);
  output.print("String_Node_Str" + p5);
  output.print("String_Node_Str" + p10);
  output.print("String_Node_Str" + p20);
  output.print("String_Node_Str" + map);
  output.print("String_Node_Str" + rPrec);
  output.println("String_Node_Str");
  output.flush();
}