Program: 177808
Project: 177808
Buggy source:
protected void handle3rdPartyAuth(final Context context,final SocializeAuthRequest request,final SocializeActionListener wrapper,final SocializeAuthListener listener,final String key,final String secret){
  final AuthProviderData authProviderData=request.getAuthProviderData();
  SocializeSession session=null;
  AuthProviderType authProviderType=getAuthProviderType(authProviderData);
  try {
    validate(authProviderData);
  }
 catch (  SocializeException error) {
    if (listener != null) {
      listener.onError(error);
    }
 else     if (logger != null) {
      logger.error("String_Node_Str",error);
    }
  }
  try {
    session=loadSession(request.getEndpoint(),key,secret);
  }
 catch (  SocializeException e) {
    logger.warn("String_Node_Str",e);
  }
  if (session == null || !provider.validateSession(session,authProviderData)) {
    AuthProvider<AuthProviderInfo> authProvider=authProviders.getProvider(authProviderType);
    if (authProvider != null) {
      AuthProviderListener authProviderListener=new AuthProviderListener(){
        @Override public void onError(        SocializeException error){
          if (listener != null) {
            listener.onError(error);
          }
        }
        @Override public void onAuthSuccess(        AuthProviderResponse response){
          authProviderData.setUserId3rdParty(response.getUserId());
          authProviderData.setToken3rdParty(response.getToken());
          authProviderData.setSecret3rdParty(response.getSecret());
          handleRegularAuth(context,request,wrapper,listener,key,secret,true);
        }
        @Override public void onAuthFail(        SocializeException error){
          if (listener != null) {
            listener.onAuthFail(error);
          }
        }
        @Override public void onCancel(){
          if (listener != null) {
            listener.onCancel();
          }
        }
      }
;
      AuthProviderInfo authProviderInfo=authProviderData.getAuthProviderInfo();
      if (authProviderInfo != null) {
        authProvider.authenticate(authProviderInfo,authProviderListener);
      }
 else {
        if (listener != null) {
          listener.onError(new SocializeException("String_Node_Str"));
        }
        logger.error("String_Node_Str");
      }
    }
 else {
      logger.error("String_Node_Str" + authProviderType.getName() + "String_Node_Str");
    }
  }
 else {
    if (listener != null) {
      listener.onAuthSuccess(session);
    }
  }
}

Fixed version (ground truth):
protected void handle3rdPartyAuth(final Context context,final SocializeAuthRequest request,final SocializeActionListener wrapper,final SocializeAuthListener listener,final String key,final String secret){
  final AuthProviderData authProviderData=request.getAuthProviderData();
  SocializeSession session=null;
  AuthProviderType authProviderType=getAuthProviderType(authProviderData);
  try {
    validate(authProviderData);
  }
 catch (  SocializeException error) {
    if (listener != null) {
      listener.onError(error);
    }
 else     if (logger != null) {
      logger.error("String_Node_Str",error);
    }
  }
  try {
    session=loadSession(request.getEndpoint(),key,secret);
  }
 catch (  SocializeException e) {
    logger.warn("String_Node_Str",e);
  }
  if (session == null || !provider.validateSession(session,authProviderData)) {
    AuthProvider<AuthProviderInfo> authProvider=authProviders.getProvider(authProviderType);
    if (authProvider != null) {
      AuthProviderListener authProviderListener=new AuthProviderListener(){
        @Override public void onError(        SocializeException error){
          if (listener != null) {
            listener.onError(error);
          }
        }
        @Override public void onAuthSuccess(        AuthProviderResponse response){
          authProviderData.setUserId3rdParty(response.getUserId());
          authProviderData.setToken3rdParty(response.getToken());
          authProviderData.setSecret3rdParty(response.getSecret());
          handleRegularAuth(context,request,wrapper,listener,key,secret);
        }
        @Override public void onAuthFail(        SocializeException error){
          if (listener != null) {
            listener.onAuthFail(error);
          }
        }
        @Override public void onCancel(){
          if (listener != null) {
            listener.onCancel();
          }
        }
      }
;
      AuthProviderInfo authProviderInfo=authProviderData.getAuthProviderInfo();
      if (authProviderInfo != null) {
        authProvider.authenticate(authProviderInfo,authProviderListener);
      }
 else {
        if (listener != null) {
          listener.onError(new SocializeException("String_Node_Str"));
        }
        logger.error("String_Node_Str");
      }
    }
 else {
      logger.error("String_Node_Str" + authProviderType.getName() + "String_Node_Str");
    }
  }
 else {
    if (listener != null) {
      listener.onAuthSuccess(session);
    }
  }
}