nus-yam/ex-repair huggingface dataset:
Program: 49770
Project: 49770
Buggy source:
public void appendState(StringBuffer sbState){
  sbState.append("String_Node_Str" + records.size() + "String_Node_Str"+ mapIndexes.size()+ "String_Node_Str"+ ((indexTypes == null) ? 0 : indexTypes.length));
  for (  Index index : mapIndexes.values()) {
    index.appendState(sbState);
  }
}

Fixed version (ground truth):
public void appendState(StringBuffer sbState){
  byte[] _indexTypes=indexTypes;
  sbState.append("String_Node_Str" + records.size() + "String_Node_Str"+ mapIndexes.size()+ "String_Node_Str"+ ((_indexTypes == null) ? 0 : _indexTypes.length));
  for (  Index index : mapIndexes.values()) {
    index.appendState(sbState);
  }
}
Program: 49771
Project: 49771
Buggy source:
public void addValue(Data value){
  if (value != null) {
    if (getMultiValues() == null) {
      setMultiValues(new ConcurrentHashSet<Data>(){
        @Override public boolean add(        Data e){
          return e != null && super.add(e);
        }
      }
);
    }
    getMultiValues().add(value);
  }
}

Fixed version (ground truth):
public void addValue(Data value){
  if (value != null) {
    if (getMultiValues() == null) {
      setMultiValues(new ConcurrentHashSet<ValueHolder>(){
        @Override public boolean add(        ValueHolder e){
          return e != null && super.add(e);
        }
      }
);
    }
    getMultiValues().add(new ValueHolder(value));
  }
}
Program: 49772
Project: 49772
Buggy source:
@Override public boolean add(Data e){
  return e != null && super.add(e);
}

Fixed version (ground truth):
@Override public boolean add(ValueHolder e){
  return e != null && super.add(e);
}
Program: 49773
Project: 49773
Buggy source:
public void clearLock(){
  if (lock != null) {
    lock.clear();
  }
}

Fixed version (ground truth):
public void clearLock(){
  lock=null;
}
Program: 49774
Project: 49774
Buggy source:
public void setMultiValues(Set<Data> lsValues){
  if (lsValues != null || optionalInfo != null) {
    this.getOptionalInfo().lsMultiValues=lsValues;
  }
}

Fixed version (ground truth):
public void setMultiValues(Set<ValueHolder> lsValues){
  if (lsValues != null || optionalInfo != null) {
    this.getOptionalInfo().lsMultiValues=lsValues;
  }
}
Program: 49775
Project: 49775
Buggy source:
public Set<Data> getMultiValues(){
  if (optionalInfo == null)   return null;
  return getOptionalInfo().lsMultiValues;
}

Fixed version (ground truth):
public Set<ValueHolder> getMultiValues(){
  if (optionalInfo == null)   return null;
  return getOptionalInfo().lsMultiValues;
}
Program: 49776
Project: 49776
Buggy source:
public void setMultiValues(Set<Data> lsValues){
}

Fixed version (ground truth):
public void setMultiValues(Set<ValueHolder> lsValues){
}
Program: 49777
Project: 49777
Buggy source:
public Set<Data> getMultiValues(){
  return null;
}

Fixed version (ground truth):
public Set<ValueHolder> getMultiValues(){
  return null;
}
Program: 49778
Project: 49778
Buggy source:
public Object poll(String name,long timeout) throws InterruptedException {
  if (timeout == -1) {
    timeout=Long.MAX_VALUE;
  }
  Object removedItem=null;
  long start=System.currentTimeMillis();
  while (removedItem == null && timeout >= 0) {
    Data key=takeKey(name,timeout);
    if (key == null) {
      return null;
    }
    IMap imap=getStorageMap(name);
    try {
      removedItem=imap.tryRemove(key,0,TimeUnit.MILLISECONDS);
      if (removedItem != null) {
        ThreadContext threadContext=ThreadContext.get();
        TransactionImpl txn=threadContext.getCallContext().getTransaction();
        if (txn != null && txn.getStatus() == Transaction.TXN_STATUS_ACTIVE) {
          txn.attachRemoveOp(name,key,removedItem,true);
        }
      }
    }
 catch (    TimeoutException e) {
    }
    long now=System.currentTimeMillis();
    timeout-=(now - start);
    start=now;
  }
  return removedItem;
}

Fixed version (ground truth):
public Object poll(final String name,long timeout) throws InterruptedException {
  if (timeout == -1) {
    timeout=Long.MAX_VALUE;
  }
  Object removedItem=null;
  long start=System.currentTimeMillis();
  while (removedItem == null && timeout >= 0) {
    Data key=takeKey(name,timeout);
    if (key == null) {
      return null;
    }
    IMap imap=getStorageMap(name);
    try {
      removedItem=imap.tryRemove(key,0,TimeUnit.MILLISECONDS);
      if (removedItem != null) {
        ThreadContext threadContext=ThreadContext.get();
        TransactionImpl txn=threadContext.getCallContext().getTransaction();
        if (txn != null && txn.getStatus() == Transaction.TXN_STATUS_ACTIVE) {
          txn.attachRemoveOp(name,key,removedItem,true);
        }
        final Data removedItemData=toData(removedItem);
        final BQ bq=getBQ(name);
        if (bq != null && bq.mapListeners.size() > 0) {
          enqueueAndReturn(new Processable(){
            public void process(){
              fireMapEvent(bq.mapListeners,name,EntryEvent.TYPE_REMOVED,removedItemData,thisAddress);
            }
          }
);
        }
      }
    }
 catch (    TimeoutException e) {
    }
    long now=System.currentTimeMillis();
    timeout-=(now - start);
    start=now;
  }
  return removedItem;
}
Program: 49779
Project: 49779
Buggy source:
public boolean offer(String name,Object obj,int index,long timeout) throws InterruptedException {
  Long key=generateKey(name,timeout);
  ThreadContext threadContext=ThreadContext.get();
  TransactionImpl txn=threadContext.getCallContext().getTransaction();
  if (key != -1) {
    if (txn != null && txn.getStatus() == Transaction.TXN_STATUS_ACTIVE) {
      txn.attachPutOp(name,key,obj,timeout,true);
    }
 else {
      storeQueueItem(name,key,obj,index);
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean offer(final String name,Object obj,int index,long timeout) throws InterruptedException {
  Long key=generateKey(name,timeout);
  ThreadContext threadContext=ThreadContext.get();
  TransactionImpl txn=threadContext.getCallContext().getTransaction();
  if (key != -1) {
    if (txn != null && txn.getStatus() == Transaction.TXN_STATUS_ACTIVE) {
      txn.attachPutOp(name,key,obj,timeout,true);
    }
 else {
      final Data dataItem=toData(obj);
      storeQueueItem(name,key,dataItem,index);
      final BQ bq=getBQ(name);
      if (bq != null && bq.mapListeners.size() > 0) {
        enqueueAndReturn(new Processable(){
          public void process(){
            fireMapEvent(bq.mapListeners,name,EntryEvent.TYPE_ADDED,dataItem,thisAddress);
          }
        }
);
      }
    }
    return true;
  }
  return false;
}
Program: 49780
Project: 49780
Buggy source:
public void addItemListener(final String name,final ItemListener listener,final boolean includeValue){
  IMap map=getStorageMap(name);
  map.addEntryListener(new QueueItemListener(listener,includeValue),includeValue);
}

Fixed version (ground truth):
public void addItemListener(final String name,final ItemListener listener,final boolean includeValue){
  node.listenerManager.addListener(name,listener,null,includeValue,Instance.InstanceType.QUEUE);
}
Program: 49781
Project: 49781
Buggy source:
protected void customRun() throws InterruptedException {
  if (reconnection.get()) {
    Thread.sleep(50L);
    return;
  }
  try {
    boolean written=false;
    if (queue.size() > 0 || q.size() > 0) {
      queue.drainTo(q);
      Call call=q.poll();
      while (call != null) {
        writeCall(call);
        written=true;
        call=q.poll();
      }
    }
    try {
      if (written) {
        writer.flush(connection);
      }
    }
 catch (    IOException e) {
      clusterIsDown(connection);
    }
    Call call=queue.poll(12,TimeUnit.MILLISECONDS);
    if (call != null) {
      writeCall(call);
      try {
        writer.flush(connection);
      }
 catch (      IOException e) {
        clusterIsDown(connection);
      }
    }
    if (reconnectionCalls.size() > 0) {
      checkOnReconnect(call);
    }
  }
 catch (  Throwable e) {
    logger.log(Level.FINE,"String_Node_Str" + connection + "String_Node_Str"+ e.toString(),e);
  }
}

Fixed version (ground truth):
protected void customRun() throws InterruptedException {
  if (reconnection.get()) {
    Thread.sleep(50L);
    return;
  }
  try {
    boolean written=false;
    if (queue.size() > 0 || q.size() > 0) {
      queue.drainTo(q,q.available());
      Call call=q.poll();
      while (call != null) {
        writeCall(call);
        written=true;
        call=q.poll();
      }
    }
    try {
      if (written) {
        writer.flush(connection);
      }
    }
 catch (    IOException e) {
      clusterIsDown(connection);
    }
    Call call=queue.poll(12,TimeUnit.MILLISECONDS);
    if (call != null) {
      writeCall(call);
      try {
        writer.flush(connection);
      }
 catch (      IOException e) {
        clusterIsDown(connection);
      }
    }
    if (reconnectionCalls.size() > 0) {
      checkOnReconnect(call);
    }
  }
 catch (  Throwable e) {
    logger.log(Level.FINE,"String_Node_Str" + connection + "String_Node_Str"+ e.toString(),e);
  }
}
Program: 49782
Project: 49782
Buggy source:
@Override public boolean add(E obj){
  if (size == maxSize)   return false;
  objects[add]=obj;
  add++;
  size++;
  if (add == maxSize) {
    add=0;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean add(E obj){
  if (size == maxSize) {
    return false;
  }
  objects[add]=obj;
  add++;
  size++;
  if (add == maxSize) {
    add=0;
  }
  return true;
}
Program: 49783
Project: 49783
Buggy source:
public void entryAdded(EntryEvent<String,String> event){
  assertEquals("String_Node_Str",event.getValue());
  assertEquals("String_Node_Str",event.getKey());
  latchAdded.countDown();
}

Fixed version (ground truth):
public void entryAdded(EntryEvent event){
  System.out.println(event);
  latch.countDown();
}
Program: 49784
Project: 49784
Buggy source:
public void entryUpdated(EntryEvent<String,String> event){
  assertEquals("String_Node_Str",event.getOldValue());
  assertEquals("String_Node_Str",event.getValue());
  assertEquals("String_Node_Str",event.getKey());
  latchUpdated.countDown();
}

Fixed version (ground truth):
public void entryUpdated(EntryEvent event){
}
Program: 49785
Project: 49785
Buggy source:
public void entryEvicted(EntryEvent<String,String> event){
  entryRemoved(event);
}

Fixed version (ground truth):
public void entryEvicted(EntryEvent event){
}
Program: 49786
Project: 49786
Buggy source:
public void entryRemoved(EntryEvent<String,String> event){
  assertEquals("String_Node_Str",event.getKey());
  assertEquals("String_Node_Str",event.getValue());
  latchRemoved.countDown();
}

Fixed version (ground truth):
public void entryRemoved(EntryEvent event){
}
Program: 49787
Project: 49787
Buggy source:
@Override public void readData(DataInput in) throws IOException {
  packetVersion=in.readByte();
  buildNumber=in.readInt();
  boolean hasTo=in.readBoolean();
  if (hasTo) {
    to=new Address();
    to.readData(in);
  }
  address=new Address();
  address.readData(in);
  nodeType=NodeType.create(in.readInt());
  config=new Config();
  config.readData(in);
  boolean hasCredentials=in.readBoolean();
  if (hasCredentials) {
    credentials=(Credentials)SerializationHelper.readObject(in);
    credentials.setEndpoint(address.getHost());
  }
}

Fixed version (ground truth):
@Override public void readData(DataInput in) throws IOException {
  packetVersion=in.readByte();
  buildNumber=in.readInt();
  boolean hasTo=in.readBoolean();
  if (hasTo) {
    to=new Address();
    to.readData(in);
  }
  address=new Address();
  address.readData(in);
  nodeType=NodeType.create(in.readInt());
  config=new Config();
  config.readData(in);
  boolean hasCredentials=in.readBoolean();
  if (hasCredentials) {
    credentials=(Credentials)SerializationHelper.readObject(in);
    if (credentials != null) {
      credentials.setEndpoint(address.getHost());
    }
  }
}
Program: 49788
Project: 49788
Buggy source:
void callListeners(DataAwareEntryEvent dataAwareEntryEvent){
  List<ListenerItem> listeners=getOrCreateListenerList(dataAwareEntryEvent.getLongName());
  for (  ListenerItem listenerItem : listeners) {
    if (listenerItem.listens(dataAwareEntryEvent)) {
      callListener(listenerItem,dataAwareEntryEvent);
    }
  }
}

Fixed version (ground truth):
void callListeners(DataAwareEntryEvent dataAwareEntryEvent){
  List<ListenerItem> listeners=getOrCreateListenerList(dataAwareEntryEvent.getLongName());
  for (  ListenerItem listenerItem : listeners) {
    if (listenerItem.listens(dataAwareEntryEvent)) {
      try {
        callListener(listenerItem,dataAwareEntryEvent);
      }
 catch (      Throwable e) {
        logger.log(Level.SEVERE,"String_Node_Str" + e.getMessage(),e);
      }
    }
  }
}
Program: 49790
Project: 49790
Buggy source:
protected void parseSystemProps(){
  version=System.getProperty("String_Node_Str","String_Node_Str");
  build=System.getProperty("String_Node_Str","String_Node_Str");
  if ("String_Node_Str".equals(version) || "String_Node_Str".equals(build)) {
    try {
      InputStream inRuntimeProperties=NodeInitializer.class.getClassLoader().getResourceAsStream("String_Node_Str");
      if (inRuntimeProperties != null) {
        Properties runtimeProperties=new Properties();
        runtimeProperties.load(inRuntimeProperties);
        version=runtimeProperties.getProperty("String_Node_Str");
        build=runtimeProperties.getProperty("String_Node_Str");
      }
    }
 catch (    Exception ignored) {
    }
  }
  try {
    buildNumber=Integer.getInteger("String_Node_Str",-1);
    if (buildNumber == -1) {
      buildNumber=Integer.parseInt(build);
    }
  }
 catch (  Exception ignored) {
  }
}

Fixed version (ground truth):
protected void parseSystemProps(){
  version=System.getProperty("String_Node_Str","String_Node_Str");
  build=System.getProperty("String_Node_Str","String_Node_Str");
  if ("String_Node_Str".equals(version) || "String_Node_Str".equals(build)) {
    try {
      final InputStream inRuntimeProperties=NodeInitializer.class.getClassLoader().getResourceAsStream("String_Node_Str");
      if (inRuntimeProperties != null) {
        Properties runtimeProperties=new Properties();
        runtimeProperties.load(inRuntimeProperties);
        inRuntimeProperties.close();
        version=runtimeProperties.getProperty("String_Node_Str");
        build=runtimeProperties.getProperty("String_Node_Str");
      }
    }
 catch (    Exception ignored) {
    }
  }
  try {
    buildNumber=Integer.getInteger("String_Node_Str",-1);
    if (buildNumber == -1) {
      buildNumber=Integer.parseInt(build);
    }
  }
 catch (  Exception ignored) {
  }
}
Program: 49791
Project: 49791
Buggy source:
public void destroy(){
}

Fixed version (ground truth):
public void destroy(){
  logger.log(Level.INFO,"String_Node_Str");
}
Program: 49792
Project: 49792
Buggy source:
public JoinInfo receive(){
synchronized (receiveLock) {
    try {
      inflatingBuffer.reset();
      try {
        multicastSocket.receive(datagramPacketReceive);
      }
 catch (      SocketTimeoutException ignore) {
        return null;
      }
      try {
        inflatingBuffer.inflate(datagramPacketReceive.getLength());
        JoinInfo joinInfo=new JoinInfo();
        joinInfo.readData(inflatingBuffer.getDataInput());
        return joinInfo;
      }
 catch (      DataFormatException e) {
        logger.log(Level.FINEST,"String_Node_Str" + "String_Node_Str",e);
      }
    }
 catch (    Exception e) {
      logger.log(Level.WARNING,e.getMessage(),e);
    }
    return null;
  }
}

Fixed version (ground truth):
public JoinInfo receive(){
synchronized (receiveLock) {
    try {
      inflatingBuffer.reset();
      try {
        multicastSocket.receive(datagramPacketReceive);
      }
 catch (      SocketTimeoutException ignore) {
        return null;
      }
      try {
        inflatingBuffer.inflate(datagramPacketReceive.getLength());
        JoinInfo joinInfo=new JoinInfo();
        joinInfo.readData(inflatingBuffer.getDataInput());
        return joinInfo;
      }
 catch (      Exception e) {
        if (e instanceof EOFException || e instanceof DataFormatException) {
          logger.log(Level.FINEST,"String_Node_Str" + "String_Node_Str",e);
        }
 else {
          throw e;
        }
      }
    }
 catch (    Exception e) {
      logger.log(Level.WARNING,e.getMessage(),e);
    }
    return null;
  }
}
Program: 49793
Project: 49793
Buggy source:
void putAndUnlock(String name,Object key,Object value){
  MPut mput=ThreadContext.get().getCallCache(node.factory).getMPut();
  mput.txnalPut(CONCURRENT_MAP_PUT_AND_UNLOCK,name,key,value,-1,-1);
}

Fixed version (ground truth):
void putAndUnlock(String name,Object key,Object value){
  MPut mput=ThreadContext.get().getCallCache(node.factory).getMPut();
  mput.txnalPut(CONCURRENT_MAP_PUT_AND_UNLOCK,name,key,value,-1,-1);
  mput.clearRequest();
}
Program: 49794
Project: 49794
Buggy source:
public Object put(Object key,Object value,long timeout,long ttl){
  long begin=System.currentTimeMillis();
  check(key);
  check(value);
  MPut mput=ThreadContext.get().getCallCache(factory).getMPut();
  Object result=mput.put(name,key,value,timeout,ttl);
  mapOperationCounter.incrementPuts(System.currentTimeMillis() - begin);
  return result;
}

Fixed version (ground truth):
public Object put(Object key,Object value,long timeout,long ttl){
  long begin=System.currentTimeMillis();
  check(key);
  check(value);
  MPut mput=ThreadContext.get().getCallCache(factory).getMPut();
  Object result=mput.put(name,key,value,timeout,ttl);
  mput.clearRequest();
  mapOperationCounter.incrementPuts(System.currentTimeMillis() - begin);
  return result;
}
Program: 49795
Project: 49795
Buggy source:
public boolean tryPut(Object key,Object value,long timeout,TimeUnit timeunit){
  long begin=System.currentTimeMillis();
  if (timeout < 0) {
    throw new IllegalArgumentException("String_Node_Str" + timeout);
  }
  if (timeout == 0) {
    timeout=-1;
  }
 else {
    timeout=toMillis(timeout,timeunit);
  }
  check(key);
  check(value);
  MPut mput=ThreadContext.get().getCallCache(factory).getMPut();
  Boolean result=mput.tryPut(name,key,value,timeout,-1);
  mapOperationCounter.incrementPuts(System.currentTimeMillis() - begin);
  return result;
}

Fixed version (ground truth):
public boolean tryPut(Object key,Object value,long timeout,TimeUnit timeunit){
  long begin=System.currentTimeMillis();
  if (timeout < 0) {
    throw new IllegalArgumentException("String_Node_Str" + timeout);
  }
  if (timeout == 0) {
    timeout=-1;
  }
 else {
    timeout=toMillis(timeout,timeunit);
  }
  check(key);
  check(value);
  MPut mput=ThreadContext.get().getCallCache(factory).getMPut();
  Boolean result=mput.tryPut(name,key,value,timeout,-1);
  mput.clearRequest();
  mapOperationCounter.incrementPuts(System.currentTimeMillis() - begin);
  return result;
}
Program: 49796
Project: 49796
Buggy source:
public void removeForSync(Object key){
  long begin=System.currentTimeMillis();
  check(key);
  MRemove mremove=ThreadContext.get().getCallCache(factory).getMRemove();
  mremove.removeForSync(name,key);
  mapOperationCounter.incrementRemoves(System.currentTimeMillis() - begin);
}

Fixed version (ground truth):
public void removeForSync(Object key){
  long begin=System.currentTimeMillis();
  check(key);
  MRemove mremove=ThreadContext.get().getCallCache(factory).getMRemove();
  mremove.removeForSync(name,key);
  mremove.clearRequest();
  mapOperationCounter.incrementRemoves(System.currentTimeMillis() - begin);
}
Program: 49797
Project: 49797
Buggy source:
public void putForSync(Object key,Object value){
  long begin=System.currentTimeMillis();
  check(key);
  check(value);
  MPut mput=ThreadContext.get().getCallCache(factory).getMPut();
  mput.putForSync(name,key,value);
  mapOperationCounter.incrementPuts(System.currentTimeMillis() - begin);
}

Fixed version (ground truth):
public void putForSync(Object key,Object value){
  long begin=System.currentTimeMillis();
  check(key);
  check(value);
  MPut mput=ThreadContext.get().getCallCache(factory).getMPut();
  mput.putForSync(name,key,value);
  mput.clearRequest();
  mapOperationCounter.incrementPuts(System.currentTimeMillis() - begin);
}
Program: 49798
Project: 49798
Buggy source:
public Object tryRemove(Object key,long timeout,TimeUnit timeunit) throws TimeoutException {
  long begin=System.currentTimeMillis();
  check(key);
  MRemove mremove=ThreadContext.get().getCallCache(factory).getMRemove();
  Object result=mremove.tryRemove(name,key,toMillis(timeout,timeunit));
  mapOperationCounter.incrementRemoves(System.currentTimeMillis() - begin);
  return result;
}

Fixed version (ground truth):
public Object tryRemove(Object key,long timeout,TimeUnit timeunit) throws TimeoutException {
  long begin=System.currentTimeMillis();
  check(key);
  MRemove mremove=ThreadContext.get().getCallCache(factory).getMRemove();
  Object result=mremove.tryRemove(name,key,toMillis(timeout,timeunit));
  mremove.clearRequest();
  mapOperationCounter.incrementRemoves(System.currentTimeMillis() - begin);
  return result;
}
Program: 49799
Project: 49799
Buggy source:
public Object get(Object key){
  check(key);
  long begin=System.currentTimeMillis();
  MGet mget=ThreadContext.get().getCallCache(factory).getMGet();
  Object result=mget.get(name,key,-1);
  if (result == null && name.contains("String_Node_Str")) {
    boolean isClient=ThreadContext.get().isClient();
    Object txn=ThreadContext.get().getTransaction();
    throw new RuntimeException(result + "String_Node_Str" + isClient+ "String_Node_Str"+ txn);
  }
  mapOperationCounter.incrementGets(System.currentTimeMillis() - begin);
  return result;
}

Fixed version (ground truth):
public Object get(Object key){
  check(key);
  long begin=System.currentTimeMillis();
  MGet mget=ThreadContext.get().getCallCache(factory).getMGet();
  Object result=mget.get(name,key,-1);
  mget.clearRequest();
  if (result == null && name.contains("String_Node_Str")) {
    boolean isClient=ThreadContext.get().isClient();
    Object txn=ThreadContext.get().getTransaction();
    throw new RuntimeException(result + "String_Node_Str" + isClient+ "String_Node_Str"+ txn);
  }
  mapOperationCounter.incrementGets(System.currentTimeMillis() - begin);
  return result;
}
Program: 49800
Project: 49800
Buggy source:
public Object putIfAbsent(Object key,Object value,long timeout,long ttl){
  long begin=System.currentTimeMillis();
  check(key);
  check(value);
  MPut mput=concurrentMapManager.new MPut();
  Object result=mput.putIfAbsent(name,key,value,timeout,ttl);
  mapOperationCounter.incrementPuts(System.currentTimeMillis() - begin);
  return result;
}

Fixed version (ground truth):
public Object putIfAbsent(Object key,Object value,long timeout,long ttl){
  long begin=System.currentTimeMillis();
  check(key);
  check(value);
  MPut mput=concurrentMapManager.new MPut();
  Object result=mput.putIfAbsent(name,key,value,timeout,ttl);
  mput.clearRequest();
  mapOperationCounter.incrementPuts(System.currentTimeMillis() - begin);
  return result;
}
Program: 49801
Project: 49801
Buggy source:
public Object toObject(byte[] byteArray){
  if (byteArray == null || byteArray.length == 0) {
    return null;
  }
  this.bbis.set(byteArray,byteArray.length);
  return toObject(this.bbis);
}

Fixed version (ground truth):
public Object toObject(byte[] byteArray){
  if (byteArray == null || byteArray.length == 0) {
    return null;
  }
  this.bbis.set(byteArray,byteArray.length);
  final Object obj=toObject(this.bbis);
  this.bbis.set(null,0);
  return obj;
}
Program: 49802
Project: 49802
Buggy source:
@Override public int hashCode(){
  if (buffer == null)   return Integer.MIN_VALUE;
  final int prime=0x01000193;
  int hash=0x811c9dc5;
  final byte[] data=buffer;
  for (int i=data.length - 1; i > 1; i--) {
    hash=(hash ^ data[i]) * prime;
  }
  return hash;
}

Fixed version (ground truth):
@Override public int hashCode(){
  if (buffer == null)   return Integer.MIN_VALUE;
  final int prime=0x01000193;
  int hash=0x811c9dc5;
  final byte[] data=buffer;
  for (int i=data.length - 1; i >= 0; i--) {
    hash=(hash ^ data[i]) * prime;
  }
  return hash;
}
Program: 49803
Project: 49803
Buggy source:
/** 
 * Test case for issue 323
 */
@Test public void testSuperClientWithQueues(){
  Config configSuperClient=new Config();
  configSuperClient.setSuperClient(true);
  HazelcastInstance hNormal=Hazelcast.newHazelcastInstance(new Config());
  final HazelcastInstance hSuper=Hazelcast.newHazelcastInstance(configSuperClient);
  final Queue qSuper=hSuper.getQueue("String_Node_Str");
  final Queue qNormal=hNormal.getQueue("String_Node_Str");
  for (int i=0; i < 12000; i++) {
    String item="String_Node_Str" + i;
    qSuper.offer(item);
    assertEquals(item,qNormal.poll());
  }
  for (int i=0; i < 5000; i++) {
    String item="String_Node_Str" + i;
    qNormal.offer(item);
    assertEquals(item,qSuper.poll());
  }
}

Fixed version (ground truth):
/** 
 * Test case for issue 323
 */
@Test public void testSuperClientWithQueues(){
  Config configSuperClient=new Config();
  configSuperClient.setLiteMember(true);
  HazelcastInstance hNormal=Hazelcast.newHazelcastInstance(new Config());
  final HazelcastInstance hSuper=Hazelcast.newHazelcastInstance(configSuperClient);
  final Queue qSuper=hSuper.getQueue("String_Node_Str");
  final Queue qNormal=hNormal.getQueue("String_Node_Str");
  for (int i=0; i < 12000; i++) {
    String item="String_Node_Str" + i;
    qSuper.offer(item);
    assertEquals(item,qNormal.poll());
  }
  for (int i=0; i < 5000; i++) {
    String item="String_Node_Str" + i;
    qNormal.offer(item);
    assertEquals(item,qSuper.poll());
  }
}
Program: 49805
Project: 49805
Buggy source:
@Test public void issue388NoBackupWhenSuperClient() throws InterruptedException {
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(null);
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(null);
  Config scconfig=new Config();
  scconfig.setSuperClient(true);
  HazelcastInstance sc=Hazelcast.newHazelcastInstance(scconfig);
  IMap map1=h1.getMap("String_Node_Str");
  IMap map2=h2.getMap("String_Node_Str");
  IMap map3=sc.getMap("String_Node_Str");
  for (int i=0; i < 300; ) {
    map1.put(i++,new byte[1000]);
    map2.put(i++,new byte[1000]);
    map3.put(i++,new byte[1000]);
  }
  assertEquals(map1.getLocalMapStats().getOwnedEntryCount(),map2.getLocalMapStats().getBackupEntryCount());
  assertEquals(map2.getLocalMapStats().getOwnedEntryCount(),map1.getLocalMapStats().getBackupEntryCount());
}

Fixed version (ground truth):
@Test public void issue388NoBackupWhenSuperClient() throws InterruptedException {
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(null);
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(null);
  Config scconfig=new Config();
  scconfig.setLiteMember(true);
  HazelcastInstance sc=Hazelcast.newHazelcastInstance(scconfig);
  IMap map1=h1.getMap("String_Node_Str");
  IMap map2=h2.getMap("String_Node_Str");
  IMap map3=sc.getMap("String_Node_Str");
  for (int i=0; i < 300; ) {
    map1.put(i++,new byte[1000]);
    map2.put(i++,new byte[1000]);
    map3.put(i++,new byte[1000]);
  }
  assertEquals(map1.getLocalMapStats().getOwnedEntryCount(),map2.getLocalMapStats().getBackupEntryCount());
  assertEquals(map2.getLocalMapStats().getOwnedEntryCount(),map1.getLocalMapStats().getBackupEntryCount());
}
Program: 49807
Project: 49807
Buggy source:
/** 
 * 3 node cluster: normal member(h1), super client (hSuper) and another normal member (h2) if h1 goes down, hSuper becomes the oldest member If hSuper fails to update the partition ownerships, h2.getMap("default").get(key) gets into infinite Re-Do.
 * @throws Exception
 */
@Test public void testSuperClientBeingOldestMember() throws Exception {
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(new Config());
  Config superConfig=new Config();
  superConfig.setSuperClient(true);
  HazelcastInstance hSuper=Hazelcast.newHazelcastInstance(superConfig);
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(new Config());
  final IMap map=h2.getMap("String_Node_Str");
  h1.getLifecycleService().shutdown();
  final CountDownLatch latch=new CountDownLatch(1);
  new Thread(new Runnable(){
    public void run(){
      assertTrue(map.get("String_Node_Str") == null);
      latch.countDown();
    }
  }
).start();
  assertTrue(latch.await(10,TimeUnit.SECONDS));
}

Fixed version (ground truth):
/** 
 * 3 node cluster: normal member(h1), super client (hSuper) and another normal member (h2) if h1 goes down, hSuper becomes the oldest member If hSuper fails to update the partition ownerships, h2.getMap("default").get(key) gets into infinite Re-Do.
 * @throws Exception
 */
@Test public void testSuperClientBeingOldestMember() throws Exception {
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(new Config());
  Config superConfig=new Config();
  superConfig.setLiteMember(true);
  HazelcastInstance hSuper=Hazelcast.newHazelcastInstance(superConfig);
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(new Config());
  final IMap map=h2.getMap("String_Node_Str");
  h1.getLifecycleService().shutdown();
  final CountDownLatch latch=new CountDownLatch(1);
  new Thread(new Runnable(){
    public void run(){
      assertTrue(map.get("String_Node_Str") == null);
      latch.countDown();
    }
  }
).start();
  assertTrue(latch.await(10,TimeUnit.SECONDS));
}
Program: 49808
Project: 49808
Buggy source:
@Test(timeout=30000) public void testSuperClientPutAfterBeforeNormalMember() throws Exception {
  final CountDownLatch latch=new CountDownLatch(1);
  final CountDownLatch latchSuperPut=new CountDownLatch(1);
  new Thread(new Runnable(){
    public void run(){
      Config config=new XmlConfigBuilder().build();
      config.setSuperClient(true);
      final HazelcastInstance hSuper=Hazelcast.newHazelcastInstance(config);
      latch.countDown();
      Map map=hSuper.getMap("String_Node_Str");
      map.put("String_Node_Str","String_Node_Str");
      latchSuperPut.countDown();
    }
  }
).start();
  latch.await(10,TimeUnit.SECONDS);
  HazelcastInstance hNormal=Hazelcast.newHazelcastInstance(null);
  assertTrue(latchSuperPut.await(10,TimeUnit.SECONDS));
  assertEquals("String_Node_Str",hNormal.getMap("String_Node_Str").get("String_Node_Str"));
}

Fixed version (ground truth):
@Test(timeout=30000) public void testSuperClientPutAfterBeforeNormalMember() throws Exception {
  final CountDownLatch latch=new CountDownLatch(1);
  final CountDownLatch latchSuperPut=new CountDownLatch(1);
  new Thread(new Runnable(){
    public void run(){
      Config config=new XmlConfigBuilder().build();
      config.setLiteMember(true);
      final HazelcastInstance hSuper=Hazelcast.newHazelcastInstance(config);
      latch.countDown();
      Map map=hSuper.getMap("String_Node_Str");
      map.put("String_Node_Str","String_Node_Str");
      latchSuperPut.countDown();
    }
  }
).start();
  latch.await(10,TimeUnit.SECONDS);
  HazelcastInstance hNormal=Hazelcast.newHazelcastInstance(null);
  assertTrue(latchSuperPut.await(10,TimeUnit.SECONDS));
  assertEquals("String_Node_Str",hNormal.getMap("String_Node_Str").get("String_Node_Str"));
}
Program: 49809
Project: 49809
Buggy source:
@Test public void testSuperBeingMaster() throws Exception {
  Config config=new Config();
  config.setSuperClient(true);
  final HazelcastInstance hSuper=Hazelcast.newHazelcastInstance(config);
  final HazelcastInstance hSuper2=Hazelcast.newHazelcastInstance(config);
  sleep(11000);
  HazelcastInstance hNormal=Hazelcast.newHazelcastInstance(new Config());
  Map map=hSuper.getMap("String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  assertEquals("String_Node_Str",hNormal.getMap("String_Node_Str").get("String_Node_Str"));
  sleep(10000);
  assertEquals("String_Node_Str",hNormal.getMap("String_Node_Str").get("String_Node_Str"));
  assertEquals("String_Node_Str",map.get("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testSuperBeingMaster() throws Exception {
  Config config=new Config();
  config.setLiteMember(true);
  final HazelcastInstance hSuper=Hazelcast.newHazelcastInstance(config);
  final HazelcastInstance hSuper2=Hazelcast.newHazelcastInstance(config);
  sleep(11000);
  HazelcastInstance hNormal=Hazelcast.newHazelcastInstance(new Config());
  Map map=hSuper.getMap("String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  assertEquals("String_Node_Str",hNormal.getMap("String_Node_Str").get("String_Node_Str"));
  sleep(10000);
  assertEquals("String_Node_Str",hNormal.getMap("String_Node_Str").get("String_Node_Str"));
  assertEquals("String_Node_Str",map.get("String_Node_Str"));
}
Program: 49810
Project: 49810
Buggy source:
@Test public void issue390NoBackupWhenSuperClient() throws InterruptedException {
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(null);
  IMap map1=h1.getMap("String_Node_Str");
  for (int i=0; i < 200; i++) {
    map1.put(i,new byte[1000]);
  }
  Config scconfig=new Config();
  scconfig.setSuperClient(true);
  HazelcastInstance sc=Hazelcast.newHazelcastInstance(scconfig);
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(null);
  IMap map2=h2.getMap("String_Node_Str");
  final CountDownLatch latch=new CountDownLatch(2);
  h2.getPartitionService().addMigrationListener(new MigrationListener(){
    public void migrationStarted(    MigrationEvent migrationEvent){
    }
    public void migrationCompleted(    MigrationEvent migrationEvent){
      latch.countDown();
    }
  }
);
  assertTrue(latch.await(60,TimeUnit.SECONDS));
  System.out.println(map1.getLocalMapStats());
  System.out.println(map2.getLocalMapStats());
  assertEquals(map2.getLocalMapStats().getOwnedEntryCount(),map1.getLocalMapStats().getBackupEntryCount());
  assertEquals(map1.getLocalMapStats().getOwnedEntryCount(),map2.getLocalMapStats().getBackupEntryCount());
}

Fixed version (ground truth):
@Test public void issue390NoBackupWhenSuperClient() throws InterruptedException {
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(null);
  IMap map1=h1.getMap("String_Node_Str");
  for (int i=0; i < 200; i++) {
    map1.put(i,new byte[1000]);
  }
  Config scconfig=new Config();
  scconfig.setLiteMember(true);
  HazelcastInstance sc=Hazelcast.newHazelcastInstance(scconfig);
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(null);
  IMap map2=h2.getMap("String_Node_Str");
  final CountDownLatch latch=new CountDownLatch(2);
  h2.getPartitionService().addMigrationListener(new MigrationListener(){
    public void migrationStarted(    MigrationEvent migrationEvent){
    }
    public void migrationCompleted(    MigrationEvent migrationEvent){
      latch.countDown();
    }
  }
);
  assertTrue(latch.await(60,TimeUnit.SECONDS));
  System.out.println(map1.getLocalMapStats());
  System.out.println(map2.getLocalMapStats());
  assertEquals(map2.getLocalMapStats().getOwnedEntryCount(),map1.getLocalMapStats().getBackupEntryCount());
  assertEquals(map1.getLocalMapStats().getOwnedEntryCount(),map2.getLocalMapStats().getBackupEntryCount());
}
Program: 49811
Project: 49811
Buggy source:
@Test public void testInitialization(){
  Config config=new Config();
  MapConfig mapConfig=config.getMapConfig("String_Node_Str");
  MapStoreConfig msConfig=new MapStoreConfig();
  mapConfig.setMapStoreConfig(msConfig);
  msConfig.setEnabled(true);
  Config configSuper=new Config();
  configSuper.setSuperClient(true);
  configSuper.addMapConfig(mapConfig);
  final int initialKeys=5;
  msConfig.setImplementation(new MapLoader(){
    public Object load(    Object key){
      return "String_Node_Str" + key;
    }
    public Map loadAll(    Collection keys){
      Map map=new HashMap(keys.size());
      for (      Object key : keys) {
        map.put(key,load(key));
      }
      return map;
    }
    public Set loadAllKeys(){
      Set keys=new HashSet(3);
      for (int i=0; i < initialKeys; i++) {
        keys.add(i);
      }
      return keys;
    }
  }
);
  final HazelcastInstance member=Hazelcast.newHazelcastInstance(config);
  final HazelcastInstance superClient=Hazelcast.newHazelcastInstance(configSuper);
  Hazelcast.newHazelcastInstance(config);
  assertEquals(initialKeys,member.getMap("String_Node_Str").size());
  assertEquals(initialKeys,superClient.getMap("String_Node_Str").size());
  assertEquals(initialKeys,superClient.getMap("String_Node_Str").size());
  assertEquals(initialKeys,member.getMap("String_Node_Str").size());
  Hazelcast.shutdownAll();
}

Fixed version (ground truth):
@Test public void testInitialization(){
  Config config=new Config();
  MapConfig mapConfig=config.getMapConfig("String_Node_Str");
  MapStoreConfig msConfig=new MapStoreConfig();
  mapConfig.setMapStoreConfig(msConfig);
  msConfig.setEnabled(true);
  Config configSuper=new Config();
  configSuper.setLiteMember(true);
  configSuper.addMapConfig(mapConfig);
  final int initialKeys=5;
  msConfig.setImplementation(new MapLoader(){
    public Object load(    Object key){
      return "String_Node_Str" + key;
    }
    public Map loadAll(    Collection keys){
      Map map=new HashMap(keys.size());
      for (      Object key : keys) {
        map.put(key,load(key));
      }
      return map;
    }
    public Set loadAllKeys(){
      Set keys=new HashSet(3);
      for (int i=0; i < initialKeys; i++) {
        keys.add(i);
      }
      return keys;
    }
  }
);
  final HazelcastInstance member=Hazelcast.newHazelcastInstance(config);
  final HazelcastInstance superClient=Hazelcast.newHazelcastInstance(configSuper);
  Hazelcast.newHazelcastInstance(config);
  assertEquals(initialKeys,member.getMap("String_Node_Str").size());
  assertEquals(initialKeys,superClient.getMap("String_Node_Str").size());
  assertEquals(initialKeys,superClient.getMap("String_Node_Str").size());
  assertEquals(initialKeys,member.getMap("String_Node_Str").size());
  Hazelcast.shutdownAll();
}
Program: 49812
Project: 49812
Buggy source:
@Test public void testThreeMemberInit() throws Exception {
  TestEventBasedMapStore testMapStore=new TestEventBasedMapStore();
  testMapStore.setLoadAllKeys(true);
  Map store=testMapStore.getStore();
  Set keys=new HashSet();
  int size=10000;
  for (int i=0; i < size; i++) {
    store.put(i,"String_Node_Str" + i);
    keys.add(i);
  }
  Config config=newConfig(testMapStore,2);
  final HazelcastInstance h1=Hazelcast.newHazelcastInstance(config);
  final HazelcastInstance h2=Hazelcast.newHazelcastInstance(config);
  final HazelcastInstance h3=Hazelcast.newHazelcastInstance(config);
  final HazelcastInstance[] instances=new HazelcastInstance[]{h1,h2,h3};
  final Random random=new Random();
  final CountDownLatch latch=new CountDownLatch(50);
  for (int i=0; i < 50; i++) {
    new Thread(new Runnable(){
      public void run(){
        instances[random.nextInt(100) % 3].getMap("String_Node_Str");
        latch.countDown();
      }
    }
).start();
  }
  Assert.assertTrue(latch.await(100,TimeUnit.SECONDS));
  assertEquals(15,testMapStore.callCount.get());
  IMap map1=h1.getMap("String_Node_Str");
  IMap map2=h2.getMap("String_Node_Str");
  IMap map3=h3.getMap("String_Node_Str");
  for (int i=0; i < size; i++) {
    assertEquals("String_Node_Str" + i,map3.get(i));
  }
  assertEquals(15,testMapStore.callCount.get());
}

Fixed version (ground truth):
@Test public void testThreeMemberInit() throws Exception {
  TestEventBasedMapStore testMapStore=new TestEventBasedMapStore();
  testMapStore.setLoadAllKeys(true);
  Map store=testMapStore.getStore();
  Set keys=new HashSet();
  int size=10000;
  for (int i=0; i < size; i++) {
    store.put(i,"String_Node_Str" + i);
    keys.add(i);
  }
  Config config=newConfig(testMapStore,2);
  final HazelcastInstance h1=Hazelcast.newHazelcastInstance(config);
  final HazelcastInstance h2=Hazelcast.newHazelcastInstance(config);
  final HazelcastInstance h3=Hazelcast.newHazelcastInstance(config);
  final HazelcastInstance[] instances=new HazelcastInstance[]{h1,h2,h3};
  final Random random=new Random();
  final CountDownLatch latch=new CountDownLatch(50);
  for (int i=0; i < 50; i++) {
    new Thread(new Runnable(){
      public void run(){
        instances[random.nextInt(100) % 3].getMap("String_Node_Str");
        latch.countDown();
      }
    }
).start();
  }
  assertTrue(latch.await(100,TimeUnit.SECONDS));
  assertTrue(testMapStore.callCount.get() >= 13);
  assertTrue(testMapStore.callCount.get() <= 15);
  IMap map1=h1.getMap("String_Node_Str");
  IMap map2=h2.getMap("String_Node_Str");
  IMap map3=h3.getMap("String_Node_Str");
  for (int i=0; i < size; i++) {
    assertEquals("String_Node_Str" + i,map3.get(i));
  }
  assertTrue(testMapStore.callCount.get() >= 13);
  assertTrue(testMapStore.callCount.get() <= 15);
}
Program: 49813
Project: 49813
Buggy source:
public ClientProperties setProperties(final Map<String,String> properties){
  for (  final Entry<String,String> entry : properties.entrySet()) {
    setPropertyValue(entry.getKey(),entry.getValue());
  }
  return this;
}

Fixed version (ground truth):
public ClientProperties setProperties(final Map<ClientPropertyName,String> properties){
  for (  final Entry<ClientPropertyName,String> entry : properties.entrySet()) {
    setPropertyValue(entry.getKey(),entry.getValue());
  }
  return this;
}
Program: 49815
Project: 49815
Buggy source:
@Test public void testInstance(){
  assertNotNull(instance);
  final Set<Member> members=instance.getCluster().getMembers();
  assertEquals(1,members.size());
  final Member member=members.iterator().next();
  final InetSocketAddress inetSocketAddress=member.getInetSocketAddress();
  assertEquals(5800,inetSocketAddress.getPort());
  assertEquals("String_Node_Str",config.getInstanceName());
}

Fixed version (ground truth):
@Test public void testInstance(){
  assertNotNull(instance);
  final Set<Member> members=instance.getCluster().getMembers();
  assertEquals(1,members.size());
  final Member member=members.iterator().next();
  final InetSocketAddress inetSocketAddress=member.getInetSocketAddress();
  assertEquals(5700,inetSocketAddress.getPort());
  assertEquals("String_Node_Str",config.getInstanceName());
}
Program: 49816
Project: 49816
Buggy source:
@Test public void testNetworkConfig(){
  NetworkConfig networkConfig=config.getNetworkConfig();
  assertNotNull(networkConfig);
  assertEquals(5800,config.getPort());
  assertFalse(config.isPortAutoIncrement());
  assertFalse(networkConfig.getJoin().getMulticastConfig().isEnabled());
  assertFalse(networkConfig.getInterfaces().isEnabled());
  assertEquals(1,networkConfig.getInterfaces().getInterfaces().size());
  assertEquals("String_Node_Str",networkConfig.getInterfaces().getInterfaces().iterator().next());
  TcpIpConfig tcp=networkConfig.getJoin().getTcpIpConfig();
  assertNotNull(tcp);
  assertTrue(tcp.isEnabled());
  assertTrue(networkConfig.getSymmetricEncryptionConfig().isEnabled());
  final List<String> members=tcp.getMembers();
  assertEquals(members.toString(),2,members.size());
  assertEquals("String_Node_Str",members.get(0));
  assertEquals("String_Node_Str",members.get(1));
  assertEquals("String_Node_Str",tcp.getRequiredMember());
  AwsConfig aws=networkConfig.getJoin().getAwsConfig();
  assertFalse(aws.isEnabled());
  assertEquals("String_Node_Str",aws.getAccessKey());
  assertEquals("String_Node_Str",aws.getSecretKey());
  assertEquals("String_Node_Str",aws.getRegion());
  assertEquals("String_Node_Str",aws.getSecurityGroupName());
  assertEquals("String_Node_Str",aws.getTagKey());
  assertEquals("String_Node_Str",aws.getTagValue());
}

Fixed version (ground truth):
@Test public void testNetworkConfig(){
  NetworkConfig networkConfig=config.getNetworkConfig();
  assertNotNull(networkConfig);
  assertEquals(5700,config.getPort());
  assertFalse(config.isPortAutoIncrement());
  assertFalse(networkConfig.getJoin().getMulticastConfig().isEnabled());
  assertFalse(networkConfig.getInterfaces().isEnabled());
  assertEquals(1,networkConfig.getInterfaces().getInterfaces().size());
  assertEquals("String_Node_Str",networkConfig.getInterfaces().getInterfaces().iterator().next());
  TcpIpConfig tcp=networkConfig.getJoin().getTcpIpConfig();
  assertNotNull(tcp);
  assertTrue(tcp.isEnabled());
  assertTrue(networkConfig.getSymmetricEncryptionConfig().isEnabled());
  final List<String> members=tcp.getMembers();
  assertEquals(members.toString(),2,members.size());
  assertEquals("String_Node_Str",members.get(0));
  assertEquals("String_Node_Str",members.get(1));
  assertEquals("String_Node_Str",tcp.getRequiredMember());
  AwsConfig aws=networkConfig.getJoin().getAwsConfig();
  assertFalse(aws.isEnabled());
  assertEquals("String_Node_Str",aws.getAccessKey());
  assertEquals("String_Node_Str",aws.getSecretKey());
  assertEquals("String_Node_Str",aws.getRegion());
  assertEquals("String_Node_Str",aws.getSecurityGroupName());
  assertEquals("String_Node_Str",aws.getTagKey());
  assertEquals("String_Node_Str",aws.getTagValue());
}
Program: 49817
Project: 49817
Buggy source:
@Test public void testInstance(){
  assertNotNull(instance);
  final Set<Member> members=instance.getCluster().getMembers();
  assertEquals(1,members.size());
  final Member member=members.iterator().next();
  final InetSocketAddress inetSocketAddress=member.getInetSocketAddress();
  assertEquals(5800,inetSocketAddress.getPort());
}

Fixed version (ground truth):
@Test public void testInstance(){
  assertNotNull(instance);
  final Set<Member> members=instance.getCluster().getMembers();
  assertEquals(1,members.size());
  final Member member=members.iterator().next();
  final InetSocketAddress inetSocketAddress=member.getInetSocketAddress();
  assertEquals(5700,inetSocketAddress.getPort());
}
Program: 49818
Project: 49818
Buggy source:
public void run(){
  final ILogger logger=node.loggingService.getLogger("String_Node_Str");
  logger.log(Level.SEVERE,"String_Node_Str");
  node.shutdown(true,false);
}

Fixed version (ground truth):
public void run(){
  final ILogger logger=node.loggingService.getLogger("String_Node_Str");
  logger.log(Level.SEVERE,"String_Node_Str");
  node.shutdown(true,true);
}
Program: 49819
Project: 49819
Buggy source:
void reset(){
  for (  Record record : mapRecords.values()) {
    if (record.hasScheduledAction()) {
      List<ScheduledAction> lsScheduledActions=record.getScheduledActions();
      if (lsScheduledActions != null) {
        for (        ScheduledAction scheduledAction : lsScheduledActions) {
          scheduledAction.setValid(false);
        }
      }
    }
  }
  if (nearCache != null) {
    nearCache.reset();
  }
  mapRecords.clear();
  mapIndexService.clear();
  node.listenerManager.removeAllRegisteredListeners(getName());
  if (mapStoreWrapper != null) {
    try {
      mapStoreWrapper.destroy();
    }
 catch (    Exception e) {
      logger.log(Level.WARNING,e.getMessage(),e);
    }
  }
}

Fixed version (ground truth):
void reset(boolean invalidate){
  for (  Record record : mapRecords.values()) {
    if (record.hasScheduledAction()) {
      List<ScheduledAction> lsScheduledActions=record.getScheduledActions();
      if (lsScheduledActions != null) {
        for (        ScheduledAction scheduledAction : lsScheduledActions) {
          scheduledAction.setValid(false);
        }
      }
    }
    if (invalidate) {
      record.invalidate();
    }
  }
  if (nearCache != null) {
    nearCache.reset();
  }
  mapRecords.clear();
  mapIndexService.clear();
}
Program: 49820
Project: 49820
Buggy source:
public void onRestart(){
  enqueueAndWait(new Processable(){
    public void process(){
      partitionManager.reset();
      for (      CMap cmap : maps.values()) {
        cmap.reset();
      }
    }
  }
,5);
}

Fixed version (ground truth):
public void onRestart(){
  enqueueAndWait(new Processable(){
    public void process(){
      partitionManager.reset();
      for (      CMap cmap : maps.values()) {
        cmap.reset(false);
      }
    }
  }
,5);
}
Program: 49821
Project: 49821
Buggy source:
public Set iterate(){
  Entries entries=new Entries(ConcurrentMapManager.this,name,CONCURRENT_MAP_ITERATE_KEYS,predicate);
  Pairs pairs=(Pairs)getResultAsObject();
  entries.addEntries(pairs);
  return entries;
}

Fixed version (ground truth):
public Set iterate(){
  Entries entries=new Entries(ConcurrentMapManager.this,name,CONCURRENT_MAP_ITERATE_KEYS,predicate);
  final Object response=getResultAsObject();
  if (response instanceof Throwable) {
    Util.throwUncheckedException((Throwable)response);
  }
  Pairs pairs=(Pairs)response;
  entries.addEntries(pairs);
  return entries;
}