Program: 13733
Project: 13733
Buggy source:
@Override public void onActivityResult(int request,int result,Intent data){
  super.onActivityResult(request,result,data);
switch (request) {
case REQUEST_CONNECT:
    if (result != RESULT_OK) {
      shouldResolveError=false;
    }
  if (!mGoogleApiClient.isConnecting() && !mGoogleApiClient.isConnected()) {
    mGoogleApiClient.connect();
  }
 else {
    showAccountDialog();
  }
isResolvingError=false;
break;
case REQUEST_LOGIN:
if (result == RESULT_OK) {
GoogleSignInResult signInResult=Auth.GoogleSignInApi.getSignInResultFromIntent(data);
if (signInResult.isSuccess()) {
try {
  GoogleSignInAccount account=signInResult.getSignInAccount();
  mGoogleEmail=account.getEmail();
  PushSocialLoginPayload payload=new PushSocialLoginPayload(account.getIdToken(),SERVICE_TYPE_GOOGLE);
  mDispatcher.dispatch(AccountActionBuilder.newPushSocialLoginAction(payload));
}
 catch (NullPointerException exception) {
  disconnectGoogleClient();
  AppLog.e(T.NUX,"String_Node_Str",exception);
  showErrorDialog(getString(R.string.login_error_generic));
}
}
 else {
switch (signInResult.getStatus().getStatusCode()) {
case GoogleSignInStatusCodes.INTERNAL_ERROR:
  AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.login_error_generic) + getString(R.string.login_error_suffix_internal));
break;
case GoogleSignInStatusCodes.INVALID_ACCOUNT:
AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.login_error_generic) + getString(R.string.login_error_suffix_invalid));
break;
case GoogleSignInStatusCodes.NETWORK_ERROR:
AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.error_generic_network));
break;
case GoogleSignInStatusCodes.SIGN_IN_CANCELLED:
AppLog.e(T.NUX,"String_Node_Str");
break;
case GoogleSignInStatusCodes.SIGN_IN_FAILED:
AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.login_error_generic));
break;
case GoogleSignInStatusCodes.SIGN_IN_REQUIRED:
AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.login_error_generic));
break;
default :
AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.login_error_generic));
break;
}
}
}
 else {
AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.login_error_generic));
}
break;
}
}

Fixed version (ground truth):
@Override public void onActivityResult(int request,int result,Intent data){
  super.onActivityResult(request,result,data);
switch (request) {
case REQUEST_CONNECT:
    if (result != RESULT_OK) {
      shouldResolveError=false;
    }
  if (!mGoogleApiClient.isConnecting() && !mGoogleApiClient.isConnected()) {
    mGoogleApiClient.connect();
  }
 else {
    showAccountDialog();
  }
isResolvingError=false;
break;
case REQUEST_LOGIN:
if (result == RESULT_OK) {
GoogleSignInResult signInResult=Auth.GoogleSignInApi.getSignInResultFromIntent(data);
if (signInResult.isSuccess()) {
try {
  GoogleSignInAccount account=signInResult.getSignInAccount();
  mGoogleEmail=account.getEmail();
  PushSocialLoginPayload payload=new PushSocialLoginPayload(account.getIdToken(),SERVICE_TYPE_GOOGLE);
  mDispatcher.dispatch(AccountActionBuilder.newPushSocialLoginAction(payload));
}
 catch (NullPointerException exception) {
  disconnectGoogleClient();
  AppLog.e(T.NUX,"String_Node_Str",exception);
  showErrorDialog(getString(R.string.login_error_generic));
}
}
 else {
switch (signInResult.getStatus().getStatusCode()) {
case GoogleSignInStatusCodes.INTERNAL_ERROR:
  AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.login_error_generic));
break;
case GoogleSignInStatusCodes.INVALID_ACCOUNT:
AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.login_error_generic) + getString(R.string.login_error_suffix_invalid));
break;
case GoogleSignInStatusCodes.NETWORK_ERROR:
AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.error_generic_network));
break;
case GoogleSignInStatusCodes.SIGN_IN_CANCELLED:
AppLog.e(T.NUX,"String_Node_Str");
break;
case GoogleSignInStatusCodes.SIGN_IN_FAILED:
AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.login_error_generic));
break;
case GoogleSignInStatusCodes.SIGN_IN_REQUIRED:
AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.login_error_generic));
break;
default :
AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.login_error_generic));
break;
}
}
}
 else {
AppLog.e(T.NUX,"String_Node_Str");
showErrorDialog(getString(R.string.login_error_generic));
}
break;
}
}