Program: 10705
Project: 10705
Buggy source:
public void start(boolean isFake) throws IOException {
  String kmsLoginProp=isFake ? FAKE_KMS_LOGIN_PROP : KURENTO_KMS_LOGIN_PROP;
  String kmsPasswdProp=isFake ? FAKE_KMS_PASSWD_PROP : KURENTO_KMS_PASSWD_PROP;
  String kmsPemProp=isFake ? FAKE_KMS_PEM_PROP : KURENTO_KMS_PASSWD_PROP;
  String kmsAutostartProp=isFake ? FAKE_KMS_AUTOSTART_PROP : KMS_AUTOSTART_PROP;
  String kmsAutostartDefaultProp=isFake ? FAKE_KMS_AUTOSTART_DEFAULT : KMS_AUTOSTART_DEFAULT;
  String kmsWsUriProp=isFake ? FAKE_KMS_WS_URI_PROP : KMS_WS_URI_PROP;
  String kmsLogin=getProperty(kmsLoginProp);
  String kmsPasswd=getProperty(kmsPasswdProp);
  String kmsPem=getProperty(kmsPemProp);
  String wsUri;
  if (this.wsUri != null) {
    wsUri=this.wsUri;
  }
 else {
    wsUri=getProperty(kmsWsUriProp,this.wsUri);
  }
  isKmsRemote=!wsUri.contains("String_Node_Str") && !wsUri.contains("String_Node_Str") && !docker;
  if (isKmsRemote && kmsLogin == null && (kmsPem == null || kmsPasswd == null)) {
    String kmsAutoStart=getProperty(kmsAutostartProp,kmsAutostartDefaultProp);
    throw new RuntimeException("String_Node_Str" + kmsAutostartProp + "String_Node_Str"+ kmsAutoStart+ "String_Node_Str"+ kmsWsUriProp+ "String_Node_Str"+ wsUri+ "String_Node_Str"+ kmsLoginProp+ "String_Node_Str"+ kmsLogin+ "String_Node_Str"+ kmsPasswdProp+ "String_Node_Str"+ kmsPasswd+ "String_Node_Str"+ kmsPemProp+ "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 {
    if (docker) {
      log.info("String_Node_Str" + "String_Node_Str",serverCommand,gstPlugins,workspace);
    }
 else {
      log.info("String_Node_Str" + "String_Node_Str",wsUri,serverCommand,gstPlugins,workspace);
    }
    if (!docker && !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();
  if (isKmsRemote) {
    String[] filesToBeCopied={"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(wsUri);
  waitForKurentoMediaServer(this.wsUri);
}

Fixed version (ground truth):
public void start(boolean isFake) throws IOException {
  String kmsLoginProp=isFake ? FAKE_KMS_LOGIN_PROP : KURENTO_KMS_LOGIN_PROP;
  String kmsPasswdProp=isFake ? FAKE_KMS_PASSWD_PROP : KURENTO_KMS_PASSWD_PROP;
  String kmsPemProp=isFake ? FAKE_KMS_PEM_PROP : KURENTO_KMS_PEM_PROP;
  String kmsAutostartProp=isFake ? FAKE_KMS_AUTOSTART_PROP : KMS_AUTOSTART_PROP;
  String kmsAutostartDefaultProp=isFake ? FAKE_KMS_AUTOSTART_DEFAULT : KMS_AUTOSTART_DEFAULT;
  String kmsWsUriProp=isFake ? FAKE_KMS_WS_URI_PROP : KMS_WS_URI_PROP;
  String kmsLogin=getProperty(kmsLoginProp);
  String kmsPasswd=getProperty(kmsPasswdProp);
  String kmsPem=getProperty(kmsPemProp);
  String wsUri;
  if (this.wsUri != null) {
    wsUri=this.wsUri;
  }
 else {
    wsUri=getProperty(kmsWsUriProp,this.wsUri);
  }
  isKmsRemote=!wsUri.contains("String_Node_Str") && !wsUri.contains("String_Node_Str") && !docker;
  if (isKmsRemote && kmsLogin == null && (kmsPem == null || kmsPasswd == null)) {
    String kmsAutoStart=getProperty(kmsAutostartProp,kmsAutostartDefaultProp);
    throw new RuntimeException("String_Node_Str" + kmsAutostartProp + "String_Node_Str"+ kmsAutoStart+ "String_Node_Str"+ kmsWsUriProp+ "String_Node_Str"+ wsUri+ "String_Node_Str"+ kmsLoginProp+ "String_Node_Str"+ kmsLogin+ "String_Node_Str"+ kmsPasswdProp+ "String_Node_Str"+ kmsPasswd+ "String_Node_Str"+ kmsPemProp+ "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 {
    if (docker) {
      log.info("String_Node_Str" + "String_Node_Str",serverCommand,gstPlugins,workspace);
    }
 else {
      log.info("String_Node_Str" + "String_Node_Str",wsUri,serverCommand,gstPlugins,workspace);
    }
    if (!docker && !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();
  if (isKmsRemote) {
    String[] filesToBeCopied={"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(wsUri);
  waitForKurentoMediaServer(this.wsUri);
}