Program: 177835
Project: 177835
Buggy source:
@UsesMocks({SocializeProvider.class,SocializeAuthRequest.class,AuthProviderResponse.class,AuthProviders.class,SocializeAuthListener.class,SocializeActionListener.class,IBeanFactory.class,AuthProviderData.class,AuthProviderInfo.class}) @SuppressWarnings("String_Node_Str") public void testHandle3rdPartyAuthSuccess() throws SocializeException {
  String appId3rdParty="String_Node_Str";
  String key="String_Node_Str";
  String secret="String_Node_Str";
  String token="String_Node_Str";
  String user="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);
  AuthProviderResponse response=AndroidMock.createMock(AuthProviderResponse.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 authenticate(    SocializeAuthRequest authRequest,    AuthProviderInfo info,    AuthProviderListener listener){
      addResult(1,listener);
    }
    @Override public void clearCache(    Context context,    AuthProviderInfo info){
      fail();
    }
    @Override public void clearCache(    Context context,    String appId){
      fail();
    }
  }
;
  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();
  AndroidMock.expect(response.getToken()).andReturn(token);
  AndroidMock.expect(response.getUserId()).andReturn(user);
  authProviderData.setUserId3rdParty(user);
  authProviderData.setToken3rdParty(token);
  api.setAuthProviders(authProviders);
  AndroidMock.replay(authProviderData,authProviderInfo,authProviders,request,response);
  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.onAuthSuccess(response);
  String handleRegularAuth=getResult(3);
  assertNotNull(handleRegularAuth);
  assertEquals("String_Node_Str",handleRegularAuth);
  AndroidMock.verify(authProviderData,authProviderInfo,authProviders,request,response);
}

Fixed version (ground truth):
@UsesMocks({SocializeProvider.class,SocializeAuthRequest.class,AuthProviderResponse.class,AuthProviders.class,SocializeAuthListener.class,SocializeActionListener.class,IBeanFactory.class,AuthProviderData.class,AuthProviderInfo.class}) @SuppressWarnings("String_Node_Str") public void testHandle3rdPartyAuthSuccess() throws SocializeException {
  String appId3rdParty="String_Node_Str";
  String key="String_Node_Str";
  String secret="String_Node_Str";
  String token="String_Node_Str";
  String user="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);
  AuthProviderResponse response=AndroidMock.createMock(AuthProviderResponse.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 authenticate(    AuthProviderInfo info,    AuthProviderListener listener){
      addResult(1,listener);
    }
    @Override public void clearCache(    Context context,    AuthProviderInfo info){
      fail();
    }
    @Override public void clearCache(    Context context,    String appId){
      fail();
    }
  }
;
  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();
  AndroidMock.expect(response.getToken()).andReturn(token);
  AndroidMock.expect(response.getUserId()).andReturn(user);
  authProviderData.setUserId3rdParty(user);
  authProviderData.setToken3rdParty(token);
  api.setAuthProviders(authProviders);
  AndroidMock.replay(authProviderData,authProviderInfo,authProviders,request,response);
  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.onAuthSuccess(response);
  String handleRegularAuth=getResult(3);
  assertNotNull(handleRegularAuth);
  assertEquals("String_Node_Str",handleRegularAuth);
  AndroidMock.verify(authProviderData,authProviderInfo,authProviders,request,response);
}