Program: 70109
Project: 70109
Buggy source:
/** 
 * Invokes a Decaf method
 * @param dfRunner
 * @param dfScript
 * @param dfExecutor
 * @param dfLib
 * @param mpiRunner
 * @param values
 * @param streams
 * @param prefixes
 * @param taskSandboxWorkingDir
 * @return
 * @throws InvokeExecutionException
 */
public static Object invokeDecafMethod(String dfRunner,String dfScript,String dfExecutor,String dfLib,String mpiRunner,Object[] values,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir) throws InvokeExecutionException {
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + dfScript);
  System.out.println("String_Node_Str" + taskSandboxWorkingDir.getAbsolutePath());
  String workers=System.getProperty(Constants.COMPSS_HOSTNAMES);
  String numNodes=System.getProperty(Constants.COMPSS_NUM_NODES);
  String computingUnits=System.getProperty(Constants.COMPSS_NUM_THREADS);
  String numProcs=String.valueOf(Integer.valueOf(numNodes) * Integer.valueOf(computingUnits));
  System.out.println("String_Node_Str" + workers);
  System.out.println("String_Node_Str" + numNodes);
  System.out.println("String_Node_Str" + computingUnits);
  StreamSTD streamValues=new StreamSTD();
  ArrayList<String> binaryParams=BinaryRunner.createCMDParametersFromValues(values,streams,prefixes,streamValues);
  String hostfile=writeHostfile(taskSandboxWorkingDir,workers);
  String[] cmd=new String[NUM_BASE_DECAF_ARGS];
  cmd[0]=dfRunner;
  cmd[1]=dfScript;
  cmd[2]=dfExecutor;
  cmd[3]=dfLib;
  cmd[4]=mpiRunner;
  cmd[5]="String_Node_Str";
  cmd[6]=numProcs;
  cmd[7]="String_Node_Str";
  cmd[8]=hostfile;
  String args=new String();
  for (int i=0; i < binaryParams.size(); ++i) {
    if (i == 0) {
      args=args.concat(binaryParams.get(i));
    }
 else {
      args=args.concat("String_Node_Str" + binaryParams.get(i));
    }
  }
  cmd[9]="String_Node_Str" + args + "String_Node_Str";
  System.setProperty(OMP_NUM_THREADS,computingUnits);
  System.out.print("String_Node_Str");
  for (int i=0; i < cmd.length; ++i) {
    System.out.print(cmd[i] + "String_Node_Str");
  }
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + streamValues.getStdIn());
  System.out.println("String_Node_Str" + streamValues.getStdOut());
  System.out.println("String_Node_Str" + streamValues.getStdErr());
  return BinaryRunner.executeCMD(cmd,streamValues,taskSandboxWorkingDir);
}

Fixed version (ground truth):
/** 
 * Invokes a Decaf method
 * @param dfRunner
 * @param dfScript
 * @param dfExecutor
 * @param dfLib
 * @param mpiRunner
 * @param values
 * @param streams
 * @param prefixes
 * @param taskSandboxWorkingDir
 * @return
 * @throws InvokeExecutionException
 */
public static Object invokeDecafMethod(String dfRunner,String dfScript,String dfExecutor,String dfLib,String mpiRunner,Object[] values,Stream[] streams,String[] prefixes,File taskSandboxWorkingDir) throws InvokeExecutionException {
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + dfScript);
  System.out.println("String_Node_Str" + taskSandboxWorkingDir.getAbsolutePath());
  String workers=System.getProperty(Constants.COMPSS_HOSTNAMES);
  String numNodes=System.getProperty(Constants.COMPSS_NUM_NODES);
  String computingUnits=System.getProperty(Constants.COMPSS_NUM_THREADS);
  String numProcs=String.valueOf(Integer.valueOf(numNodes) * Integer.valueOf(computingUnits));
  System.out.println("String_Node_Str" + workers);
  System.out.println("String_Node_Str" + numNodes);
  System.out.println("String_Node_Str" + computingUnits);
  StreamSTD streamValues=new StreamSTD();
  ArrayList<String> binaryParams=BinaryRunner.createCMDParametersFromValues(values,streams,prefixes,streamValues);
  String hostfile=writeHostfile(taskSandboxWorkingDir,workers);
  String args=new String();
  for (int i=0; i < binaryParams.size(); ++i) {
    if (i == 0) {
      args=args.concat(binaryParams.get(i));
    }
 else {
      args=args.concat("String_Node_Str" + binaryParams.get(i));
    }
  }
  String[] cmd;
  if (args.isEmpty()) {
    cmd=new String[NUM_BASE_DECAF_ARGS - 1];
  }
 else {
    cmd=new String[NUM_BASE_DECAF_ARGS];
  }
  cmd[0]=dfRunner;
  cmd[1]=dfScript;
  cmd[2]=dfExecutor;
  cmd[3]=dfLib;
  cmd[4]=mpiRunner;
  cmd[5]="String_Node_Str";
  cmd[6]=numProcs;
  cmd[7]="String_Node_Str";
  cmd[8]=hostfile;
  if (!args.isEmpty()) {
    cmd[9]="String_Node_Str" + args + "String_Node_Str";
  }
  System.setProperty(OMP_NUM_THREADS,computingUnits);
  System.out.print("String_Node_Str");
  for (int i=0; i < cmd.length; ++i) {
    System.out.print(cmd[i] + "String_Node_Str");
  }
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + streamValues.getStdIn());
  System.out.println("String_Node_Str" + streamValues.getStdOut());
  System.out.println("String_Node_Str" + streamValues.getStdErr());
  return BinaryRunner.executeCMD(cmd,streamValues,taskSandboxWorkingDir);
}