Program: 35656
Project: 35656
Buggy source:
private void checkServer(String queryUrl,boolean checkForcedHttps){
  statusQueryDisposable=ncApi.getServerStatus(queryUrl).subscribeOn(Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread()).subscribe(status -> {
    String productName=getResources().getString(R.string.nc_server_product_name);
    String versionString=status.getVersion().substring(0,status.getVersion().indexOf("String_Node_Str"));
    int version=Integer.parseInt(versionString);
    if (status.isInstalled() && !status.isMaintenance() && !status.isNeedsUpgrade()&& version >= 13) {
      getRouter().pushController(RouterTransaction.with(new WebViewLoginController(queryUrl.replace("String_Node_Str","String_Node_Str"),false)).pushChangeHandler(new HorizontalChangeHandler()).popChangeHandler(new HorizontalChangeHandler()));
    }
 else     if (!status.isInstalled()) {
      textFieldBoxes.setError(String.format(getResources().getString(R.string.nc_server_not_installed),productName),true);
      toggleProceedButton(false);
    }
 else     if (status.isNeedsUpgrade()) {
      textFieldBoxes.setError(String.format(getResources().getString(R.string.nc_server_db_upgrade_needed),productName),true);
      toggleProceedButton(false);
    }
 else     if (status.isMaintenance()) {
      textFieldBoxes.setError(String.format(getResources().getString(R.string.nc_server_maintenance),productName),true);
      toggleProceedButton(false);
    }
 else     if (!status.getVersion().startsWith("String_Node_Str")) {
      textFieldBoxes.setError(String.format(getResources().getString(R.string.nc_server_version),getResources().getString(R.string.nc_app_name),productName),true);
      toggleProceedButton(false);
    }
  }
,throwable -> {
    if (checkForcedHttps) {
      checkServer(queryUrl.replace("String_Node_Str","String_Node_Str"),false);
    }
 else {
      if (throwable.getLocalizedMessage() != null) {
        textFieldBoxes.setError(throwable.getLocalizedMessage(),true);
      }
 else       if (throwable.getCause() instanceof CertificateException) {
        textFieldBoxes.setError(getResources().getString(R.string.nc_certificate_error),false);
      }
      if (serverEntry != null) {
        serverEntry.setEnabled(true);
      }
      progressBar.setVisibility(View.GONE);
      providersTextView.setVisibility(View.VISIBLE);
      toggleProceedButton(false);
      dispose();
    }
  }
,() -> {
    progressBar.setVisibility(View.GONE);
    providersTextView.setVisibility(View.VISIBLE);
    dispose();
  }
);
}

Fixed version (ground truth):
private void checkServer(String queryUrl,boolean checkForcedHttps){
  statusQueryDisposable=ncApi.getServerStatus(queryUrl).subscribeOn(Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread()).subscribe(status -> {
    String productName=getResources().getString(R.string.nc_server_product_name);
    String versionString=status.getVersion().substring(0,status.getVersion().indexOf("String_Node_Str"));
    int version=Integer.parseInt(versionString);
    if (status.isInstalled() && !status.isMaintenance() && !status.isNeedsUpgrade()&& version >= 13) {
      getRouter().pushController(RouterTransaction.with(new WebViewLoginController(queryUrl.replace("String_Node_Str","String_Node_Str"),false)).pushChangeHandler(new HorizontalChangeHandler()).popChangeHandler(new HorizontalChangeHandler()));
    }
 else     if (!status.isInstalled()) {
      textFieldBoxes.setError(String.format(getResources().getString(R.string.nc_server_not_installed),productName),true);
      toggleProceedButton(false);
    }
 else     if (status.isNeedsUpgrade()) {
      textFieldBoxes.setError(String.format(getResources().getString(R.string.nc_server_db_upgrade_needed),productName),true);
      toggleProceedButton(false);
    }
 else     if (status.isMaintenance()) {
      textFieldBoxes.setError(String.format(getResources().getString(R.string.nc_server_maintenance),productName),true);
      toggleProceedButton(false);
    }
 else     if (!status.getVersion().startsWith("String_Node_Str")) {
      textFieldBoxes.setError(String.format(getResources().getString(R.string.nc_server_version),getResources().getString(R.string.nc_app_name),productName),true);
      toggleProceedButton(false);
    }
  }
,throwable -> {
    if (checkForcedHttps) {
      checkServer(queryUrl.replace("String_Node_Str","String_Node_Str"),false);
    }
 else {
      if (throwable.getLocalizedMessage() != null) {
        textFieldBoxes.setError(throwable.getLocalizedMessage(),true);
      }
 else       if (throwable.getCause() instanceof CertificateException) {
        textFieldBoxes.setError(getResources().getString(R.string.nc_certificate_error),false);
      }
      if (serverEntry != null) {
        serverEntry.setEnabled(true);
      }
      progressBar.setVisibility(View.INVISIBLE);
      providersTextView.setVisibility(View.VISIBLE);
      toggleProceedButton(false);
      dispose();
    }
  }
,() -> {
    progressBar.setVisibility(View.INVISIBLE);
    providersTextView.setVisibility(View.VISIBLE);
    dispose();
  }
);
}