nus-yam/ex-repair huggingface dataset:
Program: 46202
Project: 46202
Buggy source:
@Test public void testTemporaryBlockedNoDisconnectionMultipleServerNonSmartRouting() throws InterruptedException {
  factory.newInstances(null,3);
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}

Fixed version (ground truth):
@Test public void testTemporaryBlockedNoDisconnectionMultipleServerNonSmartRouting(){
  factory.newInstances(null,3);
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}
Program: 46203
Project: 46203
Buggy source:
protected abstract String addListener(final AtomicInteger eventCount);

Fixed version (ground truth):
protected abstract String addListener();
Program: 46204
Project: 46204
Buggy source:
private void validateListenerFunctionality(final AtomicInteger eventCount){
  eventCount.set(0);
  for (int i=0; i < EVENT_COUNT; i++) {
    produceEvent();
  }
  assertTrueEventually(new AssertTask(){
    @Override public void run() throws Exception {
      int count=eventCount.get();
      assertTrue("String_Node_Str" + count + "String_Node_Str"+ EVENT_COUNT,count >= EVENT_COUNT);
    }
  }
,5);
  assertTrueAllTheTime(new AssertTask(){
    @Override public void run() throws Exception {
      int count=eventCount.get();
      assertEquals("String_Node_Str" + count + "String_Node_Str"+ EVENT_COUNT,EVENT_COUNT,eventCount.get());
    }
  }
,3);
}

Fixed version (ground truth):
private void validateListenerFunctionality(){
  for (int i=0; i < EVENT_COUNT; i++) {
    produceEvent();
  }
  assertTrueEventually(new AssertTask(){
    @Override public void run() throws Exception {
      int count=eventCount.get();
      assertTrue("String_Node_Str" + count + "String_Node_Str"+ EVENT_COUNT,count >= EVENT_COUNT);
    }
  }
);
  assertTrueAllTheTime(new AssertTask(){
    @Override public void run() throws Exception {
      int count=eventCount.get();
      assertEquals("String_Node_Str" + count + "String_Node_Str"+ EVENT_COUNT,EVENT_COUNT,eventCount.get());
    }
  }
,3);
}
Program: 46205
Project: 46205
Buggy source:
@Test public void testListenersSmartRouting() throws InterruptedException {
  factory.newHazelcastInstance();
  ClientConfig clientConfig=createClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersInternal();
}

Fixed version (ground truth):
@Test public void testListenersSmartRouting(){
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTerminateOwnerNode();
}
Program: 46206
Project: 46206
Buggy source:
@Test public void testTemporaryBlockedNoDisconnectionSmartRouting() throws InterruptedException {
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}

Fixed version (ground truth):
@Test public void testTemporaryBlockedNoDisconnectionSmartRouting(){
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}
Program: 46207
Project: 46207
Buggy source:
@Test @Ignore(value="String_Node_Str") public void testClusterReconnectDueToHeartbeatNonSmartRouting() throws InterruptedException {
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersForHeartbeat();
}

Fixed version (ground truth):
@Test public void testClusterReconnectDueToHeartbeatNonSmartRouting(){
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersHeartbeatTimeoutToOwner();
}
Program: 46208
Project: 46208
Buggy source:
@Test public void testListenersSmartRoutingMultipleServer() throws InterruptedException {
  factory.newInstances(null,3);
  ClientConfig clientConfig=createClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersInternal();
}

Fixed version (ground truth):
@Test public void testListenersSmartRoutingMultipleServer(){
  factory.newInstances(null,3);
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTerminateOwnerNode();
}
Program: 46209
Project: 46209
Buggy source:
@Test public void testTemporaryBlockedNoDisconnectionNonSmartRouting() throws InterruptedException {
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}

Fixed version (ground truth):
@Test public void testTemporaryBlockedNoDisconnectionNonSmartRouting(){
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}
Program: 46210
Project: 46210
Buggy source:
private void testListenersTemporaryNetworkBlockage(){
  HazelcastClientInstanceImpl clientInstanceImpl=getHazelcastClientInstanceImpl(client);
  HazelcastInstance server=getOwnerServer(factory,clientInstanceImpl);
  final int clusterSize=factory.getAllHazelcastInstances().size();
  assertClusterSizeEventually(clusterSize,client);
  final AtomicInteger eventCount=new AtomicInteger();
  final String registrationId=addListener(eventCount);
  final boolean smartRouting=clientInstanceImpl.getClientConfig().getNetworkConfig().isSmartRouting();
  final int expectedRegistrationsSize=smartRouting ? clusterSize : 1;
  assertEquals(expectedRegistrationsSize,getClientEventRegistrations(client,registrationId).size());
  long timeout=clientInstanceImpl.getProperties().getMillis(HEARTBEAT_TIMEOUT);
  long heartbeatTimeout=timeout > 0 ? timeout : Integer.parseInt(HEARTBEAT_TIMEOUT.getDefaultValue());
  long waitTime=heartbeatTimeout / 2;
  validateListenerFunctionality(eventCount);
  long endTime=System.currentTimeMillis() + waitTime;
  blockMessagesFromInstance(server,client);
  long sleepTime=endTime - System.currentTimeMillis();
  if (sleepTime > 0) {
    sleepMillis((int)sleepTime);
  }
  unblockMessagesFromInstance(server,client);
  assertEquals(expectedRegistrationsSize,getClientEventRegistrations(client,registrationId).size());
  validateListenerFunctionality(eventCount);
  assertTrue(removeListener(registrationId));
}

Fixed version (ground truth):
private void testListenersTemporaryNetworkBlockage(){
  setupListener();
  HazelcastClientInstanceImpl clientInstanceImpl=getHazelcastClientInstanceImpl(client);
  HazelcastInstance server=getOwnerServer(factory,clientInstanceImpl);
  long timeout=clientInstanceImpl.getProperties().getMillis(HEARTBEAT_TIMEOUT);
  long heartbeatTimeout=timeout > 0 ? timeout : Integer.parseInt(HEARTBEAT_TIMEOUT.getDefaultValue());
  long waitTime=heartbeatTimeout / 2;
  long endTime=System.currentTimeMillis() + waitTime;
  blockMessagesFromInstance(server,client);
  long sleepTime=endTime - System.currentTimeMillis();
  if (sleepTime > 0) {
    sleepMillis((int)sleepTime);
  }
  unblockMessagesFromInstance(server,client);
  validateRegistrationsAndListenerFunctionality();
}
Program: 46211
Project: 46211
Buggy source:
@Test public void testClusterReconnectMultipleServersDueToHeartbeatSmartRouting() throws InterruptedException {
  factory.newInstances(null,3);
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersForHeartbeat();
}

Fixed version (ground truth):
@Test public void testClusterReconnectMultipleServersDueToHeartbeatSmartRouting(){
  factory.newInstances(null,3);
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersHeartbeatTimeoutToOwner();
}
Program: 46212
Project: 46212
Buggy source:
@Test public void testClusterReconnectMultipleServerDueToHeartbeatNonSmartRouting() throws InterruptedException {
  factory.newInstances(null,3);
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersForHeartbeat();
}

Fixed version (ground truth):
@Test public void testClusterReconnectMultipleServerDueToHeartbeatNonSmartRouting(){
  factory.newInstances(null,3);
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersHeartbeatTimeoutToOwner();
}
Program: 46213
Project: 46213
Buggy source:
@Test public void testListenersNonSmartRoutingTerminateRandomNode() throws InterruptedException {
  factory.newHazelcastInstance();
  ClientConfig clientConfig=createClientConfig();
  clientConfig.getNetworkConfig().setSmartRouting(false);
  clientConfig.getNetworkConfig().setConnectionAttemptLimit(Integer.MAX_VALUE);
  client=factory.newHazelcastClient(clientConfig);
  testListenersTerminateRandomNodeInternal();
}

Fixed version (ground truth):
@Test public void testListenersNonSmartRoutingTerminateRandomNode(){
  factory.newInstances(null,3);
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTerminateRandomNode();
}
Program: 46214
Project: 46214
Buggy source:
@Override protected String addListener(final AtomicInteger eventCount){
  iMap=client.getMap(randomString());
  final EntryAdapter<Object,Object> listener=new EntryAdapter<Object,Object>(){
    public void onEntryEvent(    EntryEvent<Object,Object> event){
      eventCount.incrementAndGet();
    }
  }
;
  return iMap.addEntryListener(listener,true);
}

Fixed version (ground truth):
@Override protected String addListener(){
  iMap=client.getMap(randomString());
  final EntryAdapter<Object,Object> listener=new EntryAdapter<Object,Object>(){
    public void onEntryEvent(    EntryEvent<Object,Object> event){
      eventCount.incrementAndGet();
    }
  }
;
  return iMap.addEntryListener(listener,true);
}
Program: 46215
Project: 46215
Buggy source:
@Override protected String addListener(final AtomicInteger eventCount){
  iList=client.getList(randomString());
  ItemListener<String> listener=new ItemListener<String>(){
    @Override public void itemAdded(    ItemEvent item){
      eventCount.incrementAndGet();
    }
    @Override public void itemRemoved(    ItemEvent item){
    }
  }
;
  return iList.addItemListener(listener,true);
}

Fixed version (ground truth):
@Override protected String addListener(){
  iList=client.getList(randomString());
  ItemListener<String> listener=new ItemListener<String>(){
    @Override public void itemAdded(    ItemEvent item){
      eventCount.incrementAndGet();
    }
    @Override public void itemRemoved(    ItemEvent item){
    }
  }
;
  return iList.addItemListener(listener,true);
}
Program: 46216
Project: 46216
Buggy source:
@Override protected String addListener(final AtomicInteger eventCount){
  multiMap=client.getMultiMap(randomString());
  EntryAdapter<String,String> listener=new EntryAdapter<String,String>(){
    @Override public void onEntryEvent(    EntryEvent<String,String> event){
      eventCount.incrementAndGet();
    }
  }
;
  return multiMap.addEntryListener(listener,true);
}

Fixed version (ground truth):
@Override protected String addListener(){
  multiMap=client.getMultiMap(randomString());
  EntryAdapter<String,String> listener=new EntryAdapter<String,String>(){
    @Override public void onEntryEvent(    EntryEvent<String,String> event){
      eventCount.incrementAndGet();
    }
  }
;
  return multiMap.addEntryListener(listener,true);
}
Program: 46217
Project: 46217
Buggy source:
@Override protected String addListener(final AtomicInteger eventCount){
  iQueue=client.getQueue(randomString());
  ItemListener<String> listener=new ItemListener<String>(){
    @Override public void itemAdded(    ItemEvent item){
      eventCount.incrementAndGet();
    }
    @Override public void itemRemoved(    ItemEvent item){
    }
  }
;
  return iQueue.addItemListener(listener,true);
}

Fixed version (ground truth):
@Override protected String addListener(){
  iQueue=client.getQueue(randomString());
  ItemListener<String> listener=new ItemListener<String>(){
    @Override public void itemAdded(    ItemEvent item){
      eventCount.incrementAndGet();
    }
    @Override public void itemRemoved(    ItemEvent item){
    }
  }
;
  return iQueue.addItemListener(listener,true);
}
Program: 46218
Project: 46218
Buggy source:
@Override protected String addListener(final AtomicInteger eventCount){
  replicatedMap=client.getReplicatedMap(randomString());
  final EntryAdapter<String,String> listener=new EntryAdapter<String,String>(){
    @Override public void onEntryEvent(    EntryEvent<String,String> event){
      eventCount.incrementAndGet();
    }
  }
;
  return replicatedMap.addEntryListener(listener);
}

Fixed version (ground truth):
@Override protected String addListener(){
  replicatedMap=client.getReplicatedMap(randomString());
  final EntryAdapter<String,String> listener=new EntryAdapter<String,String>(){
    @Override public void onEntryEvent(    EntryEvent<String,String> event){
      eventCount.incrementAndGet();
    }
  }
;
  return replicatedMap.addEntryListener(listener);
}
Program: 46219
Project: 46219
Buggy source:
@Override protected String addListener(final AtomicInteger eventCount){
  iSet=client.getSet(randomString());
  ItemListener<String> listener=new ItemListener<String>(){
    @Override public void itemAdded(    ItemEvent item){
      eventCount.incrementAndGet();
    }
    @Override public void itemRemoved(    ItemEvent item){
    }
  }
;
  return iSet.addItemListener(listener,true);
}

Fixed version (ground truth):
@Override protected String addListener(){
  iSet=client.getSet(randomString());
  ItemListener<String> listener=new ItemListener<String>(){
    @Override public void itemAdded(    ItemEvent item){
      eventCount.incrementAndGet();
    }
    @Override public void itemRemoved(    ItemEvent item){
    }
  }
;
  return iSet.addItemListener(listener,true);
}
Program: 46220
Project: 46220
Buggy source:
@Override protected String addListener(final AtomicInteger eventCount){
  topic=client.getTopic(randomString());
  MessageListener<String> listener=new MessageListener<String>(){
    @Override public void onMessage(    Message message){
      eventCount.incrementAndGet();
    }
  }
;
  return topic.addMessageListener(listener);
}

Fixed version (ground truth):
@Override protected String addListener(){
  topic=client.getTopic(randomString());
  MessageListener<String> listener=new MessageListener<String>(){
    @Override public void onMessage(    Message message){
      eventCount.incrementAndGet();
    }
  }
;
  return topic.addMessageListener(listener);
}
Program: 46222
Project: 46222
Buggy source:
@Override public void onResponse(ClientMessage response){
  ClientAuthenticationCodec.ResponseParameters result=ClientAuthenticationCodec.decodeResponse(response);
  AuthenticationStatus authenticationStatus=AuthenticationStatus.getById(result.status);
switch (authenticationStatus) {
case AUTHENTICATED:
    if (asOwner) {
      connection.setIsAuthenticatedAsOwner();
      clusterService.setPrincipal(new ClientPrincipal(result.uuid,result.ownerUuid));
    }
  connection.setConnectedServerVersion(result.serverHazelcastVersion);
connection.setClientUnregisteredMembers(result.clientUnregisteredMembers);
connection.setRemoteEndpoint(result.address);
onAuthenticated(target,connection);
callback.onSuccess(connection,asOwner);
break;
case CREDENTIALS_FAILED:
AuthenticationException e=new AuthenticationException("String_Node_Str");
onAuthenticationFailed(target,connection,e);
callback.onFailure(e);
break;
default :
AuthenticationException exception=new AuthenticationException("String_Node_Str" + authenticationStatus);
onAuthenticationFailed(target,connection,exception);
callback.onFailure(exception);
}
}

Fixed version (ground truth):
@Override public void onResponse(ClientMessage response){
  ClientAuthenticationCodec.ResponseParameters result=ClientAuthenticationCodec.decodeResponse(response);
  AuthenticationStatus authenticationStatus=AuthenticationStatus.getById(result.status);
switch (authenticationStatus) {
case AUTHENTICATED:
    connection.setConnectedServerVersion(result.serverHazelcastVersion);
  connection.setClientUnregisteredMembers(result.clientUnregisteredMembers);
connection.setRemoteEndpoint(result.address);
if (asOwner) {
if (!(correlationIddOfLastAuthentication.get() == response.getCorrelationId())) {
  onFailure(new AuthenticationException("String_Node_Str" + target + "String_Node_Str"+ principal));
  return;
}
connection.setIsAuthenticatedAsOwner();
ClientPrincipal principal=new ClientPrincipal(result.uuid,result.ownerUuid);
clusterService.setPrincipal(principal);
clusterService.setOwnerConnectionAddress(connection.getEndPoint());
logger.info("String_Node_Str" + connection + "String_Node_Str"+ principal);
}
onAuthenticated(target,connection);
callback.onSuccess(connection,asOwner);
break;
case CREDENTIALS_FAILED:
onFailure(new AuthenticationException("String_Node_Str" + principal));
break;
default :
onFailure(new AuthenticationException("String_Node_Str" + authenticationStatus));
}
}
Program: 46223
Project: 46223
Buggy source:
protected boolean shouldRetry(){
  return System.currentTimeMillis() < retryTimeoutPointInMillis;
}

Fixed version (ground truth):
private boolean shouldRetry(){
  return System.currentTimeMillis() < retryTimeoutPointInMillis;
}
Program: 46224
Project: 46224
Buggy source:
private boolean connect(Set<InetSocketAddress> triedAddresses) throws Exception {
  final Collection<InetSocketAddress> socketAddresses=getSocketAddresses();
  for (  InetSocketAddress inetSocketAddress : socketAddresses) {
    if (!client.getLifecycleService().isRunning()) {
      if (logger.isFinestEnabled()) {
        logger.finest("String_Node_Str");
      }
      break;
    }
    Connection connection=null;
    try {
      triedAddresses.add(inetSocketAddress);
      Address address=new Address(inetSocketAddress);
      if (logger.isFinestEnabled()) {
        logger.finest("String_Node_Str" + address);
      }
      connection=connectionManager.getOrConnect(address,true);
      ownerConnectionAddress=connection.getEndPoint();
      clientMembershipListener.listenMembershipEvents(ownerConnectionAddress);
      client.getListenerService().onClusterConnect((ClientConnection)connection);
      fireConnectionEvent(LifecycleEvent.LifecycleState.CLIENT_CONNECTED);
      return true;
    }
 catch (    Exception e) {
      Level level=e instanceof AuthenticationException ? Level.WARNING : Level.FINEST;
      logger.log(level,"String_Node_Str" + inetSocketAddress,e);
      if (null != connection) {
        connection.close("String_Node_Str" + inetSocketAddress + "String_Node_Str",e);
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean connect(Set<InetSocketAddress> triedAddresses) throws Exception {
  final Collection<InetSocketAddress> socketAddresses=getSocketAddresses();
  for (  InetSocketAddress inetSocketAddress : socketAddresses) {
    if (!client.getLifecycleService().isRunning()) {
      if (logger.isFinestEnabled()) {
        logger.finest("String_Node_Str");
      }
      break;
    }
    Connection connection=null;
    try {
      triedAddresses.add(inetSocketAddress);
      Address address=new Address(inetSocketAddress);
      logger.info("String_Node_Str" + address + "String_Node_Str");
      connection=connectionManager.getOrConnect(address,true);
      clientMembershipListener.listenMembershipEvents(ownerConnectionAddress);
      client.getListenerService().onClusterConnect((ClientConnection)connection);
      fireConnectionEvent(LifecycleEvent.LifecycleState.CLIENT_CONNECTED);
      return true;
    }
 catch (    Exception e) {
      Level level=e instanceof AuthenticationException ? Level.WARNING : Level.FINEST;
      logger.log(level,"String_Node_Str" + inetSocketAddress,e);
      if (null != connection) {
        connection.close("String_Node_Str" + inetSocketAddress + "String_Node_Str",e);
      }
    }
  }
  return false;
}
Program: 46225
Project: 46225
Buggy source:
@Override public void run() throws Exception {
  Member instance2Member=instance2.getCluster().getLocalMember();
  Set<Partition> partitions=client.getPartitionService().getPartitions();
  boolean found=false;
  for (  Partition p : partitions) {
    if (p.getOwner().equals(instance2Member)) {
      found=true;
      break;
    }
  }
  assertTrue(found);
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  String uuid=instance3.getLocalEndpoint().getUuid();
  assertEquals(uuid,getClientEngineImpl(instance3).getOwnerUuid(client.getLocalEndpoint().getUuid()));
  assertEquals(uuid,getClientEngineImpl(instance2).getOwnerUuid(client.getLocalEndpoint().getUuid()));
  assertEquals(uuid,clientClusterService.getPrincipal().getOwnerUuid());
  assertEquals(instance3.getCluster().getLocalMember().getAddress(),clientClusterService.getOwnerConnectionAddress());
}
Program: 46226
Project: 46226
Buggy source:
public boolean removeOwnershipMapping(String clientUuid,String memberUuid){
  return ownershipMappings.remove(clientUuid,memberUuid);
}

Fixed version (ground truth):
public boolean removeOwnershipMapping(String clientUuid,String memberUuid){
  lastAuthenticationCorrelationIds.remove(clientUuid);
  return ownershipMappings.remove(clientUuid,memberUuid);
}
Program: 46227
Project: 46227
Buggy source:
public ReAuthenticationOperationSupplier(String uuid){
  this.uuid=uuid;
}

Fixed version (ground truth):
public ReAuthenticationOperationSupplier(String uuid,long authCorrelationId){
  this.uuid=uuid;
  this.authCorrelationId=authCorrelationId;
}
Program: 46228
Project: 46228
Buggy source:
@Override public Operation get(){
  return new ClientReAuthOperation(uuid);
}

Fixed version (ground truth):
@Override public Operation get(){
  return new ClientReAuthOperation(uuid,authCorrelationId);
}
Program: 46229
Project: 46229
Buggy source:
public ClientReAuthOperation(String clientUuid){
  this.clientUuid=clientUuid;
}

Fixed version (ground truth):
public ClientReAuthOperation(String clientUuid,long authCorrelationId){
  this.clientUuid=clientUuid;
  this.authCorrelationId=authCorrelationId;
}
Program: 46230
Project: 46230
Buggy source:
@Override public void run() throws Exception {
  String memberUuid=getCallerUuid();
  ClientEngineImpl engine=getService();
  Set<ClientEndpoint> endpoints=engine.getEndpointManager().getEndpoints(clientUuid);
  for (  ClientEndpoint endpoint : endpoints) {
    ClientPrincipal principal=new ClientPrincipal(clientUuid,memberUuid);
    endpoint.authenticated(principal);
  }
  String previousMemberUuid=engine.addOwnershipMapping(clientUuid,memberUuid);
  clientDisconnectOperationRun=previousMemberUuid == null;
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  ClientEngineImpl engine=getService();
  String memberUuid=getCallerUuid();
  if (!engine.trySetLastAuthenticationCorrelationId(clientUuid,authCorrelationId)) {
    String message="String_Node_Str" + clientUuid + "String_Node_Str"+ memberUuid;
    getLogger().info(message);
    throw new AuthenticationException(message);
  }
  Set<ClientEndpoint> endpoints=engine.getEndpointManager().getEndpoints(clientUuid);
  for (  ClientEndpoint endpoint : endpoints) {
    ClientPrincipal principal=new ClientPrincipal(clientUuid,memberUuid);
    endpoint.authenticated(principal);
  }
  String previousMemberUuid=engine.addOwnershipMapping(clientUuid,memberUuid);
  clientDisconnectOperationRun=previousMemberUuid == null;
}
Program: 46231
Project: 46231
Buggy source:
@Override protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  clientUuid=in.readUTF();
}

Fixed version (ground truth):
@Override protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  clientUuid=in.readUTF();
  authCorrelationId=in.readLong();
}
Program: 46232
Project: 46232
Buggy source:
@Override protected void writeInternal(ObjectDataOutput out) throws IOException {
  super.writeInternal(out);
  out.writeUTF(clientUuid);
}

Fixed version (ground truth):
@Override protected void writeInternal(ObjectDataOutput out) throws IOException {
  super.writeInternal(out);
  out.writeUTF(clientUuid);
  out.writeLong(authCorrelationId);
}
Program: 46233
Project: 46233
Buggy source:
@Override protected Object reduce(Map<Member,Object> map) throws Throwable {
  for (  Map.Entry<Member,Object> entry : map.entrySet()) {
    Member member=entry.getKey();
    Object response=entry.getValue();
    if (response instanceof Throwable) {
      if (response instanceof MemberLeftException) {
        cleanedUpMembers.add(member);
        continue;
      }
      logger.warning("String_Node_Str" + member,(Throwable)response);
      return prepareUnauthenticatedClientMessage();
    }
    boolean isClientDisconnectOperationRun=(Boolean)response;
    if (isClientDisconnectOperationRun) {
      cleanedUpMembers.add(member);
    }
  }
  return prepareAuthenticatedClientMessage();
}

Fixed version (ground truth):
@Override protected Object reduce(Map<Member,Object> map) throws Throwable {
  for (  Map.Entry<Member,Object> entry : map.entrySet()) {
    Member member=entry.getKey();
    Object response=entry.getValue();
    if (response instanceof Throwable) {
      if (response instanceof MemberLeftException) {
        cleanedUpMembers.add(member);
        continue;
      }
      throw (Throwable)response;
    }
    boolean isClientDisconnectOperationRun=(Boolean)response;
    if (isClientDisconnectOperationRun) {
      cleanedUpMembers.add(member);
    }
  }
  return prepareAuthenticatedClientMessage();
}
Program: 46234
Project: 46234
Buggy source:
private ClientMessage prepareAuthenticatedClientMessage(){
  Connection connection=endpoint.getConnection();
  ILogger logger=clientEngine.getLogger(getClass());
  endpoint.authenticated(principal,credentials,isOwnerConnection(),clientVersion);
  setConnectionType();
  logger.log(Level.INFO,"String_Node_Str" + connection + "String_Node_Str"+ "String_Node_Str"+ principal+ "String_Node_Str"+ isOwnerConnection()+ "String_Node_Str"+ clientVersion);
  endpointManager.registerEndpoint(endpoint);
  clientEngine.bind(endpoint);
  final Address thisAddress=clientEngine.getThisAddress();
  byte status=AuthenticationStatus.AUTHENTICATED.getId();
  return encodeAuth(status,thisAddress,principal.getUuid(),principal.getOwnerUuid(),serializationService.getVersion(),cleanedUpMembers);
}

Fixed version (ground truth):
private ClientMessage prepareAuthenticatedClientMessage(){
  Connection connection=endpoint.getConnection();
  ILogger logger=clientEngine.getLogger(getClass());
  endpoint.authenticated(principal,credentials,isOwnerConnection(),clientVersion);
  setConnectionType();
  logger.info("String_Node_Str" + connection + "String_Node_Str"+ "String_Node_Str"+ principal+ "String_Node_Str"+ isOwnerConnection()+ "String_Node_Str"+ clientVersion);
  endpointManager.registerEndpoint(endpoint);
  clientEngine.bind(endpoint);
  final Address thisAddress=clientEngine.getThisAddress();
  byte status=AuthenticationStatus.AUTHENTICATED.getId();
  return encodeAuth(status,thisAddress,principal.getUuid(),principal.getOwnerUuid(),serializationService.getVersion(),cleanedUpMembers);
}
Program: 46235
Project: 46235
Buggy source:
@Override protected Supplier<Operation> createOperationSupplier(){
  return new ReAuthenticationOperationSupplier(getUuid());
}

Fixed version (ground truth):
@Override protected Supplier<Operation> createOperationSupplier(){
  return new ReAuthenticationOperationSupplier(getUuid(),clientMessage.getCorrelationId());
}
Program: 46236
Project: 46236
Buggy source:
private URL newGetTaskUrl() throws MalformedURLException {
  GroupConfig groupConfig=instance.getConfig().getGroupConfig();
  Address localAddress=instance.node.getClusterService().getLocalMember().getAddress();
  String urlString=cleanupUrl(managementCenterUrl) + "String_Node_Str" + localAddress.getHost()+ "String_Node_Str"+ localAddress.getPort()+ "String_Node_Str"+ groupConfig.getName();
  return new URL(urlString);
}

Fixed version (ground truth):
private URL newGetTaskUrl() throws IOException {
  GroupConfig groupConfig=instance.getConfig().getGroupConfig();
  Address localAddress=instance.node.getClusterService().getLocalMember().getAddress();
  String urlString=cleanupUrl(managementCenterUrl) + "String_Node_Str" + localAddress.getHost()+ "String_Node_Str"+ localAddress.getPort()+ "String_Node_Str"+ encode(groupConfig.getName(),"String_Node_Str");
  return new URL(urlString);
}
Program: 46237
Project: 46237
Buggy source:
private Config getManagementCenterConfig(){
  Config config=new Config();
  config.getManagementCenterConfig().setEnabled(true);
  config.getManagementCenterConfig().setUrl(format("String_Node_Str",portNum,"String_Node_Str"));
  return config;
}

Fixed version (ground truth):
private Config getManagementCenterConfig(){
  Config config=new Config();
  config.getGroupConfig().setName("String_Node_Str").setPassword("String_Node_Str");
  config.getManagementCenterConfig().setEnabled(true);
  config.getManagementCenterConfig().setUrl(format("String_Node_Str",portNum,"String_Node_Str"));
  return config;
}
Program: 46238
Project: 46238
Buggy source:
@Override public void run() throws Exception {
  CloseableHttpClient client=HttpClientBuilder.create().disableRedirectHandling().build();
  HttpUriRequest request=new HttpGet("String_Node_Str" + portNum + "String_Node_Str");
  HttpResponse response=client.execute(request);
  HttpEntity entity=response.getEntity();
  String responseString=EntityUtils.toString(entity);
  assertNotEquals("String_Node_Str",responseString);
  JsonObject object=JsonObject.readFrom(responseString);
  TimedMemberState memberState=new TimedMemberState();
  memberState.fromJson(object);
  assertEquals("String_Node_Str",memberState.getClusterName());
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  CloseableHttpClient client=HttpClientBuilder.create().disableRedirectHandling().build();
  HttpUriRequest request=new HttpGet("String_Node_Str" + portNum + "String_Node_Str");
  HttpResponse response=client.execute(request);
  HttpEntity entity=response.getEntity();
  String responseString=EntityUtils.toString(entity);
  assertEquals("String_Node_Str",responseString);
}
Program: 46239
Project: 46239
Buggy source:
@Override protected void doGet(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  if (req.getPathInfo().contains("String_Node_Str")) {
    if (memberState != null) {
      resp.getWriter().write(memberState.toJson().toString());
    }
 else {
      resp.getWriter().write("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override protected void doGet(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  if (req.getPathInfo().contains("String_Node_Str")) {
    if (memberState != null) {
      resp.getWriter().write(memberState.toJson().toString());
    }
 else {
      resp.getWriter().write("String_Node_Str");
    }
  }
 else   if (req.getPathInfo().contains("String_Node_Str")) {
    clusterName=req.getParameter("String_Node_Str");
    resp.getWriter().write("String_Node_Str");
  }
 else   if (req.getPathInfo().contains("String_Node_Str")) {
    resp.getWriter().write(clusterName);
  }
}
Program: 46240
Project: 46240
Buggy source:
@Test public void testListenersSmartRoutingTerminateRandomNode() throws InterruptedException {
  factory.newHazelcastInstance();
  ClientConfig clientConfig=createClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTerminateRandomNodeInternal();
}

Fixed version (ground truth):
@Test public void testListenersSmartRoutingTerminateRandomNode(){
  factory.newInstances(null,3);
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTerminateRandomNode();
}
Program: 46241
Project: 46241
Buggy source:
@Test public void testListenersNonSmartRouting() throws InterruptedException {
  factory.newHazelcastInstance();
  ClientConfig clientConfig=createClientConfig();
  clientConfig.getNetworkConfig().setSmartRouting(false);
  clientConfig.getNetworkConfig().setConnectionAttemptLimit(Integer.MAX_VALUE);
  client=factory.newHazelcastClient(clientConfig);
  testListenersInternal();
}

Fixed version (ground truth):
@Test public void testListenersNonSmartRouting(){
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTerminateOwnerNode();
}
Program: 46242
Project: 46242
Buggy source:
@Test public void testListenersNonSmartRoutingMultipleServer() throws InterruptedException {
  factory.newInstances(null,3);
  ClientConfig clientConfig=createClientConfig();
  clientConfig.getNetworkConfig().setSmartRouting(false);
  client=factory.newHazelcastClient(clientConfig);
  testListenersInternal();
}

Fixed version (ground truth):
@Test public void testListenersNonSmartRoutingMultipleServer(){
  factory.newInstances(null,3);
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTerminateOwnerNode();
}
Program: 46243
Project: 46243
Buggy source:
private void testListenersWaitMemberDestroy() throws InterruptedException {
  Collection<HazelcastInstance> allHazelcastInstances=factory.getAllHazelcastInstances();
  final int clusterSize=allHazelcastInstances.size();
  assertClusterSizeEventually(clusterSize,client);
  final AtomicInteger eventCount=new AtomicInteger();
  final String registrationId=addListener(eventCount);
  final CountDownLatch disconnectedLatch=new CountDownLatch(1);
  final CountDownLatch connectedLatch=new CountDownLatch(1);
  client.getLifecycleService().addLifecycleListener(new LifecycleListener(){
    @Override public void stateChanged(    LifecycleEvent event){
      if (LifecycleEvent.LifecycleState.CLIENT_DISCONNECTED == event.getState()) {
        disconnectedLatch.countDown();
      }
      if (LifecycleEvent.LifecycleState.CLIENT_CONNECTED == event.getState()) {
        connectedLatch.countDown();
      }
    }
  }
);
  HazelcastClientInstanceImpl clientInstanceImpl=getHazelcastClientInstanceImpl(client);
  HazelcastInstance ownerMember=getOwnerServer(factory,clientInstanceImpl);
  for (  HazelcastInstance member : allHazelcastInstances) {
    blockMessagesFromInstance(member,client);
  }
  ownerMember.getLifecycleService().terminate();
  for (  HazelcastInstance member : allHazelcastInstances) {
    unblockMessagesFromInstance(member,client);
  }
  assertTrue(disconnectedLatch.await(30,TimeUnit.SECONDS));
  assertTrue(connectedLatch.await(30,TimeUnit.SECONDS));
  sleepAtLeastMillis(ENDPOINT_REMOVE_DELAY_MILLISECONDS + 2000);
  validateRegistrations(clusterSize - 1,registrationId,clientInstanceImpl);
  validateListenerFunctionality(eventCount);
  assertTrue(removeListener(registrationId));
}

Fixed version (ground truth):
private void testListenersWaitMemberDestroy(){
  setupListener();
  Collection<HazelcastInstance> allHazelcastInstances=factory.getAllHazelcastInstances();
  final CountDownLatch disconnectedLatch=new CountDownLatch(1);
  final CountDownLatch connectedLatch=new CountDownLatch(1);
  client.getLifecycleService().addLifecycleListener(new LifecycleListener(){
    @Override public void stateChanged(    LifecycleEvent event){
      if (LifecycleEvent.LifecycleState.CLIENT_DISCONNECTED == event.getState()) {
        disconnectedLatch.countDown();
      }
      if (LifecycleEvent.LifecycleState.CLIENT_CONNECTED == event.getState()) {
        connectedLatch.countDown();
      }
    }
  }
);
  HazelcastClientInstanceImpl clientInstanceImpl=getHazelcastClientInstanceImpl(client);
  HazelcastInstance ownerMember=getOwnerServer(factory,clientInstanceImpl);
  for (  HazelcastInstance member : allHazelcastInstances) {
    blockMessagesFromInstance(member,client);
  }
  ownerMember.getLifecycleService().terminate();
  for (  HazelcastInstance member : allHazelcastInstances) {
    unblockMessagesFromInstance(member,client);
  }
  assertOpenEventually(disconnectedLatch);
  assertOpenEventually(connectedLatch);
  sleepAtLeastMillis(ENDPOINT_REMOVE_DELAY_MILLISECONDS + 2000);
  clusterSize=clusterSize - 1;
  validateRegistrationsAndListenerFunctionality();
}
Program: 46244
Project: 46244
Buggy source:
private ClientConfig getSmartClientConfig(){
  ClientConfig clientConfig=createClientConfig();
  clientConfig.getNetworkConfig().setConnectionAttemptLimit(20).setConnectionAttemptPeriod(2000);
  clientConfig.setProperty(ClientProperty.HEARTBEAT_TIMEOUT.getName(),"String_Node_Str");
  clientConfig.setProperty(ClientProperty.HEARTBEAT_INTERVAL.getName(),"String_Node_Str");
  return clientConfig;
}

Fixed version (ground truth):
private ClientConfig getSmartClientConfig(){
  ClientConfig clientConfig=new ClientConfig();
  clientConfig.getNetworkConfig().setConnectionAttemptLimit(Integer.MAX_VALUE);
  clientConfig.getNetworkConfig().setRedoOperation(true);
  clientConfig.setProperty(ClientProperty.HEARTBEAT_TIMEOUT.getName(),"String_Node_Str");
  clientConfig.setProperty(ClientProperty.HEARTBEAT_INTERVAL.getName(),"String_Node_Str");
  return clientConfig;
}
Program: 46245
Project: 46245
Buggy source:
@Test public void testClusterReconnectDueToHeartbeatSmartRouting() throws InterruptedException {
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersForHeartbeat();
}

Fixed version (ground truth):
@Test public void testClusterReconnectDueToHeartbeatSmartRouting(){
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersHeartbeatTimeoutToOwner();
}
Program: 46246
Project: 46246
Buggy source:
@Test public void testTemporaryBlockedNoDisconnectionMultipleServerSmartRouting() throws InterruptedException {
  factory.newInstances(null,3);
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}

Fixed version (ground truth):
@Test public void testTemporaryBlockedNoDisconnectionMultipleServerSmartRouting(){
  factory.newInstances(null,3);
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}
Program: 46247
Project: 46247
Buggy source:
@Test public void testTemporaryBlockedNoDisconnectionMultipleServerNonSmartRouting() throws InterruptedException {
  factory.newInstances(null,3);
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}

Fixed version (ground truth):
@Test public void testTemporaryBlockedNoDisconnectionMultipleServerNonSmartRouting(){
  factory.newInstances(null,3);
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}
Program: 46248
Project: 46248
Buggy source:
protected abstract String addListener(final AtomicInteger eventCount);

Fixed version (ground truth):
protected abstract String addListener();
Program: 46249
Project: 46249
Buggy source:
private void validateListenerFunctionality(final AtomicInteger eventCount){
  eventCount.set(0);
  for (int i=0; i < EVENT_COUNT; i++) {
    produceEvent();
  }
  assertTrueEventually(new AssertTask(){
    @Override public void run() throws Exception {
      int count=eventCount.get();
      assertTrue("String_Node_Str" + count + "String_Node_Str"+ EVENT_COUNT,count >= EVENT_COUNT);
    }
  }
,5);
  assertTrueAllTheTime(new AssertTask(){
    @Override public void run() throws Exception {
      int count=eventCount.get();
      assertEquals("String_Node_Str" + count + "String_Node_Str"+ EVENT_COUNT,EVENT_COUNT,eventCount.get());
    }
  }
,3);
}

Fixed version (ground truth):
private void validateListenerFunctionality(){
  for (int i=0; i < EVENT_COUNT; i++) {
    produceEvent();
  }
  assertTrueEventually(new AssertTask(){
    @Override public void run() throws Exception {
      int count=eventCount.get();
      assertTrue("String_Node_Str" + count + "String_Node_Str"+ EVENT_COUNT,count >= EVENT_COUNT);
    }
  }
);
  assertTrueAllTheTime(new AssertTask(){
    @Override public void run() throws Exception {
      int count=eventCount.get();
      assertEquals("String_Node_Str" + count + "String_Node_Str"+ EVENT_COUNT,EVENT_COUNT,eventCount.get());
    }
  }
,3);
}
Program: 46250
Project: 46250
Buggy source:
@Test public void testListenersSmartRouting() throws InterruptedException {
  factory.newHazelcastInstance();
  ClientConfig clientConfig=createClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersInternal();
}

Fixed version (ground truth):
@Test public void testListenersSmartRouting(){
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTerminateOwnerNode();
}
Program: 46251
Project: 46251
Buggy source:
@Test public void testTemporaryBlockedNoDisconnectionSmartRouting() throws InterruptedException {
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}

Fixed version (ground truth):
@Test public void testTemporaryBlockedNoDisconnectionSmartRouting(){
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}
Program: 46252
Project: 46252
Buggy source:
@Test public void testClusterReconnectDueToHeartbeatNonSmartRouting() throws InterruptedException {
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersForHeartbeat();
}

Fixed version (ground truth):
@Test public void testClusterReconnectDueToHeartbeatNonSmartRouting(){
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersHeartbeatTimeoutToOwner();
}
Program: 46253
Project: 46253
Buggy source:
@Test public void testListenersSmartRoutingMultipleServer() throws InterruptedException {
  factory.newInstances(null,3);
  ClientConfig clientConfig=createClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersInternal();
}

Fixed version (ground truth):
@Test public void testListenersSmartRoutingMultipleServer(){
  factory.newInstances(null,3);
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTerminateOwnerNode();
}
Program: 46254
Project: 46254
Buggy source:
@Test public void testTemporaryBlockedNoDisconnectionNonSmartRouting() throws InterruptedException {
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}

Fixed version (ground truth):
@Test public void testTemporaryBlockedNoDisconnectionNonSmartRouting(){
  factory.newHazelcastInstance();
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTemporaryNetworkBlockage();
}
Program: 46255
Project: 46255
Buggy source:
private void testListenersTemporaryNetworkBlockage(){
  HazelcastClientInstanceImpl clientInstanceImpl=getHazelcastClientInstanceImpl(client);
  HazelcastInstance server=getOwnerServer(factory,clientInstanceImpl);
  final int clusterSize=factory.getAllHazelcastInstances().size();
  assertClusterSizeEventually(clusterSize,client);
  final AtomicInteger eventCount=new AtomicInteger();
  final String registrationId=addListener(eventCount);
  final boolean smartRouting=clientInstanceImpl.getClientConfig().getNetworkConfig().isSmartRouting();
  final int expectedRegistrationsSize=smartRouting ? clusterSize : 1;
  assertEquals(expectedRegistrationsSize,getClientEventRegistrations(client,registrationId).size());
  long timeout=clientInstanceImpl.getProperties().getMillis(HEARTBEAT_TIMEOUT);
  long heartbeatTimeout=timeout > 0 ? timeout : Integer.parseInt(HEARTBEAT_TIMEOUT.getDefaultValue());
  long waitTime=heartbeatTimeout / 2;
  validateListenerFunctionality(eventCount);
  long endTime=System.currentTimeMillis() + waitTime;
  blockMessagesFromInstance(server,client);
  long sleepTime=endTime - System.currentTimeMillis();
  if (sleepTime > 0) {
    sleepMillis((int)sleepTime);
  }
  unblockMessagesFromInstance(server,client);
  assertEquals(expectedRegistrationsSize,getClientEventRegistrations(client,registrationId).size());
  validateListenerFunctionality(eventCount);
  assertTrue(removeListener(registrationId));
}

Fixed version (ground truth):
private void testListenersTemporaryNetworkBlockage(){
  setupListener();
  HazelcastClientInstanceImpl clientInstanceImpl=getHazelcastClientInstanceImpl(client);
  HazelcastInstance server=getOwnerServer(factory,clientInstanceImpl);
  long timeout=clientInstanceImpl.getProperties().getMillis(HEARTBEAT_TIMEOUT);
  long heartbeatTimeout=timeout > 0 ? timeout : Integer.parseInt(HEARTBEAT_TIMEOUT.getDefaultValue());
  long waitTime=heartbeatTimeout / 2;
  long endTime=System.currentTimeMillis() + waitTime;
  blockMessagesFromInstance(server,client);
  long sleepTime=endTime - System.currentTimeMillis();
  if (sleepTime > 0) {
    sleepMillis((int)sleepTime);
  }
  unblockMessagesFromInstance(server,client);
  validateRegistrationsAndListenerFunctionality();
}
Program: 46256
Project: 46256
Buggy source:
@Test public void testClusterReconnectMultipleServersDueToHeartbeatSmartRouting() throws InterruptedException {
  factory.newInstances(null,3);
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersForHeartbeat();
}

Fixed version (ground truth):
@Test public void testClusterReconnectMultipleServersDueToHeartbeatSmartRouting(){
  factory.newInstances(null,3);
  ClientConfig clientConfig=getSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersHeartbeatTimeoutToOwner();
}
Program: 46257
Project: 46257
Buggy source:
@Test public void testClusterReconnectMultipleServerDueToHeartbeatNonSmartRouting() throws InterruptedException {
  factory.newInstances(null,3);
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersForHeartbeat();
}

Fixed version (ground truth):
@Test public void testClusterReconnectMultipleServerDueToHeartbeatNonSmartRouting(){
  factory.newInstances(null,3);
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersHeartbeatTimeoutToOwner();
}
Program: 46258
Project: 46258
Buggy source:
@Test public void testListenersNonSmartRoutingTerminateRandomNode() throws InterruptedException {
  factory.newHazelcastInstance();
  ClientConfig clientConfig=createClientConfig();
  clientConfig.getNetworkConfig().setSmartRouting(false);
  clientConfig.getNetworkConfig().setConnectionAttemptLimit(Integer.MAX_VALUE);
  client=factory.newHazelcastClient(clientConfig);
  testListenersTerminateRandomNodeInternal();
}

Fixed version (ground truth):
@Test public void testListenersNonSmartRoutingTerminateRandomNode(){
  factory.newInstances(null,3);
  ClientConfig clientConfig=getNonSmartClientConfig();
  client=factory.newHazelcastClient(clientConfig);
  testListenersTerminateRandomNode();
}
Program: 46259
Project: 46259
Buggy source:
@Override protected String addListener(final AtomicInteger eventCount){
  iMap=client.getMap(randomString());
  final EntryAdapter<Object,Object> listener=new EntryAdapter<Object,Object>(){
    public void onEntryEvent(    EntryEvent<Object,Object> event){
      eventCount.incrementAndGet();
    }
  }
;
  return iMap.addEntryListener(listener,true);
}

Fixed version (ground truth):
@Override protected String addListener(){
  iMap=client.getMap(randomString());
  final EntryAdapter<Object,Object> listener=new EntryAdapter<Object,Object>(){
    public void onEntryEvent(    EntryEvent<Object,Object> event){
      eventCount.incrementAndGet();
    }
  }
;
  return iMap.addEntryListener(listener,true);
}