Program: 177833
Project: 177833
Buggy source:
@UsesMocks({SocializeProvider.class,SocializeAuthRequest.class,AuthProviders.class,SocializeAuthListener.class,SocializeActionListener.class,SocializeException.class,IBeanFactory.class,AuthProviderData.class,AuthProviderInfo.class}) @SuppressWarnings("String_Node_Str") public void testHandle3rdPartyAuthFail() throws SocializeException {
  String key="String_Node_Str";
  String secret="String_Node_Str";
  String endpoint="String_Node_Str";
  AuthProviderType authProviderType=AuthProviderType.FACEBOOK;
  AuthProviderInfo authProviderInfo=AndroidMock.createMock(AuthProviderInfo.class);
  SocializeProvider<SocializeObject> provider=AndroidMock.createMock(SocializeProvider.class);
  AuthProviders authProviders=AndroidMock.createMock(AuthProviders.class);
  SocializeAuthListener listener=AndroidMock.createMock(SocializeAuthListener.class);
  SocializeAuthRequest request=AndroidMock.createMock(SocializeAuthRequest.class);
  SocializeActionListener actionListener=AndroidMock.createMock(SocializeActionListener.class);
  SocializeException error=AndroidMock.createMock(SocializeException.class);
  AuthProviderData authProviderData=AndroidMock.createMock(AuthProviderData.class);
  MockSocializeApi api=new MockSocializeApi(provider);
  AuthProvider<AuthProviderInfo> authProvider=new AuthProvider<AuthProviderInfo>(){
    @Override public void authenticate(    SocializeAuthRequest authRequest,    String appId,    AuthProviderListener listener){
      fail();
    }
    @Override public void clearCache(    Context context,    String appId){
      fail();
    }
    @Override public void authenticate(    SocializeAuthRequest authRequest,    AuthProviderInfo info,    AuthProviderListener listener){
      addResult(1,listener);
    }
    @Override public void clearCache(    Context context,    AuthProviderInfo info){
      fail();
    }
  }
;
  listener.onError(error);
  listener.onError(error);
  AndroidMock.expect(request.getEndpoint()).andReturn(endpoint);
  AndroidMock.expect(authProviderData.getAuthProviderType()).andReturn(authProviderType);
  AndroidMock.expect(authProviders.getProvider(authProviderType)).andReturn(authProvider);
  AndroidMock.expect(request.getAuthProviderData()).andReturn(authProviderData);
  AndroidMock.expect(authProviderData.getAuthProviderInfo()).andReturn(authProviderInfo).anyTimes();
  AndroidMock.expect(authProviderInfo.getType()).andReturn(authProviderType);
  authProviderInfo.validate();
  api.setAuthProviders(authProviders);
  AndroidMock.replay(authProviderData,authProviderInfo,authProviders,request);
  api.handle3rdPartyAuth(getContext(),request,actionListener,listener,key,secret);
  AuthProviderListener authProviderListener=getResult(1);
  String loadSession=getResult(0);
  assertNotNull(loadSession);
  assertNotNull(authProviderListener);
  assertEquals("String_Node_Str",loadSession);
  authProviderListener.onAuthFail(error);
  authProviderListener.onError(error);
  String handleRegularAuth=getResult(3);
  assertNull(handleRegularAuth);
  AndroidMock.verify(authProviderData,authProviderInfo,authProviders,request);
}

Fixed version (ground truth):
@UsesMocks({SocializeProvider.class,SocializeAuthRequest.class,AuthProviders.class,SocializeAuthListener.class,SocializeActionListener.class,SocializeException.class,IBeanFactory.class,AuthProviderData.class,AuthProviderInfo.class}) @SuppressWarnings("String_Node_Str") public void testHandle3rdPartyAuthFail() throws SocializeException {
  String key="String_Node_Str";
  String secret="String_Node_Str";
  String endpoint="String_Node_Str";
  AuthProviderType authProviderType=AuthProviderType.FACEBOOK;
  AuthProviderInfo authProviderInfo=AndroidMock.createMock(AuthProviderInfo.class);
  SocializeProvider<SocializeObject> provider=AndroidMock.createMock(SocializeProvider.class);
  AuthProviders authProviders=AndroidMock.createMock(AuthProviders.class);
  SocializeAuthListener listener=AndroidMock.createMock(SocializeAuthListener.class);
  SocializeAuthRequest request=AndroidMock.createMock(SocializeAuthRequest.class);
  SocializeActionListener actionListener=AndroidMock.createMock(SocializeActionListener.class);
  SocializeException error=AndroidMock.createMock(SocializeException.class);
  AuthProviderData authProviderData=AndroidMock.createMock(AuthProviderData.class);
  MockSocializeApi api=new MockSocializeApi(provider);
  AuthProvider<AuthProviderInfo> authProvider=new AuthProvider<AuthProviderInfo>(){
    @Override public void authenticate(    SocializeAuthRequest authRequest,    String appId,    AuthProviderListener listener){
      fail();
    }
    @Override public void clearCache(    Context context,    String appId){
      fail();
    }
    @Override public void authenticate(    AuthProviderInfo info,    AuthProviderListener listener){
      addResult(1,listener);
    }
    @Override public void clearCache(    Context context,    AuthProviderInfo info){
      fail();
    }
  }
;
  listener.onError(error);
  listener.onError(error);
  AndroidMock.expect(request.getEndpoint()).andReturn(endpoint);
  AndroidMock.expect(authProviderData.getAuthProviderType()).andReturn(authProviderType);
  AndroidMock.expect(authProviders.getProvider(authProviderType)).andReturn(authProvider);
  AndroidMock.expect(request.getAuthProviderData()).andReturn(authProviderData);
  AndroidMock.expect(authProviderData.getAuthProviderInfo()).andReturn(authProviderInfo).anyTimes();
  AndroidMock.expect(authProviderInfo.getType()).andReturn(authProviderType);
  authProviderInfo.validate();
  api.setAuthProviders(authProviders);
  AndroidMock.replay(authProviderData,authProviderInfo,authProviders,request);
  api.handle3rdPartyAuth(getContext(),request,actionListener,listener,key,secret);
  AuthProviderListener authProviderListener=getResult(1);
  String loadSession=getResult(0);
  assertNotNull(loadSession);
  assertNotNull(authProviderListener);
  assertEquals("String_Node_Str",loadSession);
  authProviderListener.onAuthFail(error);
  authProviderListener.onError(error);
  String handleRegularAuth=getResult(3);
  assertNull(handleRegularAuth);
  AndroidMock.verify(authProviderData,authProviderInfo,authProviders,request);
}