nus-yam/ex-repair huggingface dataset:
Program: 45947
Project: 45947
Buggy source:
@Override public void promoteLocalLiteMember(){
  if (getClusterVersion().isLessThan(Versions.V3_9)) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  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,node.hazelcastInstance);
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
@Override public void promoteLocalLiteMember(){
  if (getClusterVersion().isLessThan(Versions.V3_9)) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  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: 45948
Project: 45948
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: 45949
Project: 45949
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(),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(),node.hazelcastInstance);
}
Program: 45950
Project: 45950
Buggy source:
public MembersView promoteToNormalMember(Address address,String uuid){
  clusterServiceLock.lock();
  try {
    ensureLiteMemberPromotionIsAllowed();
    MemberMap memberMap=memberMapRef.get();
    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,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=memberMapRef.get();
    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,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: 45951
Project: 45951
Buggy source:
@Test public void testConstructor(){
  assertUtilityConstructor(BitSetUtils.class);
}

Fixed version (ground truth):
@Test public void testConstructor(){
  assertUtilityConstructor(SetUtil.class);
}
Program: 45952
Project: 45952
Buggy source:
BaseIndexStore(IndexCopyBehavior copyOn){
  if (copyOn == IndexCopyBehavior.COPY_ON_WRITE || copyOn == IndexCopyBehavior.NEVER) {
    resultCopyFunctor=new PassThroughFunctor();
  }
 else {
    resultCopyFunctor=new CopyInputFunctor();
  }
}

Fixed version (ground truth):
BaseIndexStore(IndexCopyBehavior copyOn){
  this.copyOn=copyOn;
  if (copyOn == IndexCopyBehavior.COPY_ON_WRITE || copyOn == IndexCopyBehavior.NEVER) {
    resultCopyFunctor=new PassThroughFunctor();
  }
 else {
    resultCopyFunctor=new CopyInputFunctor();
  }
}
Program: 45953
Project: 45953
Buggy source:
@Override public void clear(){
  takeWriteLock();
  try {
    recordsWithNullValue.clear();
    recordMap.clear();
  }
  finally {
    releaseWriteLock();
  }
}

Fixed version (ground truth):
@Override public void clear(){
  takeWriteLock();
  try {
    if (copyOn == IndexCopyBehavior.COPY_ON_WRITE) {
      recordsWithNullValue=Collections.emptyMap();
    }
 else {
      recordsWithNullValue.clear();
    }
    recordMap.clear();
  }
  finally {
    releaseWriteLock();
  }
}
Program: 45954
Project: 45954
Buggy source:
@Override public void clear(){
  takeWriteLock();
  try {
    recordsWithNullValue.clear();
    recordMap.clear();
  }
  finally {
    releaseWriteLock();
  }
}

Fixed version (ground truth):
@Override public void clear(){
  takeWriteLock();
  try {
    if (copyOn == IndexCopyBehavior.COPY_ON_WRITE) {
      recordsWithNullValue=Collections.emptyMap();
    }
 else {
      recordsWithNullValue.clear();
    }
    recordMap.clear();
  }
  finally {
    releaseWriteLock();
  }
}
Program: 45955
Project: 45955
Buggy source:
@Override public final void afterRun() throws Exception {
  if (cache != null) {
    afterRunInternal();
  }
}

Fixed version (ground truth):
@Override public final void afterRun() throws Exception {
  if (cache != null) {
    afterRunInternal();
  }
  super.afterRun();
}
Program: 45956
Project: 45956
Buggy source:
@Override public void afterRun() throws Exception {
  if (cache.isWanReplicationEnabled()) {
    CacheRecord record=cache.getRecord(key);
    if (record != null) {
      CacheEntryView<Data,Data> entryView=CacheEntryViews.createDefaultEntryView(key,getNodeEngine().getSerializationService().toData(backupRecord.getValue()),backupRecord);
      wanEventPublisher.publishWanReplicationUpdate(name,entryView);
    }
 else {
      wanEventPublisher.publishWanReplicationRemove(name,key);
    }
  }
}

Fixed version (ground truth):
@Override public void afterRun() throws Exception {
  if (cache.isWanReplicationEnabled()) {
    CacheRecord record=cache.getRecord(key);
    if (record != null) {
      CacheEntryView<Data,Data> entryView=CacheEntryViews.createDefaultEntryView(key,getNodeEngine().getSerializationService().toData(backupRecord.getValue()),backupRecord);
      wanEventPublisher.publishWanReplicationUpdate(name,entryView);
    }
 else {
      wanEventPublisher.publishWanReplicationRemove(name,key);
    }
  }
  super.afterRun();
}
Program: 45957
Project: 45957
Buggy source:
@Override public void afterRun() throws Exception {
  if (response != null) {
    if (cache.isWanReplicationEnabled()) {
      wanEventPublisher.publishWanReplicationRemove(name,key);
    }
  }
}

Fixed version (ground truth):
@Override public void afterRun() throws Exception {
  if (response != null) {
    if (cache.isWanReplicationEnabled()) {
      wanEventPublisher.publishWanReplicationRemove(name,key);
    }
  }
  super.afterRun();
}
Program: 45958
Project: 45958
Buggy source:
@Override public void afterRun() throws Exception {
  if (cache.isWanReplicationEnabled()) {
    CacheEntryView<Data,Data> entryView=CacheEntryViews.createDefaultEntryView(key,getNodeEngine().getSerializationService().toData(backupRecord.getValue()),backupRecord);
    wanEventPublisher.publishWanReplicationUpdate(name,entryView);
  }
}

Fixed version (ground truth):
@Override public void afterRun() throws Exception {
  if (cache.isWanReplicationEnabled()) {
    CacheEntryView<Data,Data> entryView=CacheEntryViews.createDefaultEntryView(key,getNodeEngine().getSerializationService().toData(backupRecord.getValue()),backupRecord);
    wanEventPublisher.publishWanReplicationUpdate(name,entryView);
  }
  super.afterRun();
}
Program: 45959
Project: 45959
Buggy source:
@Override public void afterRun() throws Exception {
  if (Boolean.TRUE.equals(response)) {
    if (cache.isWanReplicationEnabled()) {
      CacheEntryView<Data,Data> entryView=CacheEntryViews.createDefaultEntryView(key,value,backupRecord);
      wanEventPublisher.publishWanReplicationUpdate(name,entryView);
    }
  }
}

Fixed version (ground truth):
@Override public void afterRun() throws Exception {
  if (Boolean.TRUE.equals(response)) {
    if (cache.isWanReplicationEnabled()) {
      CacheEntryView<Data,Data> entryView=CacheEntryViews.createDefaultEntryView(key,value,backupRecord);
      wanEventPublisher.publishWanReplicationUpdate(name,entryView);
    }
  }
  super.afterRun();
}
Program: 45960
Project: 45960
Buggy source:
@Override public void afterRun() throws Exception {
  if (cache.isWanReplicationEnabled()) {
    CacheEntryView<Data,Data> entryView=CacheEntryViews.createDefaultEntryView(key,value,backupRecord);
    CacheWanEventPublisher publisher=cacheService.getCacheWanEventPublisher();
    publisher.publishWanReplicationUpdate(name,entryView);
  }
}

Fixed version (ground truth):
@Override public void afterRun() throws Exception {
  if (cache.isWanReplicationEnabled()) {
    CacheEntryView<Data,Data> entryView=CacheEntryViews.createDefaultEntryView(key,value,backupRecord);
    CacheWanEventPublisher publisher=cacheService.getCacheWanEventPublisher();
    publisher.publishWanReplicationUpdate(name,entryView);
  }
  super.afterRun();
}
Program: 45961
Project: 45961
Buggy source:
@Override public void afterRun() throws Exception {
  if (Boolean.TRUE.equals(response)) {
    if (cache.isWanReplicationEnabled()) {
      wanEventPublisher.publishWanReplicationRemove(name,key);
    }
  }
}

Fixed version (ground truth):
@Override public void afterRun() throws Exception {
  if (Boolean.TRUE.equals(response)) {
    if (cache.isWanReplicationEnabled()) {
      wanEventPublisher.publishWanReplicationRemove(name,key);
    }
  }
  super.afterRun();
}
Program: 45962
Project: 45962
Buggy source:
@Override public void afterRun() throws Exception {
  if (Boolean.TRUE.equals(response)) {
    if (cache.isWanReplicationEnabled()) {
      CacheEntryView<Data,Data> entryView=CacheEntryViews.createDefaultEntryView(key,newValue,backupRecord);
      wanEventPublisher.publishWanReplicationUpdate(name,entryView);
    }
  }
}

Fixed version (ground truth):
@Override public void afterRun() throws Exception {
  if (Boolean.TRUE.equals(response)) {
    if (cache.isWanReplicationEnabled()) {
      CacheEntryView<Data,Data> entryView=CacheEntryViews.createDefaultEntryView(key,newValue,backupRecord);
      wanEventPublisher.publishWanReplicationUpdate(name,entryView);
    }
  }
  super.afterRun();
}
Program: 45963
Project: 45963
Buggy source:
protected ResultFuture(NodeEngine nodeEngine,ILogger logger){
  super(nodeEngine,logger);
}

Fixed version (ground truth):
ResultFuture(NodeEngine nodeEngine,ILogger logger){
  super(nodeEngine,logger);
}
Program: 45964
Project: 45964
Buggy source:
protected ResultFuture(NodeEngine nodeEngine,ILogger logger){
  super(nodeEngine,logger);
}

Fixed version (ground truth):
ResultFuture(NodeEngine nodeEngine,ILogger logger){
  super(nodeEngine,logger);
}
Program: 45965
Project: 45965
Buggy source:
private void invoke(ClientMessage request){
  try {
    ClientInvocation invocation=new ClientInvocation(instance,request,null);
    ClientInvocationFuture future=invocation.invoke();
    ClientMessage response=future.get();
  }
 catch (  Exception e) {
    throw rethrow(e);
  }
}

Fixed version (ground truth):
private void invoke(ClientMessage request){
  try {
    ClientInvocation invocation=new ClientInvocation(instance,request,null);
    ClientInvocationFuture future=invocation.invoke();
    future.get();
  }
 catch (  Exception e) {
    throw rethrow(e);
  }
}
Program: 45966
Project: 45966
Buggy source:
@Test public void serverRestartWhenReliableTopicListenerRegistered(){
  HazelcastInstance server=hazelcastFactory.newHazelcastInstance();
  HazelcastInstance hazelcastClient=hazelcastFactory.newHazelcastClient();
  HazelcastInstance hazelcastClient2=hazelcastFactory.newHazelcastClient();
  ITopic<Integer> topic=hazelcastClient.getReliableTopic(topicName);
  final ITopic<Integer> topic2=hazelcastClient2.getReliableTopic(topicName);
  final CountDownLatch listenerLatch=new CountDownLatch(1);
  topic.addMessageListener(new MessageListener<Integer>(){
    @Override public void onMessage(    Message<Integer> message){
      listenerLatch.countDown();
    }
  }
);
  server.getLifecycleService().terminate();
  hazelcastFactory.newHazelcastInstance();
  topic2.publish(5);
  assertOpenEventually(listenerLatch);
}

Fixed version (ground truth):
@Test public void serverRestartWhenReliableTopicListenerRegistered(){
  HazelcastInstance server=hazelcastFactory.newHazelcastInstance();
  ClientConfig clientConfig=new ClientConfig();
  clientConfig.getNetworkConfig().setConnectionAttemptLimit(Integer.MAX_VALUE);
  HazelcastInstance hazelcastClient=hazelcastFactory.newHazelcastClient(clientConfig);
  HazelcastInstance hazelcastClient2=hazelcastFactory.newHazelcastClient(clientConfig);
  ITopic<Integer> topic=hazelcastClient.getReliableTopic(topicName);
  final ITopic<Integer> topic2=hazelcastClient2.getReliableTopic(topicName);
  final CountDownLatch listenerLatch=new CountDownLatch(1);
  topic.addMessageListener(new MessageListener<Integer>(){
    @Override public void onMessage(    Message<Integer> message){
      listenerLatch.countDown();
    }
  }
);
  server.getLifecycleService().terminate();
  hazelcastFactory.newHazelcastInstance();
  topic2.publish(5);
  assertOpenEventually(listenerLatch);
}
Program: 45967
Project: 45967
Buggy source:
@Test public void serverRestartWhenReliableTopicListenerRegistered(){
  HazelcastInstance server=hazelcastFactory.newHazelcastInstance();
  HazelcastInstance hazelcastClient=hazelcastFactory.newHazelcastClient();
  HazelcastInstance hazelcastClient2=hazelcastFactory.newHazelcastClient();
  ITopic<Integer> topic=hazelcastClient.getReliableTopic(topicName);
  final ITopic<Integer> topic2=hazelcastClient2.getReliableTopic(topicName);
  final CountDownLatch listenerLatch=new CountDownLatch(1);
  topic.addMessageListener(new MessageListener<Integer>(){
    @Override public void onMessage(    Message<Integer> message){
      listenerLatch.countDown();
    }
  }
);
  server.getLifecycleService().terminate();
  hazelcastFactory.newHazelcastInstance();
  topic2.publish(5);
  assertOpenEventually(listenerLatch);
}

Fixed version (ground truth):
@Test public void serverRestartWhenReliableTopicListenerRegistered(){
  HazelcastInstance server=hazelcastFactory.newHazelcastInstance();
  ClientConfig clientConfig=new ClientConfig();
  clientConfig.getNetworkConfig().setConnectionAttemptLimit(Integer.MAX_VALUE);
  HazelcastInstance hazelcastClient=hazelcastFactory.newHazelcastClient(clientConfig);
  HazelcastInstance hazelcastClient2=hazelcastFactory.newHazelcastClient(clientConfig);
  ITopic<Integer> topic=hazelcastClient.getReliableTopic(topicName);
  final ITopic<Integer> topic2=hazelcastClient2.getReliableTopic(topicName);
  final CountDownLatch listenerLatch=new CountDownLatch(1);
  topic.addMessageListener(new MessageListener<Integer>(){
    @Override public void onMessage(    Message<Integer> message){
      listenerLatch.countDown();
    }
  }
);
  server.getLifecycleService().terminate();
  hazelcastFactory.newHazelcastInstance();
  topic2.publish(5);
  assertOpenEventually(listenerLatch);
}
Program: 45968
Project: 45968
Buggy source:
private void invokeOnSelection(){
  invokeCount++;
  try {
    if (isBindToSingleConnection()) {
      invocationService.invokeOnConnection(this,(ClientConnection)connection);
    }
 else     if (partitionId != -1) {
      invocationService.invokeOnPartitionOwner(this,partitionId);
    }
 else     if (address != null) {
      invocationService.invokeOnTarget(this,address);
    }
 else {
      invocationService.invokeOnRandomTarget(this);
    }
  }
 catch (  Exception e) {
    if (e instanceof HazelcastOverloadException) {
      throw (HazelcastOverloadException)e;
    }
    notifyException(e);
  }
}

Fixed version (ground truth):
private void invokeOnSelection(){
  INVOKE_COUNT.incrementAndGet(this);
  try {
    if (isBindToSingleConnection()) {
      invocationService.invokeOnConnection(this,(ClientConnection)connection);
    }
 else     if (partitionId != -1) {
      invocationService.invokeOnPartitionOwner(this,partitionId);
    }
 else     if (address != null) {
      invocationService.invokeOnTarget(this,address);
    }
 else {
      invocationService.invokeOnRandomTarget(this);
    }
  }
 catch (  Exception e) {
    if (e instanceof HazelcastOverloadException) {
      throw (HazelcastOverloadException)e;
    }
    notifyException(e);
  }
}
Program: 45969
Project: 45969
Buggy source:
/** 
 * @param operationFactory operation factory to use
 * @param partitions       partitions to invoke on
 */
public PartitionIteratingOperation(OperationFactory operationFactory,int[] partitions){
  this.operationFactory=operationFactory;
  this.partitions=partitions;
}

Fixed version (ground truth):
/** 
 * @param operationFactory operation factory to use
 * @param partitions       partitions to invoke on
 */
@SuppressFBWarnings("String_Node_Str") public PartitionIteratingOperation(OperationFactory operationFactory,int[] partitions){
  this.operationFactory=operationFactory;
  this.partitions=partitions;
}
Program: 45970
Project: 45970
Buggy source:
/** 
 * UnRegisters the mxbean if registered already.
 * @param cacheManagerName name generated by URI and classloader.
 * @param name cache name.
 * @param stats is mxbean, a statistics mxbean.
 */
public static void unregisterCacheObject(String cacheManagerName,String name,boolean stats){
synchronized (mBeanServer) {
    ObjectName objectName=calculateObjectName(cacheManagerName,name,stats);
    Set<ObjectName> registeredObjectNames=mBeanServer.queryNames(objectName,null);
    if (isRegistered(cacheManagerName,name,stats)) {
      for (      ObjectName registeredObjectName : registeredObjectNames) {
        try {
          mBeanServer.unregisterMBean(registeredObjectName);
        }
 catch (        Exception e) {
          throw new CacheException("String_Node_Str" + registeredObjectName + "String_Node_Str"+ e.getMessage(),e);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * UnRegisters the mxbean if registered already.
 * @param cacheManagerName name generated by URI and classloader.
 * @param name             cache name.
 * @param stats            is mxbean, a statistics mxbean.
 */
public static void unregisterCacheObject(String cacheManagerName,String name,boolean stats){
synchronized (mBeanServer) {
    ObjectName objectName=calculateObjectName(cacheManagerName,name,stats);
    Set<ObjectName> registeredObjectNames=mBeanServer.queryNames(objectName,null);
    if (isRegistered(cacheManagerName,name,stats)) {
      for (      ObjectName registeredObjectName : registeredObjectNames) {
        try {
          mBeanServer.unregisterMBean(registeredObjectName);
        }
 catch (        InstanceNotFoundException e) {
          ignore(e);
        }
catch (        Exception e) {
          throw new CacheException("String_Node_Str" + registeredObjectName + "String_Node_Str"+ e.getMessage(),e);
        }
      }
    }
  }
}
Program: 45971
Project: 45971
Buggy source:
/** 
 * Registers the provided   {@link javax.cache.management.CacheMXBean} or{@link javax.cache.management.CacheStatisticsMXBean} implementations if not registered yet.
 * @param mxbean {@link javax.cache.management.CacheMXBean} or {@link javax.cache.management.CacheStatisticsMXBean}.
 * @param cacheManagerName name generated by URI and classloader.
 * @param name cache name.
 * @param stats is mxbean parameter, a statistics mxbean.
 */
public static void registerCacheObject(Object mxbean,String cacheManagerName,String name,boolean stats){
synchronized (mBeanServer) {
    ObjectName registeredObjectName=calculateObjectName(cacheManagerName,name,stats);
    try {
      if (!isRegistered(cacheManagerName,name,stats)) {
        mBeanServer.registerMBean(mxbean,registeredObjectName);
      }
    }
 catch (    Exception e) {
      throw new CacheException("String_Node_Str" + registeredObjectName + "String_Node_Str"+ e.getMessage(),e);
    }
  }
}

Fixed version (ground truth):
/** 
 * Registers the provided   {@link javax.cache.management.CacheMXBean} or{@link javax.cache.management.CacheStatisticsMXBean} implementations if not registered yet.
 * @param mxbean           {@link javax.cache.management.CacheMXBean} or {@link javax.cache.management.CacheStatisticsMXBean}.
 * @param cacheManagerName name generated by URI and classloader.
 * @param name             cache name.
 * @param stats            is mxbean parameter, a statistics mxbean.
 */
public static void registerCacheObject(Object mxbean,String cacheManagerName,String name,boolean stats){
synchronized (mBeanServer) {
    ObjectName registeredObjectName=calculateObjectName(cacheManagerName,name,stats);
    try {
      if (!isRegistered(cacheManagerName,name,stats)) {
        mBeanServer.registerMBean(mxbean,registeredObjectName);
      }
    }
 catch (    Exception e) {
      throw new CacheException("String_Node_Str" + registeredObjectName + "String_Node_Str"+ e.getMessage(),e);
    }
  }
}
Program: 45972
Project: 45972
Buggy source:
@Override public SecurityService getSecurityService(){
  return new NoOpSecurityService(node.getConfig().getSecurityConfig().getClientPermissionConfigs());
}

Fixed version (ground truth):
@Override public SecurityService getSecurityService(){
  return null;
}
Program: 45973
Project: 45973
Buggy source:
private void doHandleUpdatePermissions(HttpPostCommand command) throws UnsupportedEncodingException {
  if (!checkCredentials(command)) {
    String res=response(ResponseType.FORBIDDEN);
    command.setResponse(HttpCommand.CONTENT_TYPE_JSON,stringToBytes(res));
    return;
  }
  SecurityService securityService=textCommandService.getNode().getSecurityService();
  if (securityService instanceof NoOpSecurityService) {
    String res=response(ResponseType.FAIL,"String_Node_Str","String_Node_Str");
    command.setResponse(HttpCommand.CONTENT_TYPE_JSON,stringToBytes(res));
    return;
  }
  String res;
  byte[] data=command.getData();
  String[] strList=bytesToString(data).split("String_Node_Str");
  String permConfigsJSON=URLDecoder.decode(strList[2],"String_Node_Str");
  try {
    UpdatePermissionConfigRequest request=new UpdatePermissionConfigRequest();
    request.fromJson(Json.parse(permConfigsJSON).asObject());
    securityService.refreshClientPermissions(request.getPermissionConfigs());
    res=response(ResponseType.SUCCESS,"String_Node_Str","String_Node_Str");
  }
 catch (  Exception ex) {
    logger.warning("String_Node_Str",ex);
    res=exceptionResponse(ex);
  }
  command.setResponse(HttpCommand.CONTENT_TYPE_JSON,stringToBytes(res));
}

Fixed version (ground truth):
private void doHandleUpdatePermissions(HttpPostCommand command) throws UnsupportedEncodingException {
  if (!checkCredentials(command)) {
    String res=response(ResponseType.FORBIDDEN);
    command.setResponse(HttpCommand.CONTENT_TYPE_JSON,stringToBytes(res));
    return;
  }
  SecurityService securityService=textCommandService.getNode().getSecurityService();
  if (securityService == null) {
    String res=response(ResponseType.FAIL,"String_Node_Str","String_Node_Str");
    command.setResponse(HttpCommand.CONTENT_TYPE_JSON,stringToBytes(res));
    return;
  }
  String res;
  byte[] data=command.getData();
  String[] strList=bytesToString(data).split("String_Node_Str");
  String permConfigsJSON=URLDecoder.decode(strList[2],"String_Node_Str");
  try {
    UpdatePermissionConfigRequest request=new UpdatePermissionConfigRequest();
    request.fromJson(Json.parse(permConfigsJSON).asObject());
    securityService.refreshClientPermissions(request.getPermissionConfigs());
    res=response(ResponseType.SUCCESS,"String_Node_Str","String_Node_Str");
  }
 catch (  Exception ex) {
    logger.warning("String_Node_Str",ex);
    res=exceptionResponse(ex);
  }
  command.setResponse(HttpCommand.CONTENT_TYPE_JSON,stringToBytes(res));
}
Program: 45974
Project: 45974
Buggy source:
@Override public List<SecurityInterceptorConfig> getSecurityInterceptorConfigs(){
  return securityConfig.getSecurityInterceptorConfigs();
}

Fixed version (ground truth):
@Override public List<SecurityInterceptorConfig> getSecurityInterceptorConfigs(){
  return staticSecurityConfig.getSecurityInterceptorConfigs();
}
Program: 45975
Project: 45975
Buggy source:
/** 
 * Returns existing client permissions as an unmodifiable   {@link Set}. You may use this set to create your client permissions set and pass it   {@link #setClientPermissionConfigs(Set)} to update client permissions.
 */
@Override public Set<PermissionConfig> getClientPermissionConfigs(){
  return Collections.unmodifiableSet(securityService.getClientPermissionConfigs());
}

Fixed version (ground truth):
/** 
 * Returns existing client permissions as an unmodifiable   {@link Set}. You may use this set to create your client permissions set and pass it   {@link #setClientPermissionConfigs(Set)} to update client permissions.
 */
@Override public Set<PermissionConfig> getClientPermissionConfigs(){
  Set<PermissionConfig> permissionConfigs=securityService != null ? securityService.getClientPermissionConfigs() : staticSecurityConfig.getClientPermissionConfigs();
  return Collections.unmodifiableSet(permissionConfigs);
}
Program: 45976
Project: 45976
Buggy source:
/** 
 * Updates client permission configuration cluster-wide.
 */
@Override public SecurityConfig setClientPermissionConfigs(Set<PermissionConfig> permissions){
  securityService.refreshClientPermissions(permissions);
  securityConfig.setClientPermissionConfigs(permissions);
  return securityConfig;
}

Fixed version (ground truth):
/** 
 * Updates client permission configuration cluster-wide.
 */
@Override public SecurityConfig setClientPermissionConfigs(Set<PermissionConfig> permissions){
  if (securityService == null) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  securityService.refreshClientPermissions(permissions);
  return this;
}
Program: 45977
Project: 45977
Buggy source:
@Override public CredentialsFactoryConfig getMemberCredentialsConfig(){
  return securityConfig.getMemberCredentialsConfig();
}

Fixed version (ground truth):
@Override public CredentialsFactoryConfig getMemberCredentialsConfig(){
  return staticSecurityConfig.getMemberCredentialsConfig();
}
Program: 45978
Project: 45978
Buggy source:
@Override public List<LoginModuleConfig> getMemberLoginModuleConfigs(){
  return securityConfig.getMemberLoginModuleConfigs();
}

Fixed version (ground truth):
@Override public List<LoginModuleConfig> getMemberLoginModuleConfigs(){
  return staticSecurityConfig.getMemberLoginModuleConfigs();
}
Program: 45979
Project: 45979
Buggy source:
@Override public PermissionPolicyConfig getClientPolicyConfig(){
  return securityConfig.getClientPolicyConfig();
}

Fixed version (ground truth):
@Override public PermissionPolicyConfig getClientPolicyConfig(){
  return staticSecurityConfig.getClientPolicyConfig();
}
Program: 45980
Project: 45980
Buggy source:
public DynamicSecurityConfig(SecurityConfig securityConfig,SecurityService securityService){
  this.securityConfig=securityConfig;
  this.securityService=securityService;
}

Fixed version (ground truth):
public DynamicSecurityConfig(SecurityConfig staticSecurityConfig,SecurityService securityService){
  this.staticSecurityConfig=staticSecurityConfig;
  this.securityService=securityService;
}
Program: 45981
Project: 45981
Buggy source:
@Override public List<LoginModuleConfig> getClientLoginModuleConfigs(){
  return securityConfig.getClientLoginModuleConfigs();
}

Fixed version (ground truth):
@Override public List<LoginModuleConfig> getClientLoginModuleConfigs(){
  return staticSecurityConfig.getClientLoginModuleConfigs();
}
Program: 45982
Project: 45982
Buggy source:
@Override public boolean isEnabled(){
  return securityConfig.isEnabled();
}

Fixed version (ground truth):
@Override public boolean isEnabled(){
  return staticSecurityConfig.isEnabled();
}
Program: 45983
Project: 45983
Buggy source:
@Override public void run() throws Exception {
  HazelcastInstanceImpl instance=(HazelcastInstanceImpl)getNodeEngine().getHazelcastInstance();
  instance.node.securityContext.refreshPermissions(permissionConfigs);
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  Node node=((NodeEngineImpl)getNodeEngine()).getNode();
  node.securityContext.refreshPermissions(permissionConfigs);
}
Program: 45984
Project: 45984
Buggy source:
private void disconnectFromCluster(final ClientConnection connection){
  clusterConnectionExecutor.submit(new Callable<Void>(){
    @Override public Void call() throws Exception {
      Address endpoint=connection.getEndPoint();
      if (endpoint == null || !endpoint.equals(ownerConnectionAddress)) {
        return null;
      }
      setOwnerConnectionAddress(null);
      connectionStrategy.onDisconnectFromCluster();
      if (client.getLifecycleService().isRunning()) {
        fireConnectionEvent(LifecycleEvent.LifecycleState.CLIENT_DISCONNECTED);
      }
      return null;
    }
  }
);
}

Fixed version (ground truth):
private void disconnectFromCluster(final ClientConnection connection){
  clusterConnectionExecutor.execute(new Runnable(){
    @Override public void run(){
      Address endpoint=connection.getEndPoint();
      if (endpoint == null || !endpoint.equals(ownerConnectionAddress)) {
        return;
      }
      setOwnerConnectionAddress(null);
      connectionStrategy.onDisconnectFromCluster();
      if (client.getLifecycleService().isRunning()) {
        fireConnectionEvent(LifecycleEvent.LifecycleState.CLIENT_DISCONNECTED);
      }
    }
  }
);
}
Program: 45985
Project: 45985
Buggy source:
private static int getReconciliationIntervalSeconds(HazelcastProperties properties){
  int reconciliationIntervalSeconds=properties.getInteger(RECONCILIATION_INTERVAL_SECONDS);
  int minReconciliationIntervalSeconds=properties.getInteger(MIN_RECONCILIATION_INTERVAL_SECONDS);
  if (reconciliationIntervalSeconds < 0 || reconciliationIntervalSeconds > 0L && reconciliationIntervalSeconds < minReconciliationIntervalSeconds) {
    String msg=format("String_Node_Str" + "String_Node_Str",MIN_RECONCILIATION_INTERVAL_SECONDS,reconciliationIntervalSeconds);
    throw new IllegalArgumentException(msg);
  }
  return reconciliationIntervalSeconds;
}

Fixed version (ground truth):
private static int getReconciliationIntervalSeconds(HazelcastProperties properties){
  int reconciliationIntervalSeconds=properties.getInteger(RECONCILIATION_INTERVAL_SECONDS);
  int minReconciliationIntervalSeconds=properties.getInteger(MIN_RECONCILIATION_INTERVAL_SECONDS);
  if (reconciliationIntervalSeconds < 0 || reconciliationIntervalSeconds > 0 && reconciliationIntervalSeconds < minReconciliationIntervalSeconds) {
    String msg=format("String_Node_Str" + "String_Node_Str",MIN_RECONCILIATION_INTERVAL_SECONDS.getDefaultValue(),reconciliationIntervalSeconds);
    throw new IllegalArgumentException(msg);
  }
  return reconciliationIntervalSeconds;
}
Program: 45986
Project: 45986
Buggy source:
private int getReconciliationIntervalSeconds(HazelcastProperties properties){
  int reconciliationIntervalSeconds=properties.getInteger(RECONCILIATION_INTERVAL_SECONDS);
  int minReconciliationIntervalSeconds=properties.getInteger(MIN_RECONCILIATION_INTERVAL_SECONDS);
  if (reconciliationIntervalSeconds < 0 || reconciliationIntervalSeconds > 0L && reconciliationIntervalSeconds < minReconciliationIntervalSeconds) {
    String msg=format("String_Node_Str" + "String_Node_Str",MIN_RECONCILIATION_INTERVAL_SECONDS,reconciliationIntervalSeconds);
    throw new IllegalArgumentException(msg);
  }
  return reconciliationIntervalSeconds;
}

Fixed version (ground truth):
private int getReconciliationIntervalSeconds(HazelcastProperties properties){
  int reconciliationIntervalSeconds=properties.getInteger(RECONCILIATION_INTERVAL_SECONDS);
  int minReconciliationIntervalSeconds=properties.getInteger(MIN_RECONCILIATION_INTERVAL_SECONDS);
  if (reconciliationIntervalSeconds < 0 || reconciliationIntervalSeconds > 0 && reconciliationIntervalSeconds < minReconciliationIntervalSeconds) {
    String msg=format("String_Node_Str" + "String_Node_Str",MIN_RECONCILIATION_INTERVAL_SECONDS.getDefaultValue(),reconciliationIntervalSeconds);
    throw new IllegalArgumentException(msg);
  }
  return reconciliationIntervalSeconds;
}
Program: 45987
Project: 45987
Buggy source:
@Override public void run() throws Exception {
  getOperationServiceImpl().onStartAsyncOperation(this);
  PartitionAwareOperationFactory partitionAwareFactory=extractPartitionAware(operationFactory);
  if (partitionAwareFactory != null) {
    executePartitionAwareOperations(partitionAwareFactory);
  }
 else {
    executeOperations();
  }
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  if (partitions.length == 0) {
    this.sendResponse(EMPTY_RESPONSE);
    return;
  }
  getOperationServiceImpl().onStartAsyncOperation(this);
  PartitionAwareOperationFactory partitionAwareFactory=extractPartitionAware(operationFactory);
  if (partitionAwareFactory != null) {
    executePartitionAwareOperations(partitionAwareFactory);
  }
 else {
    executeOperations();
  }
}
Program: 45988
Project: 45988
Buggy source:
public PartitionIteratingOperation(OperationFactory operationFactory,List<Integer> partitions){
  this.operationFactory=operationFactory;
  this.partitions=toIntArray(partitions);
}

Fixed version (ground truth):
/** 
 * @param operationFactory operation factory to use
 * @param partitions       partitions to invoke on
 */
public PartitionIteratingOperation(OperationFactory operationFactory,List<Integer> partitions){
  this.operationFactory=operationFactory;
  this.partitions=toIntArray(partitions);
}
Program: 45989
Project: 45989
Buggy source:
@Override public void onExecutionFailure(Throwable cause){
  getOperationServiceImpl().onCompletionAsyncOperation(this);
  sendResponse(new ErrorResponse(cause,getCallId(),isUrgent()));
  getLogger().severe(cause);
}

Fixed version (ground truth):
@Override public void onExecutionFailure(Throwable cause){
  try {
    sendResponse(new ErrorResponse(cause,getCallId(),isUrgent()));
  }
  finally {
    getOperationServiceImpl().onCompletionAsyncOperation(this);
  }
  getLogger().severe(cause);
}
Program: 45990
Project: 45990
Buggy source:
@Override public Set<Entry<K,V>> entrySet(){
  HashSet<Entry<K,V>> entrySet=new HashSet<Entry<K,V>>(map1.entrySet());
  entrySet.addAll(map2.entrySet());
  return unmodifiableSet(entrySet);
}

Fixed version (ground truth):
@Override public Set<Entry<K,V>> entrySet(){
  Set<Entry<K,V>> entrySet1=map1.entrySet();
  Set<Entry<K,V>> entrySet2=map2.entrySet();
  HashSet<Entry<K,V>> aggregatedEntrySet=new HashSet<Entry<K,V>>();
  copyEntries(entrySet1,aggregatedEntrySet);
  copyEntries(entrySet2,aggregatedEntrySet);
  return unmodifiableSet(aggregatedEntrySet);
}
Program: 45991
Project: 45991
Buggy source:
@Override public Map<K,V> getAll(Set<? extends K> keys,ExpiryPolicy expiryPolicy){
  long startNanos=nowInNanosOrDefault();
  ensureOpen();
  checkNotNull(keys,NULL_KEY_IS_NOT_ALLOWED);
  if (keys.isEmpty()) {
    return emptyMap();
  }
  int keysSize=keys.size();
  List<Data> dataKeys=new ArrayList<Data>(keys.size());
  List<Object> resultingKeyValuePairs=new ArrayList<Object>(keysSize * 2);
  getAllInternal(keys,dataKeys,expiryPolicy,resultingKeyValuePairs,startNanos);
  Map<K,V> result=createHashMap(keys.size());
  for (int i=0; i < resultingKeyValuePairs.size(); ) {
    K key=toObject(resultingKeyValuePairs.get(i++));
    V value=toObject(resultingKeyValuePairs.get(i++));
    result.put(key,value);
  }
  return result;
}

Fixed version (ground truth):
@Override public Map<K,V> getAll(Set<? extends K> keys,ExpiryPolicy expiryPolicy){
  long startNanos=nowInNanosOrDefault();
  ensureOpen();
  checkNotNull(keys,NULL_KEY_IS_NOT_ALLOWED);
  if (keys.isEmpty()) {
    return emptyMap();
  }
  int keysSize=keys.size();
  List<Data> dataKeys=new LinkedList<Data>();
  List<Object> resultingKeyValuePairs=new ArrayList<Object>(keysSize * 2);
  getAllInternal(keys,dataKeys,expiryPolicy,resultingKeyValuePairs,startNanos);
  Map<K,V> result=createHashMap(keysSize);
  for (int i=0; i < resultingKeyValuePairs.size(); ) {
    K key=toObject(resultingKeyValuePairs.get(i++));
    V value=toObject(resultingKeyValuePairs.get(i++));
    result.put(key,value);
  }
  return result;
}
Program: 45992
Project: 45992
Buggy source:
private void populateResultFromRemote(int currentSize,List<Object> resultingKeyValuePairs,Map<Object,Long> reservations){
  for (int i=currentSize; i < resultingKeyValuePairs.size(); i+=2) {
    Data keyData=(Data)resultingKeyValuePairs.get(i);
    Data valueData=(Data)resultingKeyValuePairs.get(i + 1);
    Object ncKey=serializeKeys ? keyData : toObject(keyData);
    if (!serializeKeys) {
      resultingKeyValuePairs.set(i,ncKey);
    }
    Long reservationId=reservations.get(ncKey);
    if (reservationId != null) {
      Object cachedValue=tryPublishReserved(ncKey,valueData,reservationId);
      resultingKeyValuePairs.set(i + 1,cachedValue);
      reservations.remove(ncKey);
    }
  }
}

Fixed version (ground truth):
private void populateResultFromRemote(int currentSize,List<Object> resultingKeyValuePairs,Map<Object,Long> reservations,Map<Data,Object> reverseKeyMap){
  for (int i=currentSize; i < resultingKeyValuePairs.size(); i+=2) {
    Data keyData=(Data)resultingKeyValuePairs.get(i);
    Data valueData=(Data)resultingKeyValuePairs.get(i + 1);
    Object ncKey=serializeKeys ? keyData : reverseKeyMap.get(keyData);
    if (!serializeKeys) {
      resultingKeyValuePairs.set(i,ncKey);
    }
    Long reservationId=reservations.get(ncKey);
    if (reservationId != null) {
      Object cachedValue=tryPublishReserved(ncKey,valueData,reservationId);
      resultingKeyValuePairs.set(i + 1,cachedValue);
      reservations.remove(ncKey);
    }
  }
}
Program: 45993
Project: 45993
Buggy source:
@Override protected void getAllInternal(Set<? extends K> keys,Collection<Data> dataKeys,ExpiryPolicy expiryPolicy,List<Object> resultingKeyValuePairs,long startNanos){
  Map<Object,Data> keyMap=null;
  if (serializeKeys) {
    keyMap=toDataKeys(keys,dataKeys);
  }
  Collection<?> ncKeys=serializeKeys ? dataKeys : new ArrayList<Object>(keys);
  populateResultFromNearCache(ncKeys,resultingKeyValuePairs);
  if (ncKeys.isEmpty()) {
    return;
  }
  if (!serializeKeys) {
    keyMap=toDataKeys(ncKeys,dataKeys);
  }
  Map<Object,Long> reservations=getNearCacheReservations(ncKeys,keyMap);
  try {
    int currentSize=resultingKeyValuePairs.size();
    super.getAllInternal(keys,dataKeys,expiryPolicy,resultingKeyValuePairs,startNanos);
    populateResultFromRemote(currentSize,resultingKeyValuePairs,reservations);
  }
  finally {
    releaseRemainingReservedKeys(reservations);
  }
}

Fixed version (ground truth):
@Override protected void getAllInternal(Set<? extends K> keys,Collection<Data> dataKeys,ExpiryPolicy expiryPolicy,List<Object> resultingKeyValuePairs,long startNanos){
  if (serializeKeys) {
    toDataKeysWithReservations(keys,dataKeys,null,null);
  }
  Collection<?> ncKeys=serializeKeys ? dataKeys : new LinkedList<K>(keys);
  populateResultFromNearCache(ncKeys,resultingKeyValuePairs);
  if (ncKeys.isEmpty()) {
    return;
  }
  Map<Object,Long> reservations=createHashMap(ncKeys.size());
  Map<Data,Object> reverseKeyMap=null;
  if (!serializeKeys) {
    reverseKeyMap=createHashMap(ncKeys.size());
    toDataKeysWithReservations(ncKeys,dataKeys,reservations,reverseKeyMap);
  }
 else {
    createNearCacheReservations((Collection<Data>)ncKeys,reservations);
  }
  try {
    int currentSize=resultingKeyValuePairs.size();
    super.getAllInternal(keys,dataKeys,expiryPolicy,resultingKeyValuePairs,startNanos);
    populateResultFromRemote(currentSize,resultingKeyValuePairs,reservations,reverseKeyMap);
  }
  finally {
    releaseRemainingReservedKeys(reservations);
  }
}
Program: 45994
Project: 45994
Buggy source:
protected void getAllInternal(Set<K> keys,Map<Integer,List<Data>> partitionToKeyData,List<Object> resultingKeyValuePairs){
  if (partitionToKeyData.isEmpty()) {
    fillPartitionToKeyData(keys,partitionToKeyData,null);
  }
  List<Future<ClientMessage>> futures=new ArrayList<Future<ClientMessage>>(partitionToKeyData.size());
  for (  Map.Entry<Integer,List<Data>> entry : partitionToKeyData.entrySet()) {
    int partitionId=entry.getKey();
    List<Data> keyList=entry.getValue();
    if (!keyList.isEmpty()) {
      ClientMessage request=MapGetAllCodec.encodeRequest(name,keyList);
      futures.add(new ClientInvocation(getClient(),request,partitionId).invoke());
    }
  }
  for (  Future<ClientMessage> future : futures) {
    try {
      ClientMessage response=future.get();
      MapGetAllCodec.ResponseParameters resultParameters=MapGetAllCodec.decodeResponse(response);
      for (      Entry<Data,Data> entry : resultParameters.response) {
        resultingKeyValuePairs.add(entry.getKey());
        resultingKeyValuePairs.add(entry.getValue());
      }
    }
 catch (    Exception e) {
      throw rethrow(e);
    }
  }
}

Fixed version (ground truth):
protected void getAllInternal(Set<K> keys,Map<Integer,List<Data>> partitionToKeyData,List<Object> resultingKeyValuePairs){
  if (partitionToKeyData.isEmpty()) {
    fillPartitionToKeyData(keys,partitionToKeyData,null,null);
  }
  List<Future<ClientMessage>> futures=new ArrayList<Future<ClientMessage>>(partitionToKeyData.size());
  for (  Map.Entry<Integer,List<Data>> entry : partitionToKeyData.entrySet()) {
    int partitionId=entry.getKey();
    List<Data> keyList=entry.getValue();
    if (!keyList.isEmpty()) {
      ClientMessage request=MapGetAllCodec.encodeRequest(name,keyList);
      futures.add(new ClientInvocation(getClient(),request,partitionId).invoke());
    }
  }
  for (  Future<ClientMessage> future : futures) {
    try {
      ClientMessage response=future.get();
      MapGetAllCodec.ResponseParameters resultParameters=MapGetAllCodec.decodeResponse(response);
      for (      Entry<Data,Data> entry : resultParameters.response) {
        resultingKeyValuePairs.add(entry.getKey());
        resultingKeyValuePairs.add(entry.getValue());
      }
    }
 catch (    Exception e) {
      throw rethrow(e);
    }
  }
}
Program: 45995
Project: 45995
Buggy source:
protected void fillPartitionToKeyData(Set<K> keys,Map<Integer,List<Data>> partitionToKeyData,Map<Object,Data> keyMap){
  ClientPartitionService partitionService=getContext().getPartitionService();
  for (  K key : keys) {
    Data keyData=toData(key);
    int partitionId=partitionService.getPartitionId(keyData);
    List<Data> keyList=partitionToKeyData.get(partitionId);
    if (keyList == null) {
      keyList=new ArrayList<Data>();
      partitionToKeyData.put(partitionId,keyList);
    }
    keyList.add(keyData);
    if (keyMap != null) {
      keyMap.put(key,keyData);
    }
  }
}

Fixed version (ground truth):
protected void fillPartitionToKeyData(Set<K> keys,Map<Integer,List<Data>> partitionToKeyData,Map<Object,Data> keyMap,Map<Data,Object> reverseKeyMap){
  ClientPartitionService partitionService=getContext().getPartitionService();
  for (  K key : keys) {
    Data keyData=toData(key);
    int partitionId=partitionService.getPartitionId(keyData);
    List<Data> keyList=partitionToKeyData.get(partitionId);
    if (keyList == null) {
      keyList=new ArrayList<Data>();
      partitionToKeyData.put(partitionId,keyList);
    }
    keyList.add(keyData);
    if (keyMap != null) {
      keyMap.put(key,keyData);
    }
    if (reverseKeyMap != null) {
      reverseKeyMap.put(keyData,key);
    }
  }
}