nus-yam/ex-repair huggingface dataset:
Program: 45891
Project: 45891
Buggy source:
private void assertPartitionEquals(InternalPartition partition1,InternalPartition partition2){
  for (int i=0; i < MAX_REPLICA_COUNT; i++) {
    Address address1=partition1.getReplicaAddress(i);
    Address address2=partition2.getReplicaAddress(i);
    if (address1 == null) {
      assertNull(address2);
    }
 else {
      assertEquals(address1,address2);
    }
  }
}

Fixed version (ground truth):
private static void assertPartitionEquals(InternalPartition partition1,InternalPartition partition2){
  for (int i=0; i < MAX_REPLICA_COUNT; i++) {
    Address address1=partition1.getReplicaAddress(i);
    Address address2=partition2.getReplicaAddress(i);
    if (address1 == null) {
      assertNull(address2);
    }
 else {
      assertEquals(address1,address2);
    }
  }
}
Program: 45892
Project: 45892
Buggy source:
@Test public void shutdownSlaveMember_whenClusterPassive_withoutPartitionInitialization() throws Exception {
  shutdownMember_whenClusterNotActive(false,false,ClusterState.PASSIVE);
}

Fixed version (ground truth):
@Test public void shutdownSlaveMember_whenClusterPassive_withoutPartitionInitialization(){
  shutdownMember_whenClusterNotActive(false,false,ClusterState.PASSIVE);
}
Program: 45893
Project: 45893
Buggy source:
@Test public void shutdownSlaveMember_withoutPartitionInitialization(){
  HazelcastInstance hz1=factory.newHazelcastInstance();
  HazelcastInstance hz2=factory.newHazelcastInstance();
  HazelcastInstance hz3=factory.newHazelcastInstance();
  hz2.shutdown();
}

Fixed version (ground truth):
@Test @SuppressWarnings("String_Node_Str") public void shutdownSlaveMember_withoutPartitionInitialization(){
  HazelcastInstance hz1=factory.newHazelcastInstance();
  HazelcastInstance hz2=factory.newHazelcastInstance();
  HazelcastInstance hz3=factory.newHazelcastInstance();
  hz2.shutdown();
}
Program: 45894
Project: 45894
Buggy source:
@Test public void shutdownSlaveMember_whenClusterFrozen_withoutPartitionInitialization() throws Exception {
  shutdownMember_whenClusterNotActive(false,false,ClusterState.FROZEN);
}

Fixed version (ground truth):
@Test public void shutdownSlaveMember_whenClusterFrozen_withoutPartitionInitialization(){
  shutdownMember_whenClusterNotActive(false,false,ClusterState.FROZEN);
}
Program: 45895
Project: 45895
Buggy source:
private void shutdownAndTerminateMembers_concurrently(HazelcastInstance[] instances,int shutdownIndex,int terminateIndex){
  warmUpPartitions(instances);
  final HazelcastInstance shuttingDownInstance=instances[shutdownIndex];
  final CountDownLatch latch=new CountDownLatch(1);
  new Thread(){
    public void run(){
      shuttingDownInstance.shutdown();
      latch.countDown();
    }
  }
.start();
  Node shuttingDownNode=getNode(shuttingDownInstance);
  while (shuttingDownNode.isRunning()) {
    ;
  }
  terminateInstance(instances[terminateIndex]);
  assertOpenEventually(latch);
  assertPartitionAssignments();
}

Fixed version (ground truth):
private void shutdownAndTerminateMembers_concurrently(HazelcastInstance[] instances,int shutdownIndex,int terminateIndex){
  warmUpPartitions(instances);
  final HazelcastInstance shuttingDownInstance=instances[shutdownIndex];
  final CountDownLatch latch=new CountDownLatch(1);
  new Thread(){
    public void run(){
      shuttingDownInstance.shutdown();
      latch.countDown();
    }
  }
.start();
  Node shuttingDownNode=getNode(shuttingDownInstance);
  while (shuttingDownNode.isRunning()) {
    Thread.yield();
  }
  terminateInstance(instances[terminateIndex]);
  assertOpenEventually(latch);
  assertPartitionAssignments();
}
Program: 45896
Project: 45896
Buggy source:
static void registerMethod(MetricsRegistry metricsRegistry,Object osBean,String methodName,String name){
  final Method method=getMethod(osBean,methodName);
  if (method == null) {
    return;
  }
  if (long.class.equals(method.getReturnType())) {
    metricsRegistry.register(osBean,name,MANDATORY,new LongProbeFunction(){
      @Override public long get(      Object bean) throws Exception {
        return (Long)method.invoke(bean,EMPTY_ARGS);
      }
    }
);
  }
 else {
    metricsRegistry.register(osBean,name,MANDATORY,new DoubleProbeFunction(){
      @Override public double get(      Object bean) throws Exception {
        return (Double)method.invoke(bean,EMPTY_ARGS);
      }
    }
);
  }
}

Fixed version (ground truth):
private static void registerMethod(MetricsRegistry metricsRegistry,Object osBean,String methodName,String name,final long multiplier){
  final Method method=getMethod(osBean,methodName);
  if (method == null) {
    return;
  }
  if (long.class.equals(method.getReturnType())) {
    metricsRegistry.register(osBean,name,MANDATORY,new LongProbeFunction(){
      @Override public long get(      Object bean) throws Exception {
        return (Long)method.invoke(bean,EMPTY_ARGS) * multiplier;
      }
    }
);
  }
 else {
    metricsRegistry.register(osBean,name,MANDATORY,new DoubleProbeFunction(){
      @Override public double get(      Object bean) throws Exception {
        return (Double)method.invoke(bean,EMPTY_ARGS) * multiplier;
      }
    }
);
  }
}
Program: 45897
Project: 45897
Buggy source:
@Override public double get(Object bean) throws Exception {
  return (Double)method.invoke(bean,EMPTY_ARGS);
}

Fixed version (ground truth):
@Override public double get(Object bean) throws Exception {
  return (Double)method.invoke(bean,EMPTY_ARGS) * multiplier;
}
Program: 45898
Project: 45898
Buggy source:
/** 
 * Registers all the metrics in this metrics pack.
 * @param metricsRegistry the MetricsRegistry upon which the metrics are registered.
 */
public static void register(MetricsRegistry metricsRegistry){
  checkNotNull(metricsRegistry,"String_Node_Str");
  OperatingSystemMXBean mxBean=ManagementFactory.getOperatingSystemMXBean();
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  metricsRegistry.register(mxBean,"String_Node_Str",MANDATORY,new DoubleProbeFunction<OperatingSystemMXBean>(){
    @Override public double get(    OperatingSystemMXBean bean){
      return PERCENTAGE_MULTIPLIER * bean.getSystemLoadAverage();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Registers all the metrics in this metrics pack.
 * @param metricsRegistry the MetricsRegistry upon which the metrics are registered.
 */
public static void register(MetricsRegistry metricsRegistry){
  checkNotNull(metricsRegistry,"String_Node_Str");
  OperatingSystemMXBean mxBean=ManagementFactory.getOperatingSystemMXBean();
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str",PERCENTAGE_MULTIPLIER);
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str",PERCENTAGE_MULTIPLIER);
  metricsRegistry.register(mxBean,"String_Node_Str",MANDATORY,new DoubleProbeFunction<OperatingSystemMXBean>(){
    @Override public double get(    OperatingSystemMXBean bean){
      return bean.getSystemLoadAverage();
    }
  }
);
}
Program: 45899
Project: 45899
Buggy source:
static void registerMethod(MetricsRegistry metricsRegistry,Object osBean,String methodName,String name){
  final Method method=getMethod(osBean,methodName);
  if (method == null) {
    return;
  }
  if (long.class.equals(method.getReturnType())) {
    metricsRegistry.register(osBean,name,MANDATORY,new LongProbeFunction(){
      @Override public long get(      Object bean) throws Exception {
        return (Long)method.invoke(bean,EMPTY_ARGS);
      }
    }
);
  }
 else {
    metricsRegistry.register(osBean,name,MANDATORY,new DoubleProbeFunction(){
      @Override public double get(      Object bean) throws Exception {
        return (Double)method.invoke(bean,EMPTY_ARGS);
      }
    }
);
  }
}

Fixed version (ground truth):
private static void registerMethod(MetricsRegistry metricsRegistry,Object osBean,String methodName,String name,final long multiplier){
  final Method method=getMethod(osBean,methodName);
  if (method == null) {
    return;
  }
  if (long.class.equals(method.getReturnType())) {
    metricsRegistry.register(osBean,name,MANDATORY,new LongProbeFunction(){
      @Override public long get(      Object bean) throws Exception {
        return (Long)method.invoke(bean,EMPTY_ARGS) * multiplier;
      }
    }
);
  }
 else {
    metricsRegistry.register(osBean,name,MANDATORY,new DoubleProbeFunction(){
      @Override public double get(      Object bean) throws Exception {
        return (Double)method.invoke(bean,EMPTY_ARGS) * multiplier;
      }
    }
);
  }
}
Program: 45900
Project: 45900
Buggy source:
@Override public double get(Object bean) throws Exception {
  return (Double)method.invoke(bean,EMPTY_ARGS);
}

Fixed version (ground truth):
@Override public double get(Object bean) throws Exception {
  return (Double)method.invoke(bean,EMPTY_ARGS) * multiplier;
}
Program: 45901
Project: 45901
Buggy source:
/** 
 * Registers all the metrics in this metrics pack.
 * @param metricsRegistry the MetricsRegistry upon which the metrics are registered.
 */
public static void register(MetricsRegistry metricsRegistry){
  checkNotNull(metricsRegistry,"String_Node_Str");
  OperatingSystemMXBean mxBean=ManagementFactory.getOperatingSystemMXBean();
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  metricsRegistry.register(mxBean,"String_Node_Str",MANDATORY,new DoubleProbeFunction<OperatingSystemMXBean>(){
    @Override public double get(    OperatingSystemMXBean bean){
      return PERCENTAGE_MULTIPLIER * bean.getSystemLoadAverage();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Registers all the metrics in this metrics pack.
 * @param metricsRegistry the MetricsRegistry upon which the metrics are registered.
 */
public static void register(MetricsRegistry metricsRegistry){
  checkNotNull(metricsRegistry,"String_Node_Str");
  OperatingSystemMXBean mxBean=ManagementFactory.getOperatingSystemMXBean();
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str");
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str",PERCENTAGE_MULTIPLIER);
  registerMethod(metricsRegistry,mxBean,"String_Node_Str","String_Node_Str",PERCENTAGE_MULTIPLIER);
  metricsRegistry.register(mxBean,"String_Node_Str",MANDATORY,new DoubleProbeFunction<OperatingSystemMXBean>(){
    @Override public double get(    OperatingSystemMXBean bean){
      return bean.getSystemLoadAverage();
    }
  }
);
}
Program: 45902
Project: 45902
Buggy source:
/** 
 * Calculates and returns the expected maximum size of an evicted record-store when   {@link com.hazelcast.config.MaxSizeConfig.MaxSizePolicy#PER_NODE PER_NODE} max-size-policy is used.
 */
public double calculatePerNodeMaxRecordStoreSize(RecordStore recordStore){
  MapConfig mapConfig=recordStore.getMapContainer().getMapConfig();
  MaxSizeConfig maxSizeConfig=mapConfig.getMaxSizeConfig();
  NodeEngine nodeEngine=mapServiceContext.getNodeEngine();
  int configuredMaxSize=maxSizeConfig.getSize();
  int memberCount=nodeEngine.getClusterService().getSize(DATA_MEMBER_SELECTOR);
  int partitionCount=nodeEngine.getPartitionService().getPartitionCount();
  final double perNodeMaxRecordStoreSize=(1D * configuredMaxSize * memberCount / partitionCount);
  if (perNodeMaxRecordStoreSize < 1 && misconfiguredPerNodeMaxSizeWarningLogged.compareAndSet(false,true)) {
    int minMaxSize=(int)Math.ceil((1D * partitionCount / memberCount));
    logger.warning(format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",mapConfig.getName(),memberCount,partitionCount,minMaxSize));
  }
  return perNodeMaxRecordStoreSize;
}

Fixed version (ground truth):
/** 
 * Calculates and returns the expected maximum size of an evicted record-store when   {@link com.hazelcast.config.MaxSizeConfig.MaxSizePolicy#PER_NODE PER_NODE} max-size-policy is used.
 */
public double calculatePerNodeMaxRecordStoreSize(RecordStore recordStore){
  MapConfig mapConfig=recordStore.getMapContainer().getMapConfig();
  MaxSizeConfig maxSizeConfig=mapConfig.getMaxSizeConfig();
  NodeEngine nodeEngine=mapServiceContext.getNodeEngine();
  int configuredMaxSize=maxSizeConfig.getSize();
  int memberCount=nodeEngine.getClusterService().getSize(DATA_MEMBER_SELECTOR);
  int partitionCount=nodeEngine.getPartitionService().getPartitionCount();
  double perNodeMaxRecordStoreSize=(1D * configuredMaxSize * memberCount / partitionCount);
  if (perNodeMaxRecordStoreSize < 1) {
    perNodeMaxRecordStoreSize=MIN_SANE_PER_PARTITION_SIZE;
    if (misconfiguredPerNodeMaxSizeWarningLogged.compareAndSet(false,true)) {
      int minMaxSize=(int)Math.ceil((1D * partitionCount / memberCount));
      int newSize=MIN_SANE_PER_PARTITION_SIZE * partitionCount / memberCount;
      logger.warning(format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",mapConfig.getName(),memberCount,partitionCount,minMaxSize,newSize));
    }
  }
  return perNodeMaxRecordStoreSize;
}
Program: 45903
Project: 45903
Buggy source:
public void run(){
  try {
    Address address=connection.getEndPoint();
    logger.fine(format("String_Node_Str",address));
    if (doPing(address,Level.FINE)) {
      icmpFailureDetector.heartbeat(connection);
      return;
    }
    icmpFailureDetector.logAttempt(connection);
    String reason=format("String_Node_Str",address);
    logger.warning(reason);
    if (!icmpFailureDetector.isAlive(connection)) {
      connection.onHeartbeatFailed();
      heartbeatManager.fireHeartbeatStopped(connection);
    }
  }
 catch (  Throwable ignored) {
    EmptyStatement.ignore(ignored);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    Address address=connection.getEndPoint();
    logger.fine(format("String_Node_Str",address));
    if (doPing(address,Level.FINE)) {
      icmpFailureDetector.heartbeat(connection);
      return;
    }
    icmpFailureDetector.logAttempt(connection);
    String reason=format("String_Node_Str",address);
    logger.warning(reason);
    if (!icmpFailureDetector.isAlive(connection)) {
      connection.onHeartbeatFailed();
      heartbeatManager.fireHeartbeatStopped(connection);
    }
  }
 catch (  Throwable ignored) {
    EmptyStatement.ignore(ignored);
  }
 finally {
    if (!connection.isAlive()) {
      icmpFailureDetector.remove(connection);
    }
  }
}
Program: 45904
Project: 45904
Buggy source:
public void run(){
  try {
    Address address=connection.getEndPoint();
    logger.fine(format("String_Node_Str",address));
    if (doPing(address,Level.FINE)) {
      icmpFailureDetector.heartbeat(connection);
      return;
    }
    icmpFailureDetector.logAttempt(connection);
    String reason=format("String_Node_Str",address);
    logger.warning(reason);
    if (!icmpFailureDetector.isAlive(connection)) {
      connection.onHeartbeatFailed();
      heartbeatManager.fireHeartbeatStopped(connection);
    }
  }
 catch (  Throwable ignored) {
    EmptyStatement.ignore(ignored);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    Address address=connection.getEndPoint();
    logger.fine(format("String_Node_Str",address));
    if (doPing(address,Level.FINE)) {
      icmpFailureDetector.heartbeat(connection);
      return;
    }
    icmpFailureDetector.logAttempt(connection);
    String reason=format("String_Node_Str",address);
    logger.warning(reason);
    if (!icmpFailureDetector.isAlive(connection)) {
      connection.onHeartbeatFailed();
      heartbeatManager.fireHeartbeatStopped(connection);
    }
  }
 catch (  Throwable ignored) {
    EmptyStatement.ignore(ignored);
  }
 finally {
    if (!connection.isAlive()) {
      icmpFailureDetector.remove(connection);
    }
  }
}
Program: 45905
Project: 45905
Buggy source:
@Override public void shutdown(){
  Collection<Member> members=getContext().getClusterService().getMemberList();
  Collection<Future> calls=new LinkedList<Future>();
  for (  Member member : members) {
    ClientMessage request=ScheduledExecutorShutdownCodec.encodeRequest(getName(),member.getAddress());
    calls.add(doSubmitOnAddress(request,SUBMIT_DECODER,member.getAddress()));
  }
  waitWithDeadline(calls,SHUTDOWN_TIMEOUT,TimeUnit.SECONDS,WHILE_SHUTDOWN_EXCEPTION_HANDLER);
}

Fixed version (ground truth):
@Override public void shutdown(){
  Collection<Member> members=getContext().getClusterService().getMemberList();
  Collection<Future> calls=new LinkedList<Future>();
  for (  Member member : members) {
    ClientMessage request=ScheduledExecutorShutdownCodec.encodeRequest(getName(),member.getAddress());
    calls.add(doSubmitOnAddress(request,SUBMIT_DECODER,member.getAddress()));
  }
  waitWithDeadline(calls,SHUTDOWN_TIMEOUT,TimeUnit.SECONDS,shutdownExceptionHandler);
}
Program: 45906
Project: 45906
Buggy source:
protected IExecutorService exec(int index,QuorumType quorumType){
  return clients.client(index).getExecutorService(EXEC_NAME + quorumType.name());
}

Fixed version (ground truth):
@Override protected IExecutorService exec(int index,QuorumType quorumType){
  return clients.client(index).getExecutorService(EXEC_NAME + quorumType.name());
}
Program: 45907
Project: 45907
Buggy source:
protected IExecutorService exec(int index,QuorumType quorumType,String postfix){
  return clients.client(index).getExecutorService(EXEC_NAME + quorumType.name() + postfix);
}

Fixed version (ground truth):
@Override protected IExecutorService exec(int index,QuorumType quorumType,String postfix){
  return clients.client(index).getExecutorService(EXEC_NAME + quorumType.name() + postfix);
}
Program: 45908
Project: 45908
Buggy source:
protected IMap map(int index){
  return clients.client(index).getMap(MAP_NAME + quorumType.name());
}

Fixed version (ground truth):
@Override protected IMap map(int index){
  return clients.client(index).getMap(MAP_NAME + quorumType.name());
}
Program: 45909
Project: 45909
Buggy source:
protected IMap map(int index){
  return clients.client(index).getMap(MAP_NAME + quorumType.name());
}

Fixed version (ground truth):
@Override protected IMap map(int index){
  return clients.client(index).getMap(MAP_NAME + quorumType.name());
}
Program: 45910
Project: 45910
Buggy source:
public TransactionContext newTransactionContext(int index){
  return clients.client(index).newTransactionContext(options);
}

Fixed version (ground truth):
@Override public TransactionContext newTransactionContext(int index){
  return clients.client(index).newTransactionContext(options);
}
Program: 45911
Project: 45911
Buggy source:
public TransactionContext newTransactionContext(int index){
  return clients.client(index).newTransactionContext(options);
}

Fixed version (ground truth):
@Override public TransactionContext newTransactionContext(int index){
  return clients.client(index).newTransactionContext(options);
}
Program: 45912
Project: 45912
Buggy source:
protected MultiMap map(int index){
  return clients.client(index).getMultiMap(MAP_NAME + quorumType.name());
}

Fixed version (ground truth):
@Override protected MultiMap map(int index){
  return clients.client(index).getMultiMap(MULTI_MAP_NAME + quorumType.name());
}
Program: 45913
Project: 45913
Buggy source:
protected MultiMap map(int index){
  return clients.client(index).getMultiMap(MAP_NAME + quorumType.name());
}

Fixed version (ground truth):
@Override protected MultiMap map(int index){
  return clients.client(index).getMultiMap(MULTI_MAP_NAME + quorumType.name());
}
Program: 45914
Project: 45914
Buggy source:
protected IQueue queue(int index){
  return clients.client(index).getQueue(QUEUE_NAME + quorumType.name());
}

Fixed version (ground truth):
@Override protected IQueue queue(int index){
  return clients.client(index).getQueue(QUEUE_NAME + quorumType.name());
}
Program: 45915
Project: 45915
Buggy source:
protected IQueue queue(int index){
  return clients.client(index).getQueue(QUEUE_NAME + quorumType.name());
}

Fixed version (ground truth):
@Override protected IQueue queue(int index){
  return clients.client(index).getQueue(QUEUE_NAME + quorumType.name());
}
Program: 45916
Project: 45916
Buggy source:
public TransactionContext newTransactionContext(int index){
  return clients.client(index).newTransactionContext(options);
}

Fixed version (ground truth):
@Override public TransactionContext newTransactionContext(int index){
  return clients.client(index).newTransactionContext(options);
}
Program: 45917
Project: 45917
Buggy source:
public TransactionContext newTransactionContext(int index){
  return clients.client(index).newTransactionContext(options);
}

Fixed version (ground truth):
@Override public TransactionContext newTransactionContext(int index){
  return clients.client(index).newTransactionContext(options);
}
Program: 45918
Project: 45918
Buggy source:
protected ReplicatedMap map(int index){
  return clients.client(index).getReplicatedMap(MAP_NAME + quorumType.name());
}

Fixed version (ground truth):
@Override protected ReplicatedMap map(int index){
  return clients.client(index).getReplicatedMap(REPLICATED_MAP_NAME + quorumType.name());
}
Program: 45919
Project: 45919
Buggy source:
protected ReplicatedMap map(int index){
  return clients.client(index).getReplicatedMap(MAP_NAME + quorumType.name());
}

Fixed version (ground truth):
@Override protected ReplicatedMap map(int index){
  return clients.client(index).getReplicatedMap(REPLICATED_MAP_NAME + quorumType.name());
}
Program: 45920
Project: 45920
Buggy source:
protected IScheduledExecutorService exec(int index){
  return exec(index,quorumType);
}

Fixed version (ground truth):
@Override protected IScheduledExecutorService exec(int index){
  return clients.client(index).getScheduledExecutorService(SCHEDULED_EXEC_NAME + quorumType.name());
}
Program: 45921
Project: 45921
Buggy source:
protected IScheduledExecutorService exec(int index,String postfix){
  return exec(index,quorumType,postfix);
}

Fixed version (ground truth):
@Override protected IScheduledExecutorService exec(int index,String postfix){
  return clients.client(index).getScheduledExecutorService(SCHEDULED_EXEC_NAME + quorumType.name() + postfix);
}
Program: 45922
Project: 45922
Buggy source:
protected ISemaphore semaphore(int index){
  return clients.client(index).getSemaphore(SEMAPHORE + quorumType.name());
}

Fixed version (ground truth):
@Override protected ISemaphore semaphore(int index){
  return clients.client(index).getSemaphore(SEMAPHORE + quorumType.name());
}
Program: 45923
Project: 45923
Buggy source:
protected ISemaphore semaphore(int index){
  return clients.client(index).getSemaphore(SEMAPHORE + quorumType.name());
}

Fixed version (ground truth):
@Override protected ISemaphore semaphore(int index){
  return clients.client(index).getSemaphore(SEMAPHORE + quorumType.name());
}
Program: 45924
Project: 45924
Buggy source:
@Override public void onFailure(Throwable t){
}

Fixed version (ground truth):
@Override public void onFailure(Throwable t){
  multiExecutionCallbackWrapper.onResponse(member,t);
}
Program: 45925
Project: 45925
Buggy source:
@Test public void testAwsClient_MemberNonDefaultPortConfig(){
  Map<String,Comparable> props=new HashMap<String,Comparable>();
  props.put(PORT.getDefinition().key(),"String_Node_Str");
  props.put(ACCESS_KEY,System.getenv("String_Node_Str"));
  props.put(SECRET_KEY,System.getenv("String_Node_Str"));
  props.put(TAG_KEY.getDefinition().key(),AWS_TEST_TAG);
  props.put(TAG_VALUE.getDefinition().key(),AWS_TEST_TAG_VALUE);
  props.put(CONNECTION_TIMEOUT_SECONDS.getDefinition().key(),"String_Node_Str");
  if (isOnJenkins()) {
    assertNotNull("String_Node_Str",props.get(ACCESS_KEY));
    assertNotNull("String_Node_Str",props.get(SECRET_KEY));
  }
 else {
    assumeThat("String_Node_Str",props.get(ACCESS_KEY),Matchers.<Comparable>notNullValue());
    assumeThat("String_Node_Str",props.get(SECRET_KEY),Matchers.<Comparable>notNullValue());
  }
  ClientConfig config=new ClientConfig();
  config.getNetworkConfig().getDiscoveryConfig().addDiscoveryStrategyConfig(new DiscoveryStrategyConfig(new AwsDiscoveryStrategyFactory(),props));
  config.setProperty(ClientProperty.DISCOVERY_SPI_ENABLED.getName(),"String_Node_Str");
  config.setProperty(ClientProperty.DISCOVERY_SPI_PUBLIC_IP_ENABLED.getName(),"String_Node_Str");
  HazelcastInstance client=HazelcastClient.newHazelcastClient(config);
  IMap<Object,Object> map=client.getMap("String_Node_Str");
  map.put(1,5);
  assertEquals(5,map.get(1));
}

Fixed version (ground truth):
@Test public void testAwsClient_MemberNonDefaultPortConfig(){
  Map<String,Comparable> props=new HashMap<String,Comparable>();
  props.put(PORT.getDefinition().key(),"String_Node_Str");
  props.put(ACCESS_KEY,System.getenv("String_Node_Str"));
  props.put(SECRET_KEY,System.getenv("String_Node_Str"));
  props.put(TAG_KEY.getDefinition().key(),AWS_TEST_TAG);
  props.put(TAG_VALUE.getDefinition().key(),AWS_TEST_TAG_VALUE);
  props.put(CONNECTION_TIMEOUT_SECONDS.getDefinition().key(),"String_Node_Str");
  if (isOnJenkins()) {
    assertNotNull("String_Node_Str",props.get(ACCESS_KEY));
    assertNotNull("String_Node_Str",props.get(SECRET_KEY));
  }
 else {
    assumeThat("String_Node_Str",props.get(ACCESS_KEY),is(notNullValue()));
    assumeThat("String_Node_Str",props.get(SECRET_KEY),is(notNullValue()));
  }
  ClientConfig config=new ClientConfig();
  config.getNetworkConfig().getDiscoveryConfig().addDiscoveryStrategyConfig(new DiscoveryStrategyConfig(new AwsDiscoveryStrategyFactory(),props));
  config.setProperty(ClientProperty.DISCOVERY_SPI_ENABLED.getName(),"String_Node_Str");
  config.setProperty(ClientProperty.DISCOVERY_SPI_PUBLIC_IP_ENABLED.getName(),"String_Node_Str");
  HazelcastInstance client=HazelcastClient.newHazelcastClient(config);
  IMap<Object,Object> map=client.getMap("String_Node_Str");
  map.put(1,5);
  assertEquals(5,map.get(1));
}
Program: 45927
Project: 45927
Buggy source:
private static void boundsCheck(final byte[] buffer,final int index,final int length){
  if (SHOULD_BOUNDS_CHECK) {
    final int capacity=buffer.length;
    if (index < 0 || length < 0 || (index + length) > capacity) {
      throw new IndexOutOfBoundsException(String.format("String_Node_Str",index,length,capacity));
    }
  }
}

Fixed version (ground truth):
private static void boundsCheck(final byte[] buffer,final int index,final int length){
  if (SHOULD_BOUNDS_CHECK) {
    ArrayUtils.boundsCheck(buffer.length,index,length);
  }
}
Program: 45928
Project: 45928
Buggy source:
@Override public final int read(byte[] b,int off,int len) throws EOFException {
  if (b == null) {
    throw new NullPointerException();
  }
 else   if (off < 0 || len < 0 || len > b.length - off) {
    throw new IndexOutOfBoundsException();
  }
 else   if (len == 0) {
    return 0;
  }
  if (pos >= size) {
    return -1;
  }
  if (pos + len > size) {
    len=size - pos;
  }
  System.arraycopy(data,pos,b,off,len);
  pos+=len;
  return len;
}

Fixed version (ground truth):
@Override public final int read(byte[] b,int off,int len) throws EOFException {
  if (b == null) {
    throw new NullPointerException();
  }
 else {
    ArrayUtils.boundsCheck(b.length,off,len);
  }
  if (len == 0) {
    return 0;
  }
  if (pos >= size) {
    return -1;
  }
  if (pos + len > size) {
    len=size - pos;
  }
  System.arraycopy(data,pos,b,off,len);
  pos+=len;
  return len;
}
Program: 45929
Project: 45929
Buggy source:
@Override public void write(byte[] b,int off,int len){
  if ((off < 0) || (len < 0) || ((off + len) > b.length)) {
    throw new IndexOutOfBoundsException();
  }
 else   if (len == 0) {
    return;
  }
  ensureAvailable(len);
  System.arraycopy(b,off,buffer,pos,len);
  pos+=len;
}

Fixed version (ground truth):
@Override public void write(byte[] b,int off,int len){
  if (b == null) {
    throw new NullPointerException();
  }
 else {
    ArrayUtils.boundsCheck(b.length,off,len);
  }
  if (len == 0) {
    return;
  }
  ensureAvailable(len);
  System.arraycopy(b,off,buffer,pos,len);
  pos+=len;
}
Program: 45930
Project: 45930
Buggy source:
private static void boundsCheck(final byte[] buffer,final int index,final int length){
  if (SHOULD_BOUNDS_CHECK) {
    final int capacity=buffer.length;
    if (index < 0 || length < 0 || (index + length) > capacity) {
      throw new IndexOutOfBoundsException(String.format("String_Node_Str",index,length,capacity));
    }
  }
}

Fixed version (ground truth):
private static void boundsCheck(final byte[] buffer,final int index,final int length){
  if (SHOULD_BOUNDS_CHECK) {
    ArrayUtils.boundsCheck(buffer.length,index,length);
  }
}
Program: 45931
Project: 45931
Buggy source:
@Override public final int read(byte[] b,int off,int len) throws EOFException {
  if (b == null) {
    throw new NullPointerException();
  }
 else   if (off < 0 || len < 0 || len > b.length - off) {
    throw new IndexOutOfBoundsException();
  }
 else   if (len == 0) {
    return 0;
  }
  if (pos >= size) {
    return -1;
  }
  if (pos + len > size) {
    len=size - pos;
  }
  System.arraycopy(data,pos,b,off,len);
  pos+=len;
  return len;
}

Fixed version (ground truth):
@Override public final int read(byte[] b,int off,int len) throws EOFException {
  if (b == null) {
    throw new NullPointerException();
  }
 else {
    ArrayUtils.boundsCheck(b.length,off,len);
  }
  if (len == 0) {
    return 0;
  }
  if (pos >= size) {
    return -1;
  }
  if (pos + len > size) {
    len=size - pos;
  }
  System.arraycopy(data,pos,b,off,len);
  pos+=len;
  return len;
}
Program: 45932
Project: 45932
Buggy source:
@Override public void write(byte[] b,int off,int len){
  if ((off < 0) || (len < 0) || ((off + len) > b.length)) {
    throw new IndexOutOfBoundsException();
  }
 else   if (len == 0) {
    return;
  }
  ensureAvailable(len);
  System.arraycopy(b,off,buffer,pos,len);
  pos+=len;
}

Fixed version (ground truth):
@Override public void write(byte[] b,int off,int len){
  if (b == null) {
    throw new NullPointerException();
  }
 else {
    ArrayUtils.boundsCheck(b.length,off,len);
  }
  if (len == 0) {
    return;
  }
  ensureAvailable(len);
  System.arraycopy(b,off,buffer,pos,len);
  pos+=len;
}
Program: 45933
Project: 45933
Buggy source:
@Override public void readData(ObjectDataInput in) throws IOException {
  attributeName=in.readUTF();
  expression=in.readUTF();
}

Fixed version (ground truth):
@Override public void readData(ObjectDataInput in) throws IOException {
  super.readData(in);
  expression=in.readUTF();
}
Program: 45934
Project: 45934
Buggy source:
public LikePredicate(String attributeName,String expression){
  this.attributeName=attributeName;
  this.expression=expression;
}

Fixed version (ground truth):
public LikePredicate(String attributeName,String expression){
  super(attributeName);
  this.expression=expression;
}
Program: 45935
Project: 45935
Buggy source:
@Override public void writeData(ObjectDataOutput out) throws IOException {
  out.writeUTF(attributeName);
  out.writeUTF(expression);
}

Fixed version (ground truth):
@Override public void writeData(ObjectDataOutput out) throws IOException {
  super.writeData(out);
  out.writeUTF(expression);
}
Program: 45936
Project: 45936
Buggy source:
@Override public void readData(ObjectDataInput in) throws IOException {
  attributeName=in.readUTF();
  regex=in.readUTF();
}

Fixed version (ground truth):
@Override public void readData(ObjectDataInput in) throws IOException {
  super.readData(in);
  regex=in.readUTF();
}
Program: 45937
Project: 45937
Buggy source:
public RegexPredicate(String attributeName,String regex){
  this.attributeName=attributeName;
  this.regex=regex;
}

Fixed version (ground truth):
public RegexPredicate(String attributeName,String regex){
  super(attributeName);
  this.regex=regex;
}
Program: 45938
Project: 45938
Buggy source:
@Override public void writeData(ObjectDataOutput out) throws IOException {
  out.writeUTF(attributeName);
  out.writeUTF(regex);
}

Fixed version (ground truth):
@Override public void writeData(ObjectDataOutput out) throws IOException {
  super.writeData(out);
  out.writeUTF(regex);
}
Program: 45939
Project: 45939
Buggy source:
/** 
 * Returns the number of registered   {@link javax.cache.spi.CachingProvider} from the static registry in {@link Caching}.
 */
public static int getCachingProviderRegistrySize(){
  try {
    Field providerRegistryField=getProviderRegistryField();
    Map<ClassLoader,Map<String,CachingProvider>> providerMap=getProviderMap(providerRegistryField);
    int count=0;
    for (    Map<String,CachingProvider> providers : providerMap.values()) {
      count+=providers.values().size();
    }
    return count;
  }
 catch (  Exception e) {
    return -1;
  }
}

Fixed version (ground truth):
/** 
 * Returns the number of registered   {@link javax.cache.spi.CachingProvider} from the static registry in {@link Caching}.
 */
public static int getCachingProviderRegistrySize(){
  try {
    Field providerRegistryField=getProviderRegistryField();
    Map<ClassLoader,Map<String,CachingProvider>> providerMap=getProviderMap(providerRegistryField);
    int count=0;
    for (    Map<String,CachingProvider> providers : providerMap.values()) {
      count+=providers.values().size();
    }
    return count;
  }
 catch (  NoClassDefFoundError e) {
    return -1;
  }
catch (  Exception e) {
    return -1;
  }
}
Program: 45940
Project: 45940
Buggy source:
private void invokeOnAllMembers(Operation operation){
  NodeEngineImpl nodeEngine=instance.node.nodeEngine;
  OperationService os=nodeEngine.getOperationService();
  String uuid=nodeEngine.getLocalMember().getUuid();
  operation.setCallerUuid(uuid).setNodeEngine(nodeEngine);
  try {
    for (    Member member : nodeEngine.getClusterService().getMembers()) {
      if (!member.localMember()) {
        os.send(operation,member.getAddress());
      }
 else {
        os.execute(operation);
      }
    }
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}

Fixed version (ground truth):
private void invokeOnAllMembers(Operation operation){
  NodeEngineImpl nodeEngine=instance.node.nodeEngine;
  OperationService os=nodeEngine.getOperationService();
  String uuid=nodeEngine.getLocalMember().getUuid();
  operation.setCallerUuid(uuid).setNodeEngine(nodeEngine);
  try {
    for (    Member member : nodeEngine.getClusterService().getMembers()) {
      if (!member.localMember()) {
        os.invokeOnTarget(ClusterServiceImpl.SERVICE_NAME,operation,member.getAddress());
      }
 else {
        os.execute(operation);
      }
    }
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}
Program: 45941
Project: 45941
Buggy source:
@Override public void promoteLocalLiteMember(){
  MemberImpl member=getLocalMember();
  if (!member.isLiteMember()) {
    throw new IllegalStateException(member + "String_Node_Str");
  }
  MemberImpl master=getMasterMember();
  PromoteLiteMemberOp op=new PromoteLiteMemberOp();
  op.setCallerUuid(member.getUuid());
  InternalCompletableFuture<MembersView> future=nodeEngine.getOperationService().invokeOnTarget(SERVICE_NAME,op,master.getAddress());
  MembersView view=future.join();
  lock.lock();
  try {
    if (!member.getAddress().equals(master.getAddress())) {
      updateMembers(view,master.getAddress(),master.getUuid());
    }
    MemberImpl localMemberInMemberList=membershipManager.getMember(member.getAddress());
    if (localMemberInMemberList.isLiteMember()) {
      throw new IllegalStateException("String_Node_Str" + master.getAddress() + "String_Node_Str"+ getMasterAddress());
    }
    localMember=new MemberImpl(member.getAddress(),member.getVersion(),true,member.getUuid(),member.getAttributes(),false,member.getMemberListJoinVersion(),node.hazelcastInstance);
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
@Override public void promoteLocalLiteMember(){
  MemberImpl member=getLocalMember();
  if (!member.isLiteMember()) {
    throw new IllegalStateException(member + "String_Node_Str");
  }
  MemberImpl master=getMasterMember();
  PromoteLiteMemberOp op=new PromoteLiteMemberOp();
  op.setCallerUuid(member.getUuid());
  InternalCompletableFuture<MembersView> future=nodeEngine.getOperationService().invokeOnTarget(SERVICE_NAME,op,master.getAddress());
  MembersView view=future.join();
  lock.lock();
  try {
    if (!member.getAddress().equals(master.getAddress())) {
      updateMembers(view,master.getAddress(),master.getUuid());
    }
    MemberImpl localMemberInMemberList=membershipManager.getMember(member.getAddress());
    if (localMemberInMemberList.isLiteMember()) {
      throw new IllegalStateException("String_Node_Str" + master.getAddress() + "String_Node_Str"+ getMasterAddress());
    }
  }
  finally {
    lock.unlock();
  }
}
Program: 45942
Project: 45942
Buggy source:
public void updateMemberAttribute(String uuid,MemberAttributeOperationType operationType,String key,Object value){
  lock.lock();
  try {
    for (    MemberImpl member : membershipManager.getMembers()) {
      if (member.getUuid().equals(uuid)) {
        if (!member.equals(getLocalMember())) {
          member.updateAttribute(operationType,key,value);
        }
        sendMemberAttributeEvent(member,operationType,key,value);
        break;
      }
    }
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
public void updateMemberAttribute(String uuid,MemberAttributeOperationType operationType,String key,Object value){
  lock.lock();
  try {
    MemberImpl member=membershipManager.getMember(uuid);
    if (!member.equals(getLocalMember())) {
      member.updateAttribute(operationType,key,value);
    }
    sendMemberAttributeEvent(member,operationType,key,value);
  }
  finally {
    lock.unlock();
  }
}
Program: 45943
Project: 45943
Buggy source:
private MemberImpl createNewMemberImplIfChanged(MemberInfo newMemberInfo,MemberImpl member){
  if (member.isLiteMember() && !newMemberInfo.isLiteMember()) {
    logger.info(member + "String_Node_Str");
    member=createMember(newMemberInfo);
  }
 else   if (member.getMemberListJoinVersion() != newMemberInfo.getMemberListJoinVersion()) {
    if (member.getMemberListJoinVersion() != NA_MEMBER_LIST_JOIN_VERSION) {
      logger.fine("String_Node_Str" + member + "String_Node_Str"+ newMemberInfo.getMemberListJoinVersion()+ "String_Node_Str"+ member.getMemberListJoinVersion());
    }
    member=createMember(newMemberInfo);
  }
  return member;
}

Fixed version (ground truth):
private MemberImpl createNewMemberImplIfChanged(MemberInfo newMemberInfo,MemberImpl member){
  if (member.isLiteMember() && !newMemberInfo.isLiteMember()) {
    logger.info(member + "String_Node_Str");
    if (member.localMember()) {
      member=clusterService.promoteAndGetLocalMember();
    }
 else {
      member=createMember(newMemberInfo,member.getAttributes());
    }
  }
 else   if (member.getMemberListJoinVersion() != newMemberInfo.getMemberListJoinVersion()) {
    if (member.getMemberListJoinVersion() != NA_MEMBER_LIST_JOIN_VERSION) {
      logger.fine("String_Node_Str" + member + "String_Node_Str"+ newMemberInfo.getMemberListJoinVersion()+ "String_Node_Str"+ member.getMemberListJoinVersion());
    }
    if (member.localMember()) {
      setLocalMemberListJoinVersion(newMemberInfo.getMemberListJoinVersion());
      member=clusterService.getLocalMember();
    }
 else {
      member=createMember(newMemberInfo,member.getAttributes());
    }
  }
  return member;
}
Program: 45944
Project: 45944
Buggy source:
private MemberImpl createMember(MemberInfo memberInfo){
  Address address=memberInfo.getAddress();
  Address thisAddress=node.getThisAddress();
  String ipV6ScopeId=thisAddress.getScopeId();
  address.setScopeId(ipV6ScopeId);
  boolean localMember=thisAddress.equals(address);
  return new MemberImpl(address,memberInfo.getVersion(),localMember,memberInfo.getUuid(),memberInfo.getAttributes(),memberInfo.isLiteMember(),memberInfo.getMemberListJoinVersion(),node.hazelcastInstance);
}

Fixed version (ground truth):
private MemberImpl createMember(MemberInfo memberInfo,Map<String,Object> attributes){
  Address address=memberInfo.getAddress();
  Address thisAddress=node.getThisAddress();
  String ipV6ScopeId=thisAddress.getScopeId();
  address.setScopeId(ipV6ScopeId);
  boolean localMember=thisAddress.equals(address);
  return new MemberImpl(address,memberInfo.getVersion(),localMember,memberInfo.getUuid(),attributes,memberInfo.isLiteMember(),memberInfo.getMemberListJoinVersion(),node.hazelcastInstance);
}
Program: 45945
Project: 45945
Buggy source:
public MembersView promoteToNormalMember(Address address,String uuid){
  clusterServiceLock.lock();
  try {
    ensureLiteMemberPromotionIsAllowed();
    MemberMap memberMap=getMemberMap();
    MemberImpl member=memberMap.getMember(address,uuid);
    if (member == null) {
      throw new IllegalStateException(uuid + "String_Node_Str" + address+ "String_Node_Str");
    }
    if (!member.isLiteMember()) {
      logger.fine(member + "String_Node_Str");
      return memberMap.toMembersView();
    }
    logger.info("String_Node_Str" + member + "String_Node_Str");
    MemberImpl[] members=memberMap.getMembers().toArray(new MemberImpl[0]);
    for (int i=0; i < members.length; i++) {
      if (member.equals(members[i])) {
        member=new MemberImpl(member.getAddress(),member.getVersion(),member.localMember(),member.getUuid(),member.getAttributes(),false,members[i].getMemberListJoinVersion(),node.hazelcastInstance);
        members[i]=member;
        break;
      }
    }
    MemberMap newMemberMap=MemberMap.createNew(memberMap.getVersion() + 1,members);
    setMembers(newMemberMap);
    sendMemberListToOthers();
    node.partitionService.memberAdded(member);
    clusterService.printMemberList();
    return newMemberMap.toMembersView();
  }
  finally {
    clusterServiceLock.unlock();
  }
}

Fixed version (ground truth):
public MembersView promoteToNormalMember(Address address,String uuid){
  clusterServiceLock.lock();
  try {
    ensureLiteMemberPromotionIsAllowed();
    MemberMap memberMap=getMemberMap();
    MemberImpl member=memberMap.getMember(address,uuid);
    if (member == null) {
      throw new IllegalStateException(uuid + "String_Node_Str" + address+ "String_Node_Str");
    }
    if (!member.isLiteMember()) {
      logger.fine(member + "String_Node_Str");
      return memberMap.toMembersView();
    }
    logger.info("String_Node_Str" + member + "String_Node_Str");
    MemberImpl[] members=memberMap.getMembers().toArray(new MemberImpl[0]);
    for (int i=0; i < members.length; i++) {
      if (member.equals(members[i])) {
        if (member.localMember()) {
          member=clusterService.promoteAndGetLocalMember();
        }
 else {
          member=new MemberImpl(member.getAddress(),member.getVersion(),member.localMember(),member.getUuid(),member.getAttributes(),false,members[i].getMemberListJoinVersion(),node.hazelcastInstance);
        }
        members[i]=member;
        break;
      }
    }
    MemberMap newMemberMap=MemberMap.createNew(memberMap.getVersion() + 1,members);
    setMembers(newMemberMap);
    sendMemberListToOthers();
    node.partitionService.memberAdded(member);
    clusterService.printMemberList();
    return newMemberMap.toMembersView();
  }
  finally {
    clusterServiceLock.unlock();
  }
}
Program: 45946
Project: 45946
Buggy source:
private void invokeOnAllMembers(Operation operation){
  NodeEngineImpl nodeEngine=instance.node.nodeEngine;
  OperationService os=nodeEngine.getOperationService();
  String uuid=nodeEngine.getLocalMember().getUuid();
  operation.setCallerUuid(uuid).setNodeEngine(nodeEngine);
  try {
    for (    Member member : nodeEngine.getClusterService().getMembers()) {
      if (!member.localMember()) {
        os.send(operation,member.getAddress());
      }
 else {
        os.execute(operation);
      }
    }
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}

Fixed version (ground truth):
private void invokeOnAllMembers(Operation operation){
  NodeEngineImpl nodeEngine=instance.node.nodeEngine;
  OperationService os=nodeEngine.getOperationService();
  String uuid=nodeEngine.getLocalMember().getUuid();
  operation.setCallerUuid(uuid).setNodeEngine(nodeEngine);
  try {
    for (    Member member : nodeEngine.getClusterService().getMembers()) {
      if (!member.localMember()) {
        os.invokeOnTarget(ClusterServiceImpl.SERVICE_NAME,operation,member.getAddress());
      }
 else {
        os.execute(operation);
      }
    }
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}