Program: 10740
Project: 10740
Buggy source:
public void start() throws IOException {
  String kmsLogin=getProperty(KURENTO_KMS_LOGIN_PROP);
  String kmsPasswd=getProperty(KURENTO_KMS_PASSWD_PROP);
  String kmsPem=getProperty(KURENTO_KMS_PEM_PROP);
  boolean isKmsRemote=!wsUri.contains("String_Node_Str") && !wsUri.contains("String_Node_Str");
  if (isKmsRemote && kmsLogin == null && (kmsPem == null || kmsPasswd == null)) {
    String kmsAutoStart=getProperty(KMS_AUTOSTART_PROP,KMS_AUTOSTART_DEFAULT);
    throw new RuntimeException("String_Node_Str" + KMS_AUTOSTART_PROP + "String_Node_Str"+ kmsAutoStart+ "String_Node_Str"+ KMS_WS_URI_PROP+ "String_Node_Str"+ wsUri+ "String_Node_Str"+ KURENTO_KMS_LOGIN_PROP+ "String_Node_Str"+ kmsLogin+ "String_Node_Str"+ KURENTO_KMS_PASSWD_PROP+ "String_Node_Str"+ kmsPasswd+ "String_Node_Str"+ KURENTO_KMS_PEM_PROP+ "String_Node_Str"+ kmsPem);
  }
  serverCommand=PropertiesManager.getProperty(KURENTO_SERVER_COMMAND_PROP,KURENTO_SERVER_COMMAND_DEFAULT);
  gstPlugins=PropertiesManager.getProperty(KURENTO_GST_PLUGINS_PROP,KURENTO_GST_PLUGINS_DEFAULT);
  try {
    workspace=Files.createTempDirectory("String_Node_Str").toString();
    lastWorkspace=workspace;
  }
 catch (  IOException e) {
    workspace=PropertiesManager.getProperty(KURENTO_WORKSPACE_PROP,KURENTO_WORKSPACE_DEFAULT);
    log.error("String_Node_Str",workspace,e);
  }
  debugOptions=PropertiesManager.getProperty(KURENTO_SERVER_DEBUG_PROP,KURENTO_SERVER_DEBUG_DEFAULT);
  if (!workspace.endsWith("String_Node_Str")) {
    workspace+="String_Node_Str";
  }
  log.debug("String_Node_Str",workspace);
  if (rabbitMqAddress != null) {
    log.info("String_Node_Str" + "String_Node_Str",rabbitMqAddress,serverCommand,gstPlugins,workspace);
  }
 else {
    log.info("String_Node_Str" + "String_Node_Str",wsUri,serverCommand,gstPlugins,workspace);
    if (!isFreePort(wsUri)) {
      throw new RuntimeException("String_Node_Str" + wsUri + "String_Node_Str");
    }
  }
  if (isKmsRemote) {
    String remoteKmsStr=wsUri.substring(wsUri.indexOf("String_Node_Str") + 2,wsUri.lastIndexOf("String_Node_Str"));
    log.info("String_Node_Str",remoteKmsStr);
    remoteKms=new SshConnection(remoteKmsStr,kmsLogin,kmsPasswd,kmsPem);
    if (kmsPem != null) {
      remoteKms.setPem(kmsPem);
    }
    remoteKms.start();
    remoteKms.createTmpFolder();
  }
  createKurentoConf(isKmsRemote);
  if (isKmsRemote) {
    String[] filesToBeCopied={"String_Node_Str","String_Node_Str","String_Node_Str"};
    for (    String s : filesToBeCopied) {
      remoteKms.scp(workspace + s,remoteKms.getTmpFolder() + "String_Node_Str" + s);
    }
    remoteKms.runAndWaitCommand("String_Node_Str","String_Node_Str",remoteKms.getTmpFolder() + "String_Node_Str");
  }
  if (testDir != null) {
    File logFile=new File(testDir + testClassName,testMethodName + "String_Node_Str");
    KurentoServicesTestHelper.setServerLogFilePath(logFile);
    log.debug("String_Node_Str",logFile.getAbsolutePath());
    if (isKmsRemote) {
      remoteKms.runAndWaitCommand("String_Node_Str","String_Node_Str",remoteKms.getTmpFolder() + "String_Node_Str" + "String_Node_Str"+ remoteKms.getTmpFolder()+ "String_Node_Str");
    }
 else {
      Shell.runAndWait("String_Node_Str","String_Node_Str",workspace + "String_Node_Str" + logFile.getAbsolutePath()+ "String_Node_Str");
    }
  }
 else {
    if (isKmsRemote) {
      remoteKms.runAndWaitCommand("String_Node_Str","String_Node_Str",remoteKms.getTmpFolder() + "String_Node_Str" + "String_Node_Str");
    }
 else {
      Shell.run("String_Node_Str","String_Node_Str",workspace + "String_Node_Str");
    }
  }
  waitForKurentoMediaServer(wsUri);
}

Fixed version (ground truth):
public void start() throws IOException {
  String kmsLogin=getProperty(KURENTO_KMS_LOGIN_PROP);
  String kmsPasswd=getProperty(KURENTO_KMS_PASSWD_PROP);
  String kmsPem=getProperty(KURENTO_KMS_PEM_PROP);
  isKmsRemote=!wsUri.contains("String_Node_Str") && !wsUri.contains("String_Node_Str");
  if (isKmsRemote && kmsLogin == null && (kmsPem == null || kmsPasswd == null)) {
    String kmsAutoStart=getProperty(KMS_AUTOSTART_PROP,KMS_AUTOSTART_DEFAULT);
    throw new RuntimeException("String_Node_Str" + KMS_AUTOSTART_PROP + "String_Node_Str"+ kmsAutoStart+ "String_Node_Str"+ KMS_WS_URI_PROP+ "String_Node_Str"+ wsUri+ "String_Node_Str"+ KURENTO_KMS_LOGIN_PROP+ "String_Node_Str"+ kmsLogin+ "String_Node_Str"+ KURENTO_KMS_PASSWD_PROP+ "String_Node_Str"+ kmsPasswd+ "String_Node_Str"+ KURENTO_KMS_PEM_PROP+ "String_Node_Str"+ kmsPem);
  }
  serverCommand=PropertiesManager.getProperty(KURENTO_SERVER_COMMAND_PROP,KURENTO_SERVER_COMMAND_DEFAULT);
  gstPlugins=PropertiesManager.getProperty(KURENTO_GST_PLUGINS_PROP,KURENTO_GST_PLUGINS_DEFAULT);
  try {
    workspace=Files.createTempDirectory("String_Node_Str").toString();
    lastWorkspace=workspace;
  }
 catch (  IOException e) {
    workspace=PropertiesManager.getProperty(KURENTO_WORKSPACE_PROP,KURENTO_WORKSPACE_DEFAULT);
    log.error("String_Node_Str",workspace,e);
  }
  debugOptions=PropertiesManager.getProperty(KURENTO_SERVER_DEBUG_PROP,KURENTO_SERVER_DEBUG_DEFAULT);
  if (!workspace.endsWith("String_Node_Str")) {
    workspace+="String_Node_Str";
  }
  log.debug("String_Node_Str",workspace);
  if (rabbitMqAddress != null) {
    log.info("String_Node_Str" + "String_Node_Str",rabbitMqAddress,serverCommand,gstPlugins,workspace);
  }
 else {
    log.info("String_Node_Str" + "String_Node_Str",wsUri,serverCommand,gstPlugins,workspace);
    if (!isKmsRemote && !isFreePort(wsUri)) {
      throw new RuntimeException("String_Node_Str" + wsUri + "String_Node_Str");
    }
  }
  if (isKmsRemote) {
    String remoteKmsStr=wsUri.substring(wsUri.indexOf("String_Node_Str") + 2,wsUri.lastIndexOf("String_Node_Str"));
    log.info("String_Node_Str",remoteKmsStr);
    remoteKms=new SshConnection(remoteKmsStr,kmsLogin,kmsPasswd,kmsPem);
    if (kmsPem != null) {
      remoteKms.setPem(kmsPem);
    }
    remoteKms.start();
    remoteKms.createTmpFolder();
  }
  createKurentoConf(isKmsRemote);
  if (isKmsRemote) {
    String[] filesToBeCopied={"String_Node_Str","String_Node_Str","String_Node_Str"};
    for (    String s : filesToBeCopied) {
      remoteKms.scp(workspace + s,remoteKms.getTmpFolder() + "String_Node_Str" + s);
    }
    remoteKms.runAndWaitCommand("String_Node_Str","String_Node_Str",remoteKms.getTmpFolder() + "String_Node_Str");
  }
  startKms();
  waitForKurentoMediaServer(wsUri);
}