Program: 177820
Project: 177820
Buggy source:
@UsesMocks({SocializeProvider.class,SocializeAuthRequest.class,AuthProviders.class,SocializeAuthListener.class,SocializeActionListener.class,SocializeException.class,IBeanFactory.class,AuthProviderData.class}) @SuppressWarnings("String_Node_Str") public void testHandle3rdPartyAuthFail(){
  String appId3rdParty="String_Node_Str";
  String key="String_Node_Str";
  String secret="String_Node_Str";
  String endpoint="String_Node_Str";
  AuthProviderType authProviderType=AuthProviderType.FACEBOOK;
  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 authProvider=new AuthProvider(){
    @Override public void authenticate(    SocializeAuthRequest authRequest,    String appId,    AuthProviderListener listener){
      addResult(1,listener);
    }
    @Override public void clearCache(    Context context,    String appId){
      fail();
    }
  }
;
  listener.onError(error);
  listener.onError(error);
  AndroidMock.expect(request.getEndpoint()).andReturn(endpoint);
  AndroidMock.expect(authProviderData.getAuthProviderType()).andReturn(authProviderType);
  AndroidMock.expect(authProviderData.getAppId3rdParty()).andReturn(appId3rdParty);
  AndroidMock.expect(authProviders.getProvider(authProviderType)).andReturn(authProvider);
  AndroidMock.expect(request.getAuthProviderData()).andReturn(authProviderData);
  api.setAuthProviders(authProviders);
  AndroidMock.replay(authProviderData);
  AndroidMock.replay(authProviders);
  AndroidMock.replay(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);
  AndroidMock.verify(authProviders);
  AndroidMock.verify(request);
}

Fixed version (ground truth):
@UsesMocks({SocializeProvider.class,SocializeAuthRequest.class,AuthProviders.class,SocializeAuthListener.class,SocializeActionListener.class,SocializeException.class,IBeanFactory.class,AuthProviderData.class}) @SuppressWarnings("String_Node_Str") public void testHandle3rdPartyAuthFail(){
  String appId3rdParty="String_Node_Str";
  String key="String_Node_Str";
  String secret="String_Node_Str";
  String endpoint="String_Node_Str";
  AuthProviderType authProviderType=AuthProviderType.FACEBOOK;
  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(authProviderData.getAppId3rdParty()).andReturn(appId3rdParty);
  AndroidMock.expect(authProviders.getProvider(authProviderType)).andReturn(authProvider);
  AndroidMock.expect(request.getAuthProviderData()).andReturn(authProviderData);
  api.setAuthProviders(authProviders);
  AndroidMock.replay(authProviderData);
  AndroidMock.replay(authProviders);
  AndroidMock.replay(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);
  AndroidMock.verify(authProviders);
  AndroidMock.verify(request);
}