Program: 70595
Project: 70595
Buggy source:
private void firebaseAuthWithGoogle(final GoogleSignInAccount account){
  AuthCredential credential=GoogleAuthProvider.getCredential(account.getIdToken(),null);
  FirebaseUser firebaseUser=mAuth.getCurrentUser();
  Task<AuthResult> authResultTask;
  if (firebaseUser != null) {
    for (    UserInfo userInfo : firebaseUser.getProviderData()) {
      if (userInfo.getProviderId().equals(GoogleAuthProvider.PROVIDER_ID)) {
        if (userInfo.getUid().equals(account.getId())) {
          Log.i(TAG,"String_Node_Str");
          mAccount=account;
          onConnected();
        }
 else {
          String message="String_Node_Str" + userInfo.getUid() + "String_Node_Str"+ account.getId()+ "String_Node_Str";
          Log.w(TAG,message);
          GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
          updateConnectionStatus(GodotConnectStatus.DISCONNECTED);
        }
        return;
      }
    }
    authResultTask=firebaseUser.linkWithCredential(credential);
  }
 else {
    authResultTask=mAuth.signInWithCredential(credential);
  }
  authResultTask.addOnCompleteListener(activity,new OnCompleteListener<AuthResult>(){
    @Override public void onComplete(    @NonNull Task<AuthResult> task){
      if (task.isSuccessful()) {
        mAccount=account;
        onConnected();
      }
 else {
        String message=task.getException().getMessage();
        Log.w(TAG,"String_Node_Str" + task.getException());
        GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
        updateConnectionStatus(GodotConnectStatus.DISCONNECTED);
      }
    }
  }
);
}

Fixed version (ground truth):
private void firebaseAuthWithGoogle(final GoogleSignInAccount account){
  AuthCredential credential=GoogleAuthProvider.getCredential(account.getIdToken(),null);
  FirebaseUser firebaseUser=mAuth.getCurrentUser();
  Task<AuthResult> authResultTask;
  if (firebaseUser != null) {
    for (    UserInfo userInfo : firebaseUser.getProviderData()) {
      if (userInfo.getProviderId().equals(GoogleAuthProvider.PROVIDER_ID)) {
        if (userInfo.getUid().equals(account.getId())) {
          Log.i(TAG,"String_Node_Str");
          mAccount=account;
          onConnected();
        }
 else {
          String message="String_Node_Str" + userInfo.getUid() + "String_Node_Str"+ account.getId()+ "String_Node_Str";
          Log.w(TAG,message);
          GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
          updateConnectionStatus(GodotConnectStatus.DISCONNECTED);
        }
        return;
      }
    }
    authResultTask=firebaseUser.linkWithCredential(credential);
  }
 else {
    authResultTask=mAuth.signInWithCredential(credential);
  }
  authResultTask.addOnCompleteListener(activity,new OnCompleteListener<AuthResult>(){
    @Override public void onComplete(    @NonNull Task<AuthResult> task){
      if (task.isSuccessful()) {
        Log.i(TAG,"String_Node_Str");
        mAccount=account;
        onConnected();
      }
 else {
        String message=task.getException().getMessage();
        Log.w(TAG,"String_Node_Str" + task.getException());
        GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
        updateConnectionStatus(GodotConnectStatus.DISCONNECTED);
      }
    }
  }
);
}