Program: 31369
Project: 31369
Buggy source:
/** 
 * Test of executeOSCommand method, of class org.owasp.esapi.Executor
 * @throws Exception the exception
 */
public void testExecuteUnixSystemCommand() throws Exception {
  System.out.println("String_Node_Str");
  if (System.getProperty("String_Node_Str").indexOf("String_Node_Str") != -1) {
    System.out.println("String_Node_Str");
    return;
  }
  Codec codec=new UnixCodec();
  File binSh=new File("String_Node_Str").getCanonicalFile();
  ESAPI.setSecurityConfiguration(new Conf(ESAPI.securityConfiguration(),Collections.singletonList(binSh.getCanonicalPath()),new File("String_Node_Str")));
  Executor instance=ESAPI.executor();
  File executable=binSh;
  List params=new ArrayList();
  try {
    params.add("String_Node_Str");
    params.add("String_Node_Str");
    params.add("String_Node_Str");
    String result=instance.executeSystemCommand(executable,new ArrayList(params));
    System.out.println("String_Node_Str" + result);
    assertTrue(result.length() > 0);
  }
 catch (  Exception e) {
    fail(e.getMessage());
  }
  try {
    File exec2=new File(executable.getPath() + "String_Node_Str");
    String result=instance.executeSystemCommand(exec2,new ArrayList(params));
    System.out.println("String_Node_Str" + result);
    fail();
  }
 catch (  Exception e) {
  }
  try {
    File exec2=new File(executable.getPath() + "String_Node_Str");
    String result=instance.executeSystemCommand(exec2,new ArrayList(params));
    System.out.println("String_Node_Str" + result);
    fail();
  }
 catch (  Exception e) {
  }
  try {
    params.add("String_Node_Str");
    String result=instance.executeSystemCommand(executable,new ArrayList(params));
    System.out.println("String_Node_Str" + result);
  }
 catch (  Exception e) {
    fail();
  }
}

Fixed version (ground truth):
/** 
 * Test of executeOSCommand method, of class org.owasp.esapi.Executor
 * @throws Exception the exception
 */
public void testExecuteUnixSystemCommand() throws Exception {
  System.out.println("String_Node_Str");
  if (System.getProperty("String_Node_Str").indexOf("String_Node_Str") != -1) {
    System.out.println("String_Node_Str");
    return;
  }
  Codec codec=new UnixCodec();
  File binSh=new File("String_Node_Str").getCanonicalFile();
  ESAPI.setSecurityConfiguration(new Conf(ESAPI.securityConfiguration(),Collections.singletonList(binSh.getPath()),new File("String_Node_Str")));
  Executor instance=ESAPI.executor();
  File executable=binSh;
  List params=new ArrayList();
  try {
    params.add("String_Node_Str");
    params.add("String_Node_Str");
    params.add("String_Node_Str");
    String result=instance.executeSystemCommand(executable,new ArrayList(params));
    System.out.println("String_Node_Str" + result);
    assertTrue(result.length() > 0);
  }
 catch (  Exception e) {
    fail(e.getMessage());
  }
  try {
    File exec2=new File(executable.getPath() + "String_Node_Str");
    String result=instance.executeSystemCommand(exec2,new ArrayList(params));
    System.out.println("String_Node_Str" + result);
    fail();
  }
 catch (  Exception e) {
  }
  try {
    File exec2=new File(executable.getPath() + "String_Node_Str");
    String result=instance.executeSystemCommand(exec2,new ArrayList(params));
    System.out.println("String_Node_Str" + result);
    fail();
  }
 catch (  Exception e) {
  }
  try {
    params.add("String_Node_Str");
    String result=instance.executeSystemCommand(executable,new ArrayList(params));
    System.out.println("String_Node_Str" + result);
  }
 catch (  Exception e) {
    fail();
  }
}