Program: 189051
Project: 189051
Buggy source:
public void benchmark() throws IOException {
  if (args.length != 2) {
    System.err.println(args.length + "String_Node_Str");
    System.out.println(Poster.class.getSimpleName() + "String_Node_Str");
    System.exit(-1);
  }
  File outputFile=Utility.checkOutput(args[0]);
  Reference reference=SWQEFactory.getQueryInterface().getLatestAtomByRowKey("String_Node_Str",Reference.class);
  if (reference == null) {
    SGID refID=ReferenceCreator.mainMethod(new String[]{HG_19});
    reference=SWQEFactory.getQueryInterface().getAtomBySGID(Reference.class,refID);
  }
  keyValues.put("String_Node_Str",reference.getSGID().getRowKey());
  recordSpace("String_Node_Str");
  Utility.writeKeyValueFile(outputFile,keyValues);
  int count=0;
  File fileDirectory=new File(args[1]);
  File[] listFiles=fileDirectory.listFiles();
  SGID fSet_sgid=null;
  for (  File inputFile : listFiles) {
    Date startDate=new Date();
    keyValues.put(count + "String_Node_Str",Long.toString(startDate.getTime()));
    keyValues.put(count + "String_Node_Str",startDate.toString());
    if (fSet_sgid == null) {
      fSet_sgid=SOFeatureImporter.runMain(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str",inputFile.getAbsolutePath(),"String_Node_Str",reference.getSGID().getRowKey()});
    }
 else {
      fSet_sgid=SOFeatureImporter.runMain(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str",inputFile.getAbsolutePath(),"String_Node_Str",reference.getSGID().getRowKey(),"String_Node_Str",fSet_sgid.getRowKey()});
    }
    FeatureSet fSet=SWQEFactory.getQueryInterface().getLatestAtomBySGID(fSet_sgid,FeatureSet.class);
    keyValues.put(count + "String_Node_Str",fSet.getSGID().getRowKey());
    keyValues.put(count + "String_Node_Str",Long.toString(fSet.getSGID().getBackendTimestamp().getTime()));
    keyValues.put(count + "String_Node_Str",Long.toString(System.currentTimeMillis()));
    long fsetcount=fSet.getCount();
    keyValues.put(count + "String_Node_Str",Long.toString(fsetcount));
    keyValues.put(count + "String_Node_Str",Long.toString(System.currentTimeMillis()));
    Date endDate=new Date();
    keyValues.put(count + "String_Node_Str",Long.toString(endDate.getTime()));
    keyValues.put(count + "String_Node_Str",endDate.toString());
    recordSpace(String.valueOf(count));
    Utility.writeKeyValueFile(outputFile,keyValues);
  }
}

Fixed version (ground truth):
public void benchmark() throws IOException {
  if (args.length != 2) {
    System.err.println(args.length + "String_Node_Str");
    System.out.println(Poster.class.getSimpleName() + "String_Node_Str");
    System.exit(-1);
  }
  File outputFile=Utility.checkOutput(args[0]);
  Reference reference=SWQEFactory.getQueryInterface().getLatestAtomByRowKey("String_Node_Str",Reference.class);
  if (reference == null) {
    SGID refID=ReferenceCreator.mainMethod(new String[]{HG_19});
    reference=SWQEFactory.getQueryInterface().getAtomBySGID(Reference.class,refID);
  }
  keyValues.put("String_Node_Str",reference.getSGID().getRowKey());
  recordSpace("String_Node_Str");
  Utility.writeKeyValueFile(outputFile,keyValues);
  int count=0;
  File fileDirectory=new File(args[1]);
  File[] listFiles=fileDirectory.listFiles();
  SGID fSet_sgid=null;
  for (  File inputFile : listFiles) {
    Date startDate=new Date();
    keyValues.put(count + "String_Node_Str",Long.toString(startDate.getTime()));
    keyValues.put(count + "String_Node_Str",startDate.toString());
    if (fSet_sgid == null) {
      fSet_sgid=SOFeatureImporter.runMain(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str",inputFile.getAbsolutePath(),"String_Node_Str",String.valueOf(BENCHMARKING_BATCH_SIZE),"String_Node_Str",reference.getSGID().getRowKey()});
    }
 else {
      fSet_sgid=SOFeatureImporter.runMain(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str",inputFile.getAbsolutePath(),"String_Node_Str",String.valueOf(BENCHMARKING_BATCH_SIZE),"String_Node_Str",reference.getSGID().getRowKey(),"String_Node_Str",fSet_sgid.getRowKey()});
    }
    FeatureSet fSet=SWQEFactory.getQueryInterface().getLatestAtomBySGID(fSet_sgid,FeatureSet.class);
    keyValues.put(count + "String_Node_Str",fSet.getSGID().getRowKey());
    keyValues.put(count + "String_Node_Str",Long.toString(fSet.getSGID().getBackendTimestamp().getTime()));
    keyValues.put(count + "String_Node_Str",Long.toString(System.currentTimeMillis()));
    long fsetcount=fSet.getCount();
    keyValues.put(count + "String_Node_Str",Long.toString(fsetcount));
    keyValues.put(count + "String_Node_Str",Long.toString(System.currentTimeMillis()));
    keyValues.put(count + "String_Node_Str",Long.toString(System.currentTimeMillis()));
    QueryFuture<FeatureSet> queryFuture=SWQEFactory.getQueryInterface().getFeaturesByAttributes(1,fSet,new RPNStack(new RPNStack.FeatureAttribute("String_Node_Str"),new RPNStack.Constant(100.30d),RPNStack.Operation.EQUAL));
    FeatureSet resultSet=queryFuture.get();
    keyValues.put(count + "String_Node_Str",Long.toString(System.currentTimeMillis()));
    fsetcount=(int)resultSet.getCount();
    keyValues.put(count + "String_Node_Str",Long.toString(fsetcount));
    keyValues.put(count + "String_Node_Str",Long.toString(System.currentTimeMillis()));
    keyValues.put(count + "String_Node_Str",Long.toString(System.currentTimeMillis()));
    queryFuture=SWQEFactory.getQueryInterface().getFeatures(1,fSet);
    resultSet=queryFuture.get();
    keyValues.put(count + "String_Node_Str",Long.toString(System.currentTimeMillis()));
    fsetcount=(int)resultSet.getCount();
    keyValues.put(count + "String_Node_Str",Long.toString(fsetcount));
    keyValues.put(count + "String_Node_Str",Long.toString(System.currentTimeMillis()));
    Date endDate=new Date();
    keyValues.put(count + "String_Node_Str",Long.toString(endDate.getTime()));
    keyValues.put(count + "String_Node_Str",endDate.toString());
    recordSpace(String.valueOf(count));
    Utility.writeKeyValueFile(outputFile,keyValues);
    count++;
  }
}