nus-yam/ex-repair huggingface dataset:
Program: 46587
Project: 46587
Buggy source:
@Test public void executionCallback_FailOnShutdown(){
  HazelcastInstance server=hazelcastFactory.newHazelcastInstance();
  HazelcastInstance client=hazelcastFactory.newHazelcastClient();
  final CountDownLatch disconnectedLatch=new CountDownLatch(1);
  IMap<Object,Object> map=client.getMap(randomName());
  client.getLifecycleService().addLifecycleListener(new LifecycleListener(){
    @Override public void stateChanged(    LifecycleEvent event){
      if (event.getState() == LifecycleEvent.LifecycleState.CLIENT_DISCONNECTED) {
        disconnectedLatch.countDown();
      }
    }
  }
);
  server.shutdown();
  assertOpenEventually(disconnectedLatch);
  final CountDownLatch shutdownLatch=new CountDownLatch(1);
  int n=100;
  final CountDownLatch errorLatch=new CountDownLatch(n);
  for (int i=0; i < n; i++) {
    map.submitToKey(randomString(),new DummyEntryProcessor(),new ExecutionCallback(){
      @Override public void onResponse(      Object response){
      }
      @Override public void onFailure(      Throwable t){
        if (t instanceof HazelcastClientNotActiveException) {
          shutdownLatch.countDown();
        }
        errorLatch.countDown();
      }
    }
);
  }
  assertOpenEventually("String_Node_Str",shutdownLatch);
  assertOpenEventually("String_Node_Str",errorLatch);
}

Fixed version (ground truth):
@Test public void executionCallback_FailOnShutdown(){
  HazelcastInstance server=hazelcastFactory.newHazelcastInstance();
  HazelcastInstance client=hazelcastFactory.newHazelcastClient();
  final CountDownLatch disconnectedLatch=new CountDownLatch(1);
  IMap<Object,Object> map=client.getMap(randomName());
  client.getLifecycleService().addLifecycleListener(new LifecycleListener(){
    @Override public void stateChanged(    LifecycleEvent event){
      if (event.getState() == LifecycleEvent.LifecycleState.CLIENT_DISCONNECTED) {
        disconnectedLatch.countDown();
      }
    }
  }
);
  server.shutdown();
  assertOpenEventually(disconnectedLatch);
  final CountDownLatch shutdownLatch=new CountDownLatch(1);
  int n=100;
  final CountDownLatch errorLatch=new CountDownLatch(n);
  for (int i=0; i < n; i++) {
    map.submitToKey(randomString(),new DummyEntryProcessor(),new ExecutionCallback(){
      @Override public void onResponse(      Object response){
      }
      @Override public void onFailure(      Throwable t){
        if (t.getCause() instanceof HazelcastClientNotActiveException) {
          shutdownLatch.countDown();
        }
        errorLatch.countDown();
      }
    }
);
  }
  assertOpenEventually("String_Node_Str",shutdownLatch);
  assertOpenEventually("String_Node_Str",errorLatch);
}
Program: 46588
Project: 46588
Buggy source:
@Override public final void run(){
  nodeExtension.onThreadStart(this);
  try {
    doRun();
  }
 catch (  InterruptedException e) {
    EmptyStatement.ignore(e);
  }
catch (  Throwable t) {
    inspectOutputMemoryError(t);
    logger.severe(t);
  }
 finally {
    nodeExtension.onThreadStop(this);
  }
}

Fixed version (ground truth):
@Override public final void run(){
  nodeExtension.onThreadStart(this);
  try {
    doRun();
  }
 catch (  Throwable t) {
    inspectOutputMemoryError(t);
    logger.severe(t);
  }
 finally {
    nodeExtension.onThreadStop(this);
  }
}
Program: 46589
Project: 46589
Buggy source:
private void doRun() throws Exception {
  while (!shutdown) {
    Object task=queue.take();
    processedTotal.inc();
    if (task.getClass() == Packet.class) {
      processPacket((Packet)task);
    }
 else     if (task instanceof Operation) {
      processOperation((Operation)task);
    }
 else     if (task instanceof PartitionSpecificRunnable) {
      processPartitionSpecificRunnable((PartitionSpecificRunnable)task);
    }
 else     if (task instanceof Runnable) {
      processRunnable((Runnable)task);
    }
 else {
      throw new IllegalStateException("String_Node_Str" + task);
    }
  }
}

Fixed version (ground truth):
private void doRun(){
  while (!shutdown) {
    Object task;
    try {
      task=queue.take();
    }
 catch (    InterruptedException e) {
      continue;
    }
    processedTotal.inc();
    if (task.getClass() == Packet.class) {
      processPacket((Packet)task);
    }
 else     if (task instanceof Operation) {
      processOperation((Operation)task);
    }
 else     if (task instanceof PartitionSpecificRunnable) {
      processPartitionSpecificRunnable((PartitionSpecificRunnable)task);
    }
 else     if (task instanceof Runnable) {
      processRunnable((Runnable)task);
    }
 else {
      throw new IllegalStateException("String_Node_Str" + task);
    }
  }
}
Program: 46590
Project: 46590
Buggy source:
/** 
 * Gets the call timeout in milliseconds. For example, if a call should be executed within 60 seconds orotherwise it should be aborted, then the call-timeout is 60000 milliseconds. For more information about the default value, see  {@link com.hazelcast.instance.GroupProperties#OPERATION_CALL_TIMEOUT_MILLIS}
 * @return the call timeout in milliseconds.
 * @see #setCallTimeout(long)
 * @see com.hazelcast.spi.OperationAccessor#setCallTimeout(Operation,long)
 */
public final long getCallTimeout(){
  return callTimeout;
}

Fixed version (ground truth):
/** 
 * Gets the call timeout in milliseconds. For example, if a call should be executed within 60 seconds orotherwise it should be aborted, then the call-timeout is 60000 milliseconds. For more information about the default value, see  {@link com.hazelcast.instance.GroupProperty#OPERATION_CALL_TIMEOUT_MILLIS}
 * @return the call timeout in milliseconds.
 * @see #setCallTimeout(long)
 * @see com.hazelcast.spi.OperationAccessor#setCallTimeout(Operation,long)
 */
public final long getCallTimeout(){
  return callTimeout;
}
Program: 46591
Project: 46591
Buggy source:
/** 
 * Allocate a new slot array with the requested size and move all the assigned slots from the current array into the new one.
 */
private void resizeTo(long newCapacity){
  final long oldCapacity=capacity();
  final long oldAllocatedSize=HEADER_SIZE + oldCapacity * slotLength;
  final MemoryAllocator oldMalloc;
  final long oldAddress;
  if (auxMalloc != null) {
    oldAddress=move(baseAddress,oldCapacity,malloc,auxMalloc);
    oldMalloc=auxMalloc;
    auxAllocateAndAdjustFields(oldAddress,oldCapacity,newCapacity);
  }
 else {
    oldMalloc=malloc;
    oldAddress=baseAddress;
    allocateArrayAndAdjustFields(size(),newCapacity);
  }
  final long mask=mask();
  for (long slot=oldCapacity; --slot >= 0; ) {
    if (isAssigned(oldAddress,slot)) {
      long key1=key1OfSlot(oldAddress,slot);
      long key2=key2OfSlot(oldAddress,slot);
      long valueAddress=slotBase(oldAddress,slot) + valueOffset;
      long newSlot=hash(key1,key2) & mask;
      while (isAssigned(newSlot)) {
        newSlot=(newSlot + 1) & mask;
      }
      putKey(newSlot,key1,key2);
      mem.copyMemory(valueAddress,valueAddrOfSlot(newSlot),valueLength);
    }
  }
  oldMalloc.free(oldAddress - HEADER_SIZE,oldAllocatedSize);
}

Fixed version (ground truth):
/** 
 * Allocate a new slot array with the requested size and move all the assigned slots from the current array into the new one.
 */
private void resizeTo(long newCapacity){
  final long oldCapacity=capacity();
  final long oldAllocatedSize=HEADER_SIZE + oldCapacity * slotLength;
  final MemoryAllocator oldMalloc;
  final long oldAddress;
  if (auxMalloc != null) {
    final long size=size();
    oldAddress=move(baseAddress,oldCapacity,malloc,auxMalloc);
    oldMalloc=auxMalloc;
    auxAllocateAndAdjustFields(oldAddress,size,oldCapacity,newCapacity);
  }
 else {
    oldMalloc=malloc;
    oldAddress=baseAddress;
    allocateArrayAndAdjustFields(size(),newCapacity);
  }
  final long mask=mask();
  for (long slot=oldCapacity; --slot >= 0; ) {
    if (isAssigned(oldAddress,slot)) {
      long key1=key1OfSlot(oldAddress,slot);
      long key2=key2OfSlot(oldAddress,slot);
      long valueAddress=slotBase(oldAddress,slot) + valueOffset;
      long newSlot=hash(key1,key2) & mask;
      while (isAssigned(newSlot)) {
        newSlot=(newSlot + 1) & mask;
      }
      putKey(newSlot,key1,key2);
      mem.copyMemory(valueAddress,valueAddrOfSlot(newSlot),valueLength);
    }
  }
  oldMalloc.free(oldAddress - HEADER_SIZE,oldAllocatedSize);
}
Program: 46592
Project: 46592
Buggy source:
private void auxAllocateAndAdjustFields(long auxAddress,long oldCapacity,long newCapacity){
  try {
    allocateArrayAndAdjustFields(size(),newCapacity);
  }
 catch (  Error e) {
    try {
      baseAddress=move(auxAddress,oldCapacity,auxMalloc,malloc);
    }
 catch (    Error e1) {
      baseAddress=NULL_ADDRESS;
    }
    throw e;
  }
}

Fixed version (ground truth):
private void auxAllocateAndAdjustFields(long auxAddress,long size,long oldCapacity,long newCapacity){
  try {
    allocateArrayAndAdjustFields(size,newCapacity);
  }
 catch (  Error e) {
    try {
      baseAddress=move(auxAddress,oldCapacity,auxMalloc,malloc);
    }
 catch (    Error e1) {
      baseAddress=NULL_ADDRESS;
    }
    throw e;
  }
}
Program: 46593
Project: 46593
Buggy source:
private void waitIfAlreadyShuttingDown(){
  if (!shuttingDown.get()) {
    return;
  }
  logger.info("String_Node_Str");
  while (state != NodeState.SHUT_DOWN) {
    try {
      Thread.sleep(500);
    }
 catch (    InterruptedException e) {
      logger.warning("String_Node_Str");
      return;
    }
  }
}

Fixed version (ground truth):
private void waitIfAlreadyShuttingDown(){
  if (!shuttingDown.get()) {
    return;
  }
  logger.info("String_Node_Str");
  while (state != NodeState.SHUT_DOWN) {
    try {
      Thread.sleep(SLEEP_DURATION);
    }
 catch (    InterruptedException e) {
      logger.warning("String_Node_Str");
      return;
    }
  }
}
Program: 46594
Project: 46594
Buggy source:
/** 
 * Operations which are done in this constructor should obey the rules defined in the method comment   {@link com.hazelcast.spi.PostJoinAwareService#getPostJoinOperation()}Otherwise undesired situations, like deadlocks, may appear.
 */
public MapContainer(final String name,final MapConfig mapConfig,final MapServiceContext mapServiceContext){
  this.name=name;
  this.mapConfig=mapConfig;
  this.mapServiceContext=mapServiceContext;
  NodeEngine nodeEngine=mapServiceContext.getNodeEngine();
  this.partitioningStrategy=createPartitioningStrategy();
  this.quorumName=mapConfig.getQuorumName();
  this.serializationService=nodeEngine.getSerializationService();
  this.recordFactoryConstructor=createRecordFactoryConstructor(serializationService);
  this.queryEntryFactory=new QueryEntryFactory(mapConfig.getCacheDeserializedValues());
  initWanReplication(nodeEngine);
  this.nearCacheSizeEstimator=createNearCacheSizeEstimator(mapConfig.getNearCacheConfig());
  this.mapStoreContext=createMapStoreContext(this);
  this.mapStoreContext.start();
  this.extractors=new Extractors(mapConfig.getMapAttributeConfigs());
  this.indexes=new Indexes(serializationService,extractors);
  this.evictor=createEvictor(mapServiceContext);
  this.memberNearCacheInvalidationEnabled=isNearCacheEnabled() && mapConfig.getNearCacheConfig().isInvalidateOnChange();
}

Fixed version (ground truth):
/** 
 * Operations which are done in this constructor should obey the rules defined in the method comment   {@link com.hazelcast.spi.PostJoinAwareService#getPostJoinOperation()}Otherwise undesired situations, like deadlocks, may appear.
 */
public MapContainer(final String name,final MapConfig mapConfig,final MapServiceContext mapServiceContext){
  this.name=name;
  this.mapConfig=mapConfig;
  this.mapServiceContext=mapServiceContext;
  NodeEngine nodeEngine=mapServiceContext.getNodeEngine();
  this.partitioningStrategy=createPartitioningStrategy();
  this.quorumName=mapConfig.getQuorumName();
  this.serializationService=nodeEngine.getSerializationService();
  this.recordFactoryConstructor=createRecordFactoryConstructor(serializationService);
  this.queryEntryFactory=new QueryEntryFactory(mapConfig.getCacheDeserializedValues());
  initWanReplication(nodeEngine);
  this.nearCacheSizeEstimator=createNearCacheSizeEstimator(mapConfig.getNearCacheConfig());
  this.mapStoreContext=createMapStoreContext(this);
  this.mapStoreContext.start();
  this.extractors=new Extractors(mapConfig.getMapAttributeConfigs());
  this.indexes=new Indexes(serializationService,extractors);
  this.evictor=createEvictor(mapServiceContext);
  this.memberNearCacheInvalidationEnabled=hasMemberNearCache() && mapConfig.getNearCacheConfig().isInvalidateOnChange();
}
Program: 46595
Project: 46595
Buggy source:
public Object getFromNearCache(String mapName,Data key){
  MapContainer mapContainer=mapServiceContext.getMapContainer(mapName);
  if (!mapContainer.isNearCacheEnabled()) {
    return null;
  }
  NearCache nearCache=getOrCreateNearCache(mapName);
  return nearCache.get(key);
}

Fixed version (ground truth):
public Object getFromNearCache(String mapName,Data key){
  MapContainer mapContainer=mapServiceContext.getMapContainer(mapName);
  if (!mapContainer.hasMemberNearCache()) {
    return null;
  }
  NearCache nearCache=getOrCreateNearCache(mapName);
  return nearCache.get(key);
}
Program: 46596
Project: 46596
Buggy source:
@Override public void run(){
  if (mapContainer.isNearCacheEnabled()) {
    NearCacheProvider nearCacheProvider=mapServiceContext.getNearCacheProvider();
    NearCacheInvalidator nearCacheInvalidator=nearCacheProvider.getNearCacheInvalidator();
    ((AbstractNearCacheInvalidator)nearCacheInvalidator).invalidateLocal(name,null,keys);
  }
 else {
    getLogger().warning("String_Node_Str" + name + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (mapContainer.hasMemberNearCache()) {
    NearCacheProvider nearCacheProvider=mapServiceContext.getNearCacheProvider();
    NearCacheInvalidator nearCacheInvalidator=nearCacheProvider.getNearCacheInvalidator();
    ((AbstractNearCacheInvalidator)nearCacheInvalidator).invalidateLocal(name,null,keys);
  }
 else {
    getLogger().warning("String_Node_Str" + name + "String_Node_Str");
  }
}
Program: 46597
Project: 46597
Buggy source:
@Override public void run(){
  if (mapContainer.isNearCacheEnabled()) {
    NearCacheProvider nearCacheProvider=mapServiceContext.getNearCacheProvider();
    NearCacheInvalidator nearCacheInvalidator=nearCacheProvider.getNearCacheInvalidator();
    ((AbstractNearCacheInvalidator)nearCacheInvalidator).invalidateLocal(name,key,null);
  }
 else {
    getLogger().warning("String_Node_Str" + name + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (mapContainer.hasMemberNearCache()) {
    NearCacheProvider nearCacheProvider=mapServiceContext.getNearCacheProvider();
    NearCacheInvalidator nearCacheInvalidator=nearCacheProvider.getNearCacheInvalidator();
    ((AbstractNearCacheInvalidator)nearCacheInvalidator).invalidateLocal(name,key,null);
  }
 else {
    getLogger().warning("String_Node_Str" + name + "String_Node_Str");
  }
}
Program: 46598
Project: 46598
Buggy source:
private void addInvalidation(Data dataKey){
  if (mapContainer.isNearCacheEnabled()) {
    if (invalidationKeys == null) {
      invalidationKeys=new ArrayList<Data>(mapEntries.size());
    }
    invalidationKeys.add(dataKey);
  }
}

Fixed version (ground truth):
private void addInvalidation(Data dataKey){
  if (mapContainer.isInvalidationEnabled()) {
    if (invalidationKeys == null) {
      invalidationKeys=new ArrayList<Data>(mapEntries.size());
    }
    invalidationKeys.add(dataKey);
  }
}
Program: 46599
Project: 46599
Buggy source:
private void addInvalidation(Data key){
  if (!mapContainer.isNearCacheEnabled()) {
    return;
  }
  if (invalidationKeys == null) {
    invalidationKeys=new ArrayList<Data>(keyValueSequence.size() / 2);
  }
  invalidationKeys.add(key);
}

Fixed version (ground truth):
private void addInvalidation(Data key){
  if (!mapContainer.isInvalidationEnabled()) {
    return;
  }
  if (invalidationKeys == null) {
    invalidationKeys=new ArrayList<Data>(keyValueSequence.size() / 2);
  }
  invalidationKeys.add(key);
}
Program: 46600
Project: 46600
Buggy source:
public Object getInternal(Data key){
  MapService mapService=getService();
  boolean nearCacheEnabled=mapService.getMapServiceContext().getMapContainer(name).isNearCacheEnabled();
  if (nearCacheEnabled) {
    Object cached=mapService.getMapServiceContext().getNearCacheProvider().getFromNearCache(name,key);
    if (cached != null) {
      if (cached.equals(NULL_OBJECT)) {
        cached=null;
      }
      return cached;
    }
  }
  MapOperation operation=operationProvider.createGetOperation(name,key);
  operation.setThreadId(ThreadUtil.getThreadId());
  NodeEngine nodeEngine=getNodeEngine();
  int partitionId=nodeEngine.getPartitionService().getPartitionId(key);
  try {
    Future future=nodeEngine.getOperationService().invokeOnPartition(MapService.SERVICE_NAME,operation,partitionId);
    return future.get();
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}

Fixed version (ground truth):
public Object getInternal(Data key){
  MapService mapService=getService();
  boolean nearCacheEnabled=mapService.getMapServiceContext().getMapContainer(name).hasMemberNearCache();
  if (nearCacheEnabled) {
    Object cached=mapService.getMapServiceContext().getNearCacheProvider().getFromNearCache(name,key);
    if (cached != null) {
      if (cached.equals(NULL_OBJECT)) {
        cached=null;
      }
      return cached;
    }
  }
  MapOperation operation=operationProvider.createGetOperation(name,key);
  operation.setThreadId(ThreadUtil.getThreadId());
  NodeEngine nodeEngine=getNodeEngine();
  int partitionId=nodeEngine.getPartitionService().getPartitionId(key);
  try {
    Future future=nodeEngine.getOperationService().invokeOnPartition(MapService.SERVICE_NAME,operation,partitionId);
    return future.get();
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}
Program: 46602
Project: 46602
Buggy source:
@Test public void verifyMethods() throws Exception {
  TestNodeContext nodeContext=new TestNodeContext();
  NodeExtension nodeExtension=nodeContext.getNodeExtension();
  hazelcastInstance=new HazelcastInstanceImpl(randomName(),getConfig(),nodeContext);
  InOrder inOrder=inOrder(nodeExtension);
  inOrder.verify(nodeExtension,times(1)).beforeStart();
  inOrder.verify(nodeExtension,times(1)).createSerializationService();
  inOrder.verify(nodeExtension,times(1)).printNodeInfo();
  inOrder.verify(nodeExtension,times(1)).createExtensionServices();
  inOrder.verify(nodeExtension,times(1)).beforeJoin();
  inOrder.verify(nodeExtension,times(1)).afterStart();
  hazelcastInstance.shutdown();
  inOrder.verify(nodeExtension,times(1)).beforeShutdown();
  inOrder.verify(nodeExtension,times(1)).shutdown();
}

Fixed version (ground truth):
@Test public void verifyMethods() throws Exception {
  TestNodeContext nodeContext=new TestNodeContext();
  NodeExtension nodeExtension=nodeContext.getNodeExtension();
  hazelcastInstance=new HazelcastInstanceImpl(randomName(),getConfig(),nodeContext);
  InOrder inOrder=inOrder(nodeExtension);
  inOrder.verify(nodeExtension,times(1)).printNodeInfo();
  inOrder.verify(nodeExtension,times(1)).beforeStart();
  inOrder.verify(nodeExtension,times(1)).createSerializationService();
  inOrder.verify(nodeExtension,times(1)).createExtensionServices();
  inOrder.verify(nodeExtension,times(1)).beforeJoin();
  inOrder.verify(nodeExtension,times(1)).afterStart();
  hazelcastInstance.shutdown();
  inOrder.verify(nodeExtension,times(1)).beforeShutdown();
  inOrder.verify(nodeExtension,times(1)).shutdown();
}
Program: 46603
Project: 46603
Buggy source:
/** 
 * Operations which are done in this constructor should obey the rules defined in the method comment   {@link com.hazelcast.spi.PostJoinAwareService#getPostJoinOperation()}Otherwise undesired situations, like deadlocks, may appear.
 */
public MapContainer(final String name,final MapConfig mapConfig,final MapServiceContext mapServiceContext){
  this.name=name;
  this.mapConfig=mapConfig;
  this.mapServiceContext=mapServiceContext;
  NodeEngine nodeEngine=mapServiceContext.getNodeEngine();
  this.partitioningStrategy=createPartitioningStrategy();
  this.quorumName=mapConfig.getQuorumName();
  this.serializationService=nodeEngine.getSerializationService();
  this.recordFactoryConstructor=createRecordFactoryConstructor(serializationService);
  this.queryEntryFactory=new QueryEntryFactory(mapConfig.getCacheDeserializedValues());
  initWanReplication(nodeEngine);
  this.nearCacheSizeEstimator=createNearCacheSizeEstimator(mapConfig.getNearCacheConfig());
  this.extractors=new Extractors(mapConfig.getMapAttributeConfigs());
  this.indexes=new Indexes(serializationService,extractors);
  this.evictor=createEvictor(mapConfig,mapServiceContext);
  this.memberNearCacheInvalidationEnabled=isNearCacheEnabled() && mapConfig.getNearCacheConfig().isInvalidateOnChange();
  this.mapStoreContext=createMapStoreContext(this);
  this.mapStoreContext.start();
}

Fixed version (ground truth):
/** 
 * Operations which are done in this constructor should obey the rules defined in the method comment   {@link com.hazelcast.spi.PostJoinAwareService#getPostJoinOperation()}Otherwise undesired situations, like deadlocks, may appear.
 */
public MapContainer(final String name,final MapConfig mapConfig,final MapServiceContext mapServiceContext){
  this.name=name;
  this.mapConfig=mapConfig;
  this.mapServiceContext=mapServiceContext;
  NodeEngine nodeEngine=mapServiceContext.getNodeEngine();
  this.partitioningStrategy=createPartitioningStrategy();
  this.quorumName=mapConfig.getQuorumName();
  this.serializationService=nodeEngine.getSerializationService();
  this.recordFactoryConstructor=createRecordFactoryConstructor(serializationService);
  this.queryEntryFactory=new QueryEntryFactory(mapConfig.getCacheDeserializedValues());
  initWanReplication(nodeEngine);
  this.nearCacheSizeEstimator=createNearCacheSizeEstimator(mapConfig.getNearCacheConfig());
  this.extractors=new Extractors(mapConfig.getMapAttributeConfigs());
  this.indexes=new Indexes(serializationService,extractors);
  this.evictor=createEvictor(mapConfig,mapServiceContext);
  this.memberNearCacheInvalidationEnabled=hasMemberNearCache() && mapConfig.getNearCacheConfig().isInvalidateOnChange();
  this.mapStoreContext=createMapStoreContext(this);
  this.mapStoreContext.start();
}
Program: 46604
Project: 46604
Buggy source:
public Object getFromNearCache(String mapName,Data key){
  MapContainer mapContainer=mapServiceContext.getMapContainer(mapName);
  if (!mapContainer.isNearCacheEnabled()) {
    return null;
  }
  NearCache nearCache=getOrCreateNearCache(mapName);
  return nearCache.get(key);
}

Fixed version (ground truth):
public Object getFromNearCache(String mapName,Data key){
  MapContainer mapContainer=mapServiceContext.getMapContainer(mapName);
  if (!mapContainer.hasMemberNearCache()) {
    return null;
  }
  NearCache nearCache=getOrCreateNearCache(mapName);
  return nearCache.get(key);
}
Program: 46605
Project: 46605
Buggy source:
@Override public void run(){
  if (mapContainer.isNearCacheEnabled()) {
    NearCacheProvider nearCacheProvider=mapServiceContext.getNearCacheProvider();
    NearCacheInvalidator nearCacheInvalidator=nearCacheProvider.getNearCacheInvalidator();
    ((AbstractNearCacheInvalidator)nearCacheInvalidator).invalidateLocal(name,null,keys);
  }
 else {
    getLogger().warning("String_Node_Str" + name + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (mapContainer.hasMemberNearCache()) {
    NearCacheProvider nearCacheProvider=mapServiceContext.getNearCacheProvider();
    NearCacheInvalidator nearCacheInvalidator=nearCacheProvider.getNearCacheInvalidator();
    ((AbstractNearCacheInvalidator)nearCacheInvalidator).invalidateLocal(name,null,keys);
  }
 else {
    getLogger().warning("String_Node_Str" + name + "String_Node_Str");
  }
}
Program: 46606
Project: 46606
Buggy source:
@Override public void run(){
  if (mapContainer.isNearCacheEnabled()) {
    NearCacheProvider nearCacheProvider=mapServiceContext.getNearCacheProvider();
    NearCacheInvalidator nearCacheInvalidator=nearCacheProvider.getNearCacheInvalidator();
    ((AbstractNearCacheInvalidator)nearCacheInvalidator).invalidateLocal(name,key,null);
  }
 else {
    getLogger().warning("String_Node_Str" + name + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (mapContainer.hasMemberNearCache()) {
    NearCacheProvider nearCacheProvider=mapServiceContext.getNearCacheProvider();
    NearCacheInvalidator nearCacheInvalidator=nearCacheProvider.getNearCacheInvalidator();
    ((AbstractNearCacheInvalidator)nearCacheInvalidator).invalidateLocal(name,key,null);
  }
 else {
    getLogger().warning("String_Node_Str" + name + "String_Node_Str");
  }
}
Program: 46607
Project: 46607
Buggy source:
private void addInvalidation(Data dataKey){
  if (mapContainer.isNearCacheEnabled()) {
    if (invalidationKeys == null) {
      invalidationKeys=new ArrayList<Data>(mapEntries.size());
    }
    invalidationKeys.add(dataKey);
  }
}

Fixed version (ground truth):
private void addInvalidation(Data dataKey){
  if (mapContainer.isInvalidationEnabled()) {
    if (invalidationKeys == null) {
      invalidationKeys=new ArrayList<Data>(mapEntries.size());
    }
    invalidationKeys.add(dataKey);
  }
}
Program: 46608
Project: 46608
Buggy source:
private void addInvalidation(Data key){
  if (!mapContainer.isNearCacheEnabled()) {
    return;
  }
  if (invalidationKeys == null) {
    invalidationKeys=new ArrayList<Data>(keyValueSequence.size() / 2);
  }
  invalidationKeys.add(key);
}

Fixed version (ground truth):
private void addInvalidation(Data key){
  if (!mapContainer.isInvalidationEnabled()) {
    return;
  }
  if (invalidationKeys == null) {
    invalidationKeys=new ArrayList<Data>(keyValueSequence.size() / 2);
  }
  invalidationKeys.add(key);
}
Program: 46609
Project: 46609
Buggy source:
public Object getInternal(Data key){
  MapService mapService=getService();
  boolean nearCacheEnabled=mapService.getMapServiceContext().getMapContainer(name).isNearCacheEnabled();
  if (nearCacheEnabled) {
    Object cached=mapService.getMapServiceContext().getNearCacheProvider().getFromNearCache(name,key);
    if (cached != null) {
      if (cached.equals(NULL_OBJECT)) {
        cached=null;
      }
      return cached;
    }
  }
  MapOperation operation=operationProvider.createGetOperation(name,key);
  operation.setThreadId(ThreadUtil.getThreadId());
  NodeEngine nodeEngine=getNodeEngine();
  int partitionId=nodeEngine.getPartitionService().getPartitionId(key);
  try {
    Future future=nodeEngine.getOperationService().invokeOnPartition(MapService.SERVICE_NAME,operation,partitionId);
    return future.get();
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}

Fixed version (ground truth):
public Object getInternal(Data key){
  MapService mapService=getService();
  boolean nearCacheEnabled=mapService.getMapServiceContext().getMapContainer(name).hasMemberNearCache();
  if (nearCacheEnabled) {
    Object cached=mapService.getMapServiceContext().getNearCacheProvider().getFromNearCache(name,key);
    if (cached != null) {
      if (cached.equals(NULL_OBJECT)) {
        cached=null;
      }
      return cached;
    }
  }
  MapOperation operation=operationProvider.createGetOperation(name,key);
  operation.setThreadId(ThreadUtil.getThreadId());
  NodeEngine nodeEngine=getNodeEngine();
  int partitionId=nodeEngine.getPartitionService().getPartitionId(key);
  try {
    Future future=nodeEngine.getOperationService().invokeOnPartition(MapService.SERVICE_NAME,operation,partitionId);
    return future.get();
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}
Program: 46611
Project: 46611
Buggy source:
@Test public void verifyMethods() throws Exception {
  TestNodeContext nodeContext=new TestNodeContext();
  NodeExtension nodeExtension=nodeContext.getNodeExtension();
  hazelcastInstance=new HazelcastInstanceImpl(randomName(),getConfig(),nodeContext);
  InOrder inOrder=inOrder(nodeExtension);
  inOrder.verify(nodeExtension,times(1)).beforeStart();
  inOrder.verify(nodeExtension,times(1)).createSerializationService();
  inOrder.verify(nodeExtension,times(1)).printNodeInfo();
  inOrder.verify(nodeExtension,times(1)).createExtensionServices();
  inOrder.verify(nodeExtension,times(1)).beforeJoin();
  inOrder.verify(nodeExtension,times(1)).afterStart();
  hazelcastInstance.shutdown();
  inOrder.verify(nodeExtension,times(1)).beforeShutdown();
  inOrder.verify(nodeExtension,times(1)).shutdown();
}

Fixed version (ground truth):
@Test public void verifyMethods() throws Exception {
  TestNodeContext nodeContext=new TestNodeContext();
  NodeExtension nodeExtension=nodeContext.getNodeExtension();
  hazelcastInstance=new HazelcastInstanceImpl(randomName(),getConfig(),nodeContext);
  InOrder inOrder=inOrder(nodeExtension);
  inOrder.verify(nodeExtension,times(1)).printNodeInfo();
  inOrder.verify(nodeExtension,times(1)).beforeStart();
  inOrder.verify(nodeExtension,times(1)).createSerializationService();
  inOrder.verify(nodeExtension,times(1)).createExtensionServices();
  inOrder.verify(nodeExtension,times(1)).beforeJoin();
  inOrder.verify(nodeExtension,times(1)).afterStart();
  hazelcastInstance.shutdown();
  inOrder.verify(nodeExtension,times(1)).beforeShutdown();
  inOrder.verify(nodeExtension,times(1)).shutdown();
}
Program: 46612
Project: 46612
Buggy source:
public CollectionPrepareBackupOperation(String name,long[] itemIds,String transactionId){
  super(name);
  this.itemIds=itemIds;
  this.transactionId=transactionId;
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") public CollectionPrepareBackupOperation(String name,long[] itemIds,String transactionId){
  super(name);
  this.itemIds=itemIds;
  this.transactionId=transactionId;
}
Program: 46613
Project: 46613
Buggy source:
public CollectionPrepareOperation(int partitionId,String name,String serviceName,long[] itemIds,String transactionId){
  super(name);
  setPartitionId(partitionId);
  setServiceName(serviceName);
  this.itemIds=itemIds;
  this.transactionId=transactionId;
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") public CollectionPrepareOperation(int partitionId,String name,String serviceName,long[] itemIds,String transactionId){
  super(name);
  setPartitionId(partitionId);
  setServiceName(serviceName);
  this.itemIds=itemIds;
  this.transactionId=transactionId;
}
Program: 46614
Project: 46614
Buggy source:
public CollectionRollbackBackupOperation(String name,long[] itemIds){
  super(name);
  this.itemIds=itemIds;
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") public CollectionRollbackBackupOperation(String name,long[] itemIds){
  super(name);
  this.itemIds=itemIds;
}
Program: 46615
Project: 46615
Buggy source:
public CollectionRollbackOperation(int partitionId,String name,String serviceName,long[] itemIds){
  super(name);
  setPartitionId(partitionId);
  setServiceName(serviceName);
  this.itemIds=itemIds;
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") public CollectionRollbackOperation(int partitionId,String name,String serviceName,long[] itemIds){
  super(name);
  setPartitionId(partitionId);
  setServiceName(serviceName);
  this.itemIds=itemIds;
}
Program: 46616
Project: 46616
Buggy source:
public TxnPrepareBackupOperation(String name,long[] itemIds,String transactionId){
  super(name);
  this.itemIds=itemIds;
  this.transactionId=transactionId;
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") public TxnPrepareBackupOperation(String name,long[] itemIds,String transactionId){
  super(name);
  this.itemIds=itemIds;
  this.transactionId=transactionId;
}
Program: 46617
Project: 46617
Buggy source:
public TxnPrepareOperation(int partitionId,String name,long[] itemIds,String transactionId){
  super(name);
  setPartitionId(partitionId);
  this.itemIds=itemIds;
  this.transactionId=transactionId;
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") public TxnPrepareOperation(int partitionId,String name,long[] itemIds,String transactionId){
  super(name);
  setPartitionId(partitionId);
  this.itemIds=itemIds;
  this.transactionId=transactionId;
}
Program: 46618
Project: 46618
Buggy source:
public TxnRollbackBackupOperation(String name,long[] itemIds){
  super(name);
  this.itemIds=itemIds;
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") public TxnRollbackBackupOperation(String name,long[] itemIds){
  super(name);
  this.itemIds=itemIds;
}
Program: 46619
Project: 46619
Buggy source:
public TxnRollbackOperation(int partitionId,String name,long[] itemIds){
  super(name);
  setPartitionId(partitionId);
  this.itemIds=itemIds;
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") public TxnRollbackOperation(int partitionId,String name,long[] itemIds){
  super(name);
  setPartitionId(partitionId);
  this.itemIds=itemIds;
}
Program: 46621
Project: 46621
Buggy source:
/** 
 * Check if record is reachable according to ttl or idle times. If not reachable return null.
 * @param record {@link com.hazelcast.map.impl.record.Record}
 * @return null if evictable.
 */
protected Record getOrNullIfExpired(Record record,long now,boolean backup){
  if (!isRecordStoreExpirable()) {
    return record;
  }
  if (record == null) {
    return null;
  }
  final Data key=record.getKey();
  if (isLocked(key)) {
    return record;
  }
  if (!isExpired(record,now,backup)) {
    return record;
  }
  final Object value=record.getValue();
  evict(key,backup);
  if (!backup) {
    doPostEvictionOperations(record,backup);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Check if record is reachable according to ttl or idle times. If not reachable return null.
 * @param record {@link com.hazelcast.map.impl.record.Record}
 * @return null if evictable.
 */
protected Record getOrNullIfExpired(Record record,long now,boolean backup){
  if (!isRecordStoreExpirable()) {
    return record;
  }
  if (record == null) {
    return null;
  }
  final Data key=record.getKey();
  if (isLocked(key)) {
    return record;
  }
  if (!isExpired(record,now,backup)) {
    return record;
  }
  evict(key,backup);
  if (!backup) {
    doPostEvictionOperations(record,backup);
  }
  return null;
}
Program: 46622
Project: 46622
Buggy source:
public AbstractHandler(TcpIpConnection connection,NonBlockingIOThread ioThread,int initialOps){
  this.connection=connection;
  this.ioThread=ioThread;
  this.selector=ioThread.getSelector();
  this.socketChannel=connection.getSocketChannelWrapper();
  this.connectionManager=connection.getConnectionManager();
  this.ioService=connectionManager.getIoService();
  this.logger=ioService.getLogger(this.getClass().getName());
  this.initialOps=initialOps;
}

Fixed version (ground truth):
public AbstractHandler(TcpIpConnection connection,NonBlockingIOThread ioThread,int initialOps){
  this.connection=connection;
  this.ioThread=ioThread;
  this.ioThreadId=ioThread.id;
  this.selector=ioThread.getSelector();
  this.socketChannel=connection.getSocketChannelWrapper();
  this.connectionManager=connection.getConnectionManager();
  this.ioService=connectionManager.getIoService();
  this.logger=ioService.getLogger(this.getClass().getName());
  this.initialOps=initialOps;
}
Program: 46623
Project: 46623
Buggy source:
protected void updateCacheListenerConfigOnOtherNodes(CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration,boolean isRegister){
  final Collection<Member> members=clientContext.getClusterService().getMemberList();
  final HazelcastClientInstanceImpl client=(HazelcastClientInstanceImpl)clientContext.getHazelcastInstance();
  final Collection<Future> futures=new ArrayList<Future>();
  for (  Member member : members) {
    try {
      final Address address=member.getAddress();
      Data configData=toData(cacheEntryListenerConfiguration);
      final ClientMessage request=CacheListenerRegistrationCodec.encodeRequest(nameWithPrefix,configData,isRegister,address);
      final ClientInvocation invocation=new ClientInvocation(client,request,address);
      final Future future=invocation.invoke();
      futures.add(future);
    }
 catch (    Exception e) {
      ExceptionUtil.sneakyThrow(e);
    }
  }
}

Fixed version (ground truth):
protected void updateCacheListenerConfigOnOtherNodes(CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration,boolean isRegister){
  final Collection<Member> members=clientContext.getClusterService().getMemberList();
  final HazelcastClientInstanceImpl client=(HazelcastClientInstanceImpl)clientContext.getHazelcastInstance();
  for (  Member member : members) {
    try {
      final Address address=member.getAddress();
      Data configData=toData(cacheEntryListenerConfiguration);
      final ClientMessage request=CacheListenerRegistrationCodec.encodeRequest(nameWithPrefix,configData,isRegister,address);
      final ClientInvocation invocation=new ClientInvocation(client,request,address);
      invocation.invoke();
    }
 catch (    Exception e) {
      ExceptionUtil.sneakyThrow(e);
    }
  }
}
Program: 46624
Project: 46624
Buggy source:
protected void deleteAllCacheEntry(Set<Data> keys){
  if (isWriteThrough() && cacheWriter != null && keys != null && !keys.isEmpty()) {
    Map<Object,Data> keysToDelete=new HashMap<Object,Data>();
    for (    Data key : keys) {
      final Object localKeyObj=dataToValue(key);
      keysToDelete.put(localKeyObj,key);
    }
    final Set<Object> keysObject=keysToDelete.keySet();
    try {
      cacheWriter.deleteAll(keysObject);
    }
 catch (    Exception e) {
      if (!(e instanceof CacheWriterException)) {
        throw new CacheWriterException("String_Node_Str",e);
      }
 else {
        throw (CacheWriterException)e;
      }
    }
 finally {
      for (      Object undeletedKey : keysObject) {
        final Data undeletedKeyData=keysToDelete.get(undeletedKey);
        keys.remove(undeletedKeyData);
      }
    }
  }
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") protected void deleteAllCacheEntry(Set<Data> keys){
  if (isWriteThrough() && cacheWriter != null && keys != null && !keys.isEmpty()) {
    Map<Object,Data> keysToDelete=new HashMap<Object,Data>();
    for (    Data key : keys) {
      final Object localKeyObj=dataToValue(key);
      keysToDelete.put(localKeyObj,key);
    }
    final Set<Object> keysObject=keysToDelete.keySet();
    try {
      cacheWriter.deleteAll(keysObject);
    }
 catch (    Exception e) {
      if (!(e instanceof CacheWriterException)) {
        throw new CacheWriterException("String_Node_Str",e);
      }
 else {
        throw (CacheWriterException)e;
      }
    }
 finally {
      for (      Object undeletedKey : keysObject) {
        final Data undeletedKeyData=keysToDelete.get(undeletedKey);
        keys.remove(undeletedKeyData);
      }
    }
  }
}
Program: 46625
Project: 46625
Buggy source:
@Override public Operation prepareReplicationOperation(PartitionReplicationEvent event){
  if (event.getReplicaIndex() > 1) {
    return null;
  }
  Map<String,Long> data=new HashMap<String,Long>();
  int partitionId=event.getPartitionId();
  for (  String name : containers.keySet()) {
    if (partitionId == getPartitionId(name)) {
      AtomicLongContainer container=containers.get(name);
      data.put(name,container.get());
    }
  }
  return data.isEmpty() ? null : new AtomicLongReplicationOperation(data);
}

Fixed version (ground truth):
@Override public Operation prepareReplicationOperation(PartitionReplicationEvent event){
  if (event.getReplicaIndex() > 1) {
    return null;
  }
  Map<String,Long> data=new HashMap<String,Long>();
  int partitionId=event.getPartitionId();
  for (  Map.Entry<String,AtomicLongContainer> containerEntry : containers.entrySet()) {
    String name=containerEntry.getKey();
    if (partitionId == getPartitionId(name)) {
      AtomicLongContainer container=containerEntry.getValue();
      data.put(name,container.get());
    }
  }
  return data.isEmpty() ? null : new AtomicLongReplicationOperation(data);
}
Program: 46626
Project: 46626
Buggy source:
@Override public Operation prepareReplicationOperation(PartitionReplicationEvent event){
  if (event.getReplicaIndex() > 1) {
    return null;
  }
  Map<String,Data> data=new HashMap<String,Data>();
  int partitionId=event.getPartitionId();
  for (  String name : containers.keySet()) {
    if (partitionId == getPartitionId(name)) {
      AtomicReferenceContainer atomicReferenceContainer=containers.get(name);
      Data value=atomicReferenceContainer.get();
      data.put(name,value);
    }
  }
  return data.isEmpty() ? null : new AtomicReferenceReplicationOperation(data);
}

Fixed version (ground truth):
@Override public Operation prepareReplicationOperation(PartitionReplicationEvent event){
  if (event.getReplicaIndex() > 1) {
    return null;
  }
  Map<String,Data> data=new HashMap<String,Data>();
  int partitionId=event.getPartitionId();
  for (  Map.Entry<String,AtomicReferenceContainer> containerEntry : containers.entrySet()) {
    String name=containerEntry.getKey();
    if (partitionId == getPartitionId(name)) {
      AtomicReferenceContainer atomicReferenceContainer=containerEntry.getValue();
      Data value=atomicReferenceContainer.get();
      data.put(name,value);
    }
  }
  return data.isEmpty() ? null : new AtomicReferenceReplicationOperation(data);
}
Program: 46627
Project: 46627
Buggy source:
private void setMembersRef(Map<Address,MemberImpl> memberMap){
  memberMap=unmodifiableMap(memberMap);
  memberMap.values();
  memberMap.keySet();
  memberMap.entrySet();
  membersMapRef.set(memberMap);
  membersRef.set(unmodifiableSet(new LinkedHashSet<MemberImpl>(memberMap.values())));
}

Fixed version (ground truth):
@SuppressFBWarnings("String_Node_Str") private void setMembersRef(Map<Address,MemberImpl> memberMap){
  memberMap=unmodifiableMap(memberMap);
  memberMap.values();
  memberMap.keySet();
  memberMap.entrySet();
  membersMapRef.set(memberMap);
  membersRef.set(unmodifiableSet(new LinkedHashSet<MemberImpl>(memberMap.values())));
}
Program: 46629
Project: 46629
Buggy source:
@Override public Set<QueryableEntry> getSubRecords(ComparisonType comparisonType,Comparable searchedValue){
  takeReadLock();
  try {
    MultiResultSet results=createMultiResultSet();
    Set<Comparable> values=recordMap.keySet();
    for (    Comparable value : values) {
      boolean valid;
      int result=searchedValue.compareTo(value);
switch (comparisonType) {
case LESSER:
        valid=result > 0;
      break;
case LESSER_EQUAL:
    valid=result >= 0;
  break;
case GREATER:
valid=result < 0;
break;
case GREATER_EQUAL:
valid=result <= 0;
break;
case NOT_EQUAL:
valid=result != 0;
break;
default :
throw new IllegalStateException("String_Node_Str" + comparisonType);
}
if (valid) {
ConcurrentMap<Data,QueryableEntry> records=recordMap.get(value);
if (records != null) {
results.addResultSet(records);
}
}
}
return results;
}
  finally {
releaseReadLock();
}
}

Fixed version (ground truth):
@Override public Set<QueryableEntry> getSubRecords(ComparisonType comparisonType,Comparable searchedValue){
  takeReadLock();
  try {
    MultiResultSet results=createMultiResultSet();
    for (    Map.Entry<Comparable,ConcurrentMap<Data,QueryableEntry>> recordMapEntry : recordMap.entrySet()) {
      Comparable value=recordMapEntry.getKey();
      boolean valid;
      int result=searchedValue.compareTo(value);
switch (comparisonType) {
case LESSER:
        valid=result > 0;
      break;
case LESSER_EQUAL:
    valid=result >= 0;
  break;
case GREATER:
valid=result < 0;
break;
case GREATER_EQUAL:
valid=result <= 0;
break;
case NOT_EQUAL:
valid=result != 0;
break;
default :
throw new IllegalStateException("String_Node_Str" + comparisonType);
}
if (valid) {
ConcurrentMap<Data,QueryableEntry> records=recordMapEntry.getValue();
if (records != null) {
results.addResultSet(records);
}
}
}
return results;
}
  finally {
releaseReadLock();
}
}
Program: 46630
Project: 46630
Buggy source:
@Override public Set<QueryableEntry> getSubRecordsBetween(Comparable from,Comparable to){
  takeReadLock();
  try {
    MultiResultSet results=createMultiResultSet();
    Comparable paramFrom=from;
    Comparable paramTo=to;
    int trend=paramFrom.compareTo(paramTo);
    if (trend == 0) {
      ConcurrentMap<Data,QueryableEntry> records=recordMap.get(paramFrom);
      if (records != null) {
        results.addResultSet(records);
      }
      return results;
    }
    if (trend < 0) {
      Comparable oldFrom=paramFrom;
      paramFrom=to;
      paramTo=oldFrom;
    }
    Set<Comparable> values=recordMap.keySet();
    for (    Comparable value : values) {
      if (value.compareTo(paramFrom) <= 0 && value.compareTo(paramTo) >= 0) {
        ConcurrentMap<Data,QueryableEntry> records=recordMap.get(value);
        if (records != null) {
          results.addResultSet(records);
        }
      }
    }
    return results;
  }
  finally {
    releaseReadLock();
  }
}

Fixed version (ground truth):
@Override public Set<QueryableEntry> getSubRecordsBetween(Comparable from,Comparable to){
  takeReadLock();
  try {
    MultiResultSet results=createMultiResultSet();
    Comparable paramFrom=from;
    Comparable paramTo=to;
    int trend=paramFrom.compareTo(paramTo);
    if (trend == 0) {
      ConcurrentMap<Data,QueryableEntry> records=recordMap.get(paramFrom);
      if (records != null) {
        results.addResultSet(records);
      }
      return results;
    }
    if (trend < 0) {
      Comparable oldFrom=paramFrom;
      paramFrom=to;
      paramTo=oldFrom;
    }
    for (    Map.Entry<Comparable,ConcurrentMap<Data,QueryableEntry>> recordMapEntry : recordMap.entrySet()) {
      Comparable value=recordMapEntry.getKey();
      if (value.compareTo(paramFrom) <= 0 && value.compareTo(paramTo) >= 0) {
        ConcurrentMap<Data,QueryableEntry> records=recordMapEntry.getValue();
        if (records != null) {
          results.addResultSet(records);
        }
      }
    }
    return results;
  }
  finally {
    releaseReadLock();
  }
}
Program: 46631
Project: 46631
Buggy source:
protected void updateCacheListenerConfigOnOtherNodes(CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration,boolean isRegister){
  final Collection<Member> members=clientContext.getClusterService().getMemberList();
  final HazelcastClientInstanceImpl client=(HazelcastClientInstanceImpl)clientContext.getHazelcastInstance();
  final Collection<Future> futures=new ArrayList<Future>();
  for (  Member member : members) {
    try {
      final Address address=member.getAddress();
      Data configData=toData(cacheEntryListenerConfiguration);
      final ClientMessage request=CacheListenerRegistrationCodec.encodeRequest(nameWithPrefix,configData,isRegister,address);
      final ClientInvocation invocation=new ClientInvocation(client,request,address);
      final Future future=invocation.invoke();
      futures.add(future);
    }
 catch (    Exception e) {
      ExceptionUtil.sneakyThrow(e);
    }
  }
}

Fixed version (ground truth):
protected void updateCacheListenerConfigOnOtherNodes(CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration,boolean isRegister){
  final Collection<Member> members=clientContext.getClusterService().getMemberList();
  final HazelcastClientInstanceImpl client=(HazelcastClientInstanceImpl)clientContext.getHazelcastInstance();
  for (  Member member : members) {
    try {
      final Address address=member.getAddress();
      Data configData=toData(cacheEntryListenerConfiguration);
      final ClientMessage request=CacheListenerRegistrationCodec.encodeRequest(nameWithPrefix,configData,isRegister,address);
      final ClientInvocation invocation=new ClientInvocation(client,request,address);
      invocation.invoke();
    }
 catch (    Exception e) {
      ExceptionUtil.sneakyThrow(e);
    }
  }
}