Program: 162495
Project: 162495
Buggy source:
@Override protected void onPostExecute(AsyncTaskResult<SSHClient> result){
  if (result.exception != null) {
    if (SocketException.class.isAssignableFrom(result.exception.getClass()) || SocketTimeoutException.class.isAssignableFrom(result.exception.getClass())) {
      Toast.makeText(AppConfig.getInstance(),String.format(AppConfig.getInstance().getResources().getString(R.string.ssh_connect_failed),mHostname,mPort,result.exception.getLocalizedMessage()),Toast.LENGTH_LONG).show();
      return;
    }
 else     if (TransportException.class.isAssignableFrom(result.exception.getClass())) {
      DisconnectReason disconnectReason=TransportException.class.cast(result.exception).getDisconnectReason();
      if (DisconnectReason.HOST_KEY_NOT_VERIFIABLE.equals(disconnectReason)) {
        new AlertDialog.Builder(AppConfig.getInstance().getActivityContext()).setTitle(R.string.ssh_connect_failed_host_key_changed_title).setMessage(R.string.ssh_connect_failed_host_key_changed_message).setPositiveButton(R.string.ok,new DialogInterface.OnClickListener(){
          @Override public void onClick(          DialogInterface dialog,          int which){
            dialog.dismiss();
          }
        }
).show();
      }
      return;
    }
 else     if (mPassword != null) {
      Toast.makeText(AppConfig.getInstance(),R.string.ssh_authentication_failure_password,Toast.LENGTH_LONG).show();
      return;
    }
 else     if (mPrivateKey != null) {
      Toast.makeText(AppConfig.getInstance(),R.string.ssh_authentication_failure_key,Toast.LENGTH_LONG).show();
      return;
    }
  }
}

Fixed version (ground truth):
@Override protected void onPostExecute(AsyncTaskResult<SSHClient> result){
  if (result.exception != null) {
    if (SocketException.class.isAssignableFrom(result.exception.getClass()) || SocketTimeoutException.class.isAssignableFrom(result.exception.getClass())) {
      Toast.makeText(AppConfig.getInstance(),String.format(AppConfig.getInstance().getResources().getString(R.string.ssh_connect_failed),hostname,port,result.exception.getLocalizedMessage()),Toast.LENGTH_LONG).show();
      return;
    }
 else     if (TransportException.class.isAssignableFrom(result.exception.getClass())) {
      DisconnectReason disconnectReason=TransportException.class.cast(result.exception).getDisconnectReason();
      if (DisconnectReason.HOST_KEY_NOT_VERIFIABLE.equals(disconnectReason)) {
        new AlertDialog.Builder(AppConfig.getInstance().getActivityContext()).setTitle(R.string.ssh_connect_failed_host_key_changed_title).setMessage(R.string.ssh_connect_failed_host_key_changed_message).setPositiveButton(R.string.ok,new DialogInterface.OnClickListener(){
          @Override public void onClick(          DialogInterface dialog,          int which){
            dialog.dismiss();
          }
        }
).show();
      }
      return;
    }
 else     if (password != null) {
      Toast.makeText(AppConfig.getInstance(),R.string.ssh_authentication_failure_password,Toast.LENGTH_LONG).show();
      return;
    }
 else     if (privateKey != null) {
      Toast.makeText(AppConfig.getInstance(),R.string.ssh_authentication_failure_key,Toast.LENGTH_LONG).show();
      return;
    }
  }
}