nus-yam/ex-repair huggingface dataset:
Program: 48678
Project: 48678
Buggy source:
public Object call() throws Exception {
  final ClientEndpoint endpoint=getEndpoint();
  final ClientEngine clientEngine=getClientEngine();
  final MultiMapService service=getService();
  EntryListener listener=new EntryListener(){
    public void entryAdded(    EntryEvent event){
      send(event);
    }
    public void entryRemoved(    EntryEvent event){
      send(event);
    }
    public void entryUpdated(    EntryEvent event){
      send(event);
    }
    public void entryEvicted(    EntryEvent event){
      send(event);
    }
    private void send(    EntryEvent event){
      if (endpoint.live()) {
        Data key=clientEngine.toData(event.getKey());
        Data value=clientEngine.toData(event.getValue());
        Data oldValue=clientEngine.toData(event.getOldValue());
        PortableEntryEvent portableEntryEvent=new PortableEntryEvent(key,value,oldValue,event.getEventType(),event.getMember().getUuid());
        endpoint.sendEvent(portableEntryEvent,getCallId());
      }
    }
  }
;
  String registrationId=service.addListener(name,listener,key,includeValue,false);
  endpoint.setListenerRegistration(MultiMapService.SERVICE_NAME,name,registrationId);
  return null;
}

Fixed version (ground truth):
public Object call() throws Exception {
  final ClientEndpoint endpoint=getEndpoint();
  final ClientEngine clientEngine=getClientEngine();
  final MultiMapService service=getService();
  EntryListener listener=new EntryListener(){
    public void entryAdded(    EntryEvent event){
      send(event);
    }
    public void entryRemoved(    EntryEvent event){
      send(event);
    }
    public void entryUpdated(    EntryEvent event){
      send(event);
    }
    public void entryEvicted(    EntryEvent event){
      send(event);
    }
    private void send(    EntryEvent event){
      if (endpoint.live()) {
        Data key=clientEngine.toData(event.getKey());
        Data value=clientEngine.toData(event.getValue());
        Data oldValue=clientEngine.toData(event.getOldValue());
        PortableEntryEvent portableEntryEvent=new PortableEntryEvent(key,value,oldValue,event.getEventType(),event.getMember().getUuid());
        endpoint.sendEvent(portableEntryEvent,getCallId());
      }
    }
  }
;
  String registrationId=service.addListener(name,listener,key,includeValue,false);
  endpoint.setListenerRegistration(MultiMapService.SERVICE_NAME,name,registrationId);
  return registrationId;
}
Program: 48679
Project: 48679
Buggy source:
@Override public void read(PortableReader reader) throws IOException {
  super.readPortable(reader);
  final ObjectDataInput in=reader.getRawDataInput();
  key=new Data();
  key.readData(in);
}

Fixed version (ground truth):
@Override public void read(PortableReader reader) throws IOException {
  super.read(reader);
  final ObjectDataInput in=reader.getRawDataInput();
  key=new Data();
  key.readData(in);
}
Program: 48680
Project: 48680
Buggy source:
public void write(PortableWriter writer) throws IOException {
  super.writePortable(writer);
  final ObjectDataOutput out=writer.getRawDataOutput();
  key.writeData(out);
}

Fixed version (ground truth):
public void write(PortableWriter writer) throws IOException {
  super.write(writer);
  final ObjectDataOutput out=writer.getRawDataOutput();
  key.writeData(out);
}
Program: 48681
Project: 48681
Buggy source:
public void read(PortableReader reader) throws IOException {
  index=reader.readInt("String_Node_Str");
  threadId=reader.readInt("String_Node_Str");
  super.readPortable(reader);
  final ObjectDataInput in=reader.getRawDataInput();
  value=new Data();
  value.readData(in);
}

Fixed version (ground truth):
public void read(PortableReader reader) throws IOException {
  index=reader.readInt("String_Node_Str");
  threadId=reader.readInt("String_Node_Str");
  super.read(reader);
  final ObjectDataInput in=reader.getRawDataInput();
  value=new Data();
  value.readData(in);
}
Program: 48682
Project: 48682
Buggy source:
public void write(PortableWriter writer) throws IOException {
  writer.writeInt("String_Node_Str",index);
  writer.writeInt("String_Node_Str",threadId);
  super.writePortable(writer);
  final ObjectDataOutput out=writer.getRawDataOutput();
  value.writeData(out);
}

Fixed version (ground truth):
public void write(PortableWriter writer) throws IOException {
  writer.writeInt("String_Node_Str",index);
  writer.writeInt("String_Node_Str",threadId);
  super.write(writer);
  final ObjectDataOutput out=writer.getRawDataOutput();
  value.writeData(out);
}
Program: 48683
Project: 48683
Buggy source:
public void read(PortableReader reader) throws IOException {
  threadId=reader.readInt("String_Node_Str");
  super.readPortable(reader);
  final ObjectDataInput in=reader.getRawDataInput();
  value=new Data();
  value.readData(in);
}

Fixed version (ground truth):
public void read(PortableReader reader) throws IOException {
  threadId=reader.readInt("String_Node_Str");
  super.read(reader);
  final ObjectDataInput in=reader.getRawDataInput();
  value=new Data();
  value.readData(in);
}
Program: 48684
Project: 48684
Buggy source:
public void write(PortableWriter writer) throws IOException {
  writer.writeInt("String_Node_Str",threadId);
  super.writePortable(writer);
  final ObjectDataOutput out=writer.getRawDataOutput();
  value.writeData(out);
}

Fixed version (ground truth):
public void write(PortableWriter writer) throws IOException {
  writer.writeInt("String_Node_Str",threadId);
  super.write(writer);
  final ObjectDataOutput out=writer.getRawDataOutput();
  value.writeData(out);
}
Program: 48685
Project: 48685
Buggy source:
public void read(PortableReader reader) throws IOException {
  super.readPortable(reader);
  int size=reader.readInt("String_Node_Str");
  final ObjectDataInput in=reader.getRawDataInput();
  dataList=new ArrayList<Data>(size);
  for (int i=0; i < size; i++) {
    Data data=new Data();
    data.readData(in);
    dataList.add(data);
  }
}

Fixed version (ground truth):
public void read(PortableReader reader) throws IOException {
  super.read(reader);
  int size=reader.readInt("String_Node_Str");
  final ObjectDataInput in=reader.getRawDataInput();
  dataList=new ArrayList<Data>(size);
  for (int i=0; i < size; i++) {
    Data data=new Data();
    data.readData(in);
    dataList.add(data);
  }
}
Program: 48686
Project: 48686
Buggy source:
public void write(PortableWriter writer) throws IOException {
  super.writePortable(writer);
  writer.writeInt("String_Node_Str",dataList.size());
  final ObjectDataOutput out=writer.getRawDataOutput();
  for (  Data data : dataList) {
    data.writeData(out);
  }
}

Fixed version (ground truth):
public void write(PortableWriter writer) throws IOException {
  super.write(writer);
  writer.writeInt("String_Node_Str",dataList.size());
  final ObjectDataOutput out=writer.getRawDataOutput();
  for (  Data data : dataList) {
    data.writeData(out);
  }
}
Program: 48687
Project: 48687
Buggy source:
public void read(PortableReader reader) throws IOException {
  super.readPortable(reader);
  final ObjectDataInput in=reader.getRawDataInput();
  data=new Data();
  data.readData(in);
}

Fixed version (ground truth):
public void read(PortableReader reader) throws IOException {
  super.read(reader);
  final ObjectDataInput in=reader.getRawDataInput();
  data=new Data();
  data.readData(in);
}
Program: 48688
Project: 48688
Buggy source:
public void write(PortableWriter writer) throws IOException {
  super.writePortable(writer);
  final ObjectDataOutput out=writer.getRawDataOutput();
  data.writeData(out);
}

Fixed version (ground truth):
public void write(PortableWriter writer) throws IOException {
  super.write(writer);
  final ObjectDataOutput out=writer.getRawDataOutput();
  data.writeData(out);
}
Program: 48689
Project: 48689
Buggy source:
@Override public Object call() throws Exception {
  final ClientEndpoint endpoint=getEndpoint();
  final ReplicatedRecordStore replicatedRecordStore=getReplicatedRecordStore();
  EntryListener<Object,Object> listener=new EntryListener<Object,Object>(){
    private void handleEvent(    EntryEvent<Object,Object> event){
      if (endpoint.live()) {
        Object key=event.getKey();
        Object value=event.getValue();
        Object oldValue=event.getOldValue();
        ReplicatedMapPortableEntryEvent portableEntryEvent=new ReplicatedMapPortableEntryEvent(key,value,oldValue,event.getEventType(),event.getMember().getUuid());
        endpoint.sendEvent(portableEntryEvent,getCallId());
      }
    }
    public void entryAdded(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
    public void entryRemoved(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
    public void entryUpdated(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
    public void entryEvicted(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
  }
;
  String registrationId;
  if (predicate == null) {
    registrationId=replicatedRecordStore.addEntryListener(listener,key);
  }
 else {
    registrationId=replicatedRecordStore.addEntryListener(listener,predicate,key);
  }
  endpoint.setListenerRegistration(ReplicatedMapService.SERVICE_NAME,getMapName(),registrationId);
  return true;
}

Fixed version (ground truth):
@Override public Object call() throws Exception {
  final ClientEndpoint endpoint=getEndpoint();
  final ReplicatedRecordStore replicatedRecordStore=getReplicatedRecordStore();
  EntryListener<Object,Object> listener=new EntryListener<Object,Object>(){
    private void handleEvent(    EntryEvent<Object,Object> event){
      if (endpoint.live()) {
        Object key=event.getKey();
        Object value=event.getValue();
        Object oldValue=event.getOldValue();
        ReplicatedMapPortableEntryEvent portableEntryEvent=new ReplicatedMapPortableEntryEvent(key,value,oldValue,event.getEventType(),event.getMember().getUuid());
        endpoint.sendEvent(portableEntryEvent,getCallId());
      }
    }
    public void entryAdded(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
    public void entryRemoved(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
    public void entryUpdated(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
    public void entryEvicted(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
  }
;
  String registrationId;
  if (predicate == null) {
    registrationId=replicatedRecordStore.addEntryListener(listener,key);
  }
 else {
    registrationId=replicatedRecordStore.addEntryListener(listener,predicate,key);
  }
  endpoint.setListenerRegistration(ReplicatedMapService.SERVICE_NAME,getMapName(),registrationId);
  return registrationId;
}
Program: 48690
Project: 48690
Buggy source:
public Object call() throws Exception {
  final ReplicatedRecordStore replicatedRecordStore=getReplicatedRecordStore();
  replicatedRecordStore.removeEntryListenerInternal(registrationId);
  return null;
}

Fixed version (ground truth):
public Object call() throws Exception {
  final ReplicatedRecordStore replicatedRecordStore=getReplicatedRecordStore();
  return replicatedRecordStore.removeEntryListenerInternal(registrationId);
}
Program: 48691
Project: 48691
Buggy source:
public Object call() throws Exception {
  final TopicService service=getService();
  final ClientEngine clientEngine=getClientEngine();
  final ClientEndpoint endpoint=getEndpoint();
  MessageListener listener=new MessageListener(){
    public void onMessage(    Message message){
      if (endpoint.live()) {
        Data messageData=clientEngine.toData(message.getMessageObject());
        PortableMessage portableMessage=new PortableMessage(messageData,message.getPublishTime(),message.getPublishingMember().getUuid());
        endpoint.sendEvent(portableMessage,getCallId());
      }
    }
  }
;
  String registrationId=service.addMessageListener(name,listener);
  endpoint.setListenerRegistration(TopicService.SERVICE_NAME,name,registrationId);
  return null;
}

Fixed version (ground truth):
public Object call() throws Exception {
  final TopicService service=getService();
  final ClientEngine clientEngine=getClientEngine();
  final ClientEndpoint endpoint=getEndpoint();
  MessageListener listener=new MessageListener(){
    public void onMessage(    Message message){
      if (endpoint.live()) {
        Data messageData=clientEngine.toData(message.getMessageObject());
        PortableMessage portableMessage=new PortableMessage(messageData,message.getPublishTime(),message.getPublishingMember().getUuid());
        endpoint.sendEvent(portableMessage,getCallId());
      }
    }
  }
;
  String registrationId=service.addMessageListener(name,listener);
  endpoint.setListenerRegistration(TopicService.SERVICE_NAME,name,registrationId);
  return registrationId;
}
Program: 48692
Project: 48692
Buggy source:
@AfterClass public static void destroy(){
  HazelcastClient.shutdownAll();
  Hazelcast.shutdownAll();
}

Fixed version (ground truth):
@After public static void destroy(){
  HazelcastClient.shutdownAll();
  Hazelcast.shutdownAll();
}
Program: 48693
Project: 48693
Buggy source:
@Override public void run() throws Exception {
  final PartitionService partitionService=getNodeEngine().getPartitionService();
  final RecordStore recordStore=mapService.getRecordStore(getPartitionId(),name);
  MapEntrySimple entry;
  for (  Data key : keys) {
    if (partitionService.getPartitionId(key) != getPartitionId())     continue;
    Object objectKey=mapService.toObject(key);
    final Map.Entry<Data,Object> mapEntry=recordStore.getMapEntry(key);
    final Record record=(Record)mapEntry.getValue();
    final Object valueBeforeProcess=mapService.toObject(record.getValue());
    entry=new MapEntrySimple(objectKey,valueBeforeProcess);
    backupProcessor.processBackup(entry);
    recordStore.put(new AbstractMap.SimpleImmutableEntry<Data,Object>(key,entry.getValue()));
  }
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  final PartitionService partitionService=getNodeEngine().getPartitionService();
  final RecordStore recordStore=mapService.getRecordStore(getPartitionId(),name);
  MapEntrySimple entry;
  for (  Data key : keys) {
    if (partitionService.getPartitionId(key) != getPartitionId())     continue;
    Object objectKey=mapService.toObject(key);
    final Map.Entry<Data,Object> mapEntry=recordStore.getMapEntry(key);
    final Object valueBeforeProcess=mapService.toObject(mapEntry.getValue());
    entry=new MapEntrySimple(objectKey,valueBeforeProcess);
    backupProcessor.processBackup(entry);
    recordStore.put(new AbstractMap.SimpleImmutableEntry<Data,Object>(key,entry.getValue()));
  }
}
Program: 48694
Project: 48694
Buggy source:
@Override protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  backupProcessor=in.readObject();
  int size=in.readInt();
  for (int i=0; i < size; i++) {
    Data key=new Data();
    key.readData(in);
    keys.add(key);
  }
}

Fixed version (ground truth):
@Override protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  backupProcessor=in.readObject();
  int size=in.readInt();
  keys=new HashSet<Data>(size);
  for (int i=0; i < size; i++) {
    Data key=new Data();
    key.readData(in);
    keys.add(key);
  }
}
Program: 48695
Project: 48695
Buggy source:
@Override protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  entryProcessor=in.readObject();
  int size=in.readInt();
  for (int i=0; i < size; i++) {
    Data key=new Data();
    key.readData(in);
    keys.add(key);
  }
}

Fixed version (ground truth):
@Override protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  entryProcessor=in.readObject();
  int size=in.readInt();
  keys=new HashSet<Data>(size);
  for (int i=0; i < size; i++) {
    Data key=new Data();
    key.readData(in);
    keys.add(key);
  }
}
Program: 48696
Project: 48696
Buggy source:
@Override public void readData(ObjectDataInput in) throws IOException {
  this.name=in.readUTF();
  int size=in.readInt();
  for (int i=0; i < size; i++) {
    Data key=new Data();
    key.readData(in);
    keys.add(key);
  }
  this.entryProcessor=in.readObject();
}

Fixed version (ground truth):
@Override public void readData(ObjectDataInput in) throws IOException {
  this.name=in.readUTF();
  int size=in.readInt();
  this.keys=new HashSet<Data>(size);
  for (int i=0; i < size; i++) {
    Data key=new Data();
    key.readData(in);
    keys.add(key);
  }
  this.entryProcessor=in.readObject();
}
Program: 48697
Project: 48697
Buggy source:
@Test public void testExecuteOnKeys() throws InterruptedException, ExecutionException {
  TestHazelcastInstanceFactory nodeFactory=createHazelcastInstanceFactory(2);
  HazelcastInstance instance1=nodeFactory.newHazelcastInstance();
  HazelcastInstance instance2=nodeFactory.newHazelcastInstance();
  IMap<Integer,Integer> map=instance1.getMap("String_Node_Str");
  for (int i=0; i < 10; i++) {
    map.put(i,0);
  }
  Set keys=new HashSet();
  keys.add(1);
  keys.add(4);
  keys.add(7);
  keys.add(9);
  final Map<Integer,Object> resultMap=map.executeOnKeys(keys,new IncrementorEntryProcessor());
  assertEquals(1,resultMap.get(1));
  assertEquals(1,resultMap.get(4));
  assertEquals(1,resultMap.get(7));
  assertEquals(1,resultMap.get(9));
  assertEquals(1,(int)map.get(1));
  assertEquals(0,(int)map.get(2));
  assertEquals(0,(int)map.get(3));
  assertEquals(1,(int)map.get(4));
  assertEquals(0,(int)map.get(5));
  assertEquals(0,(int)map.get(6));
  assertEquals(1,(int)map.get(7));
  assertEquals(0,(int)map.get(8));
  assertEquals(1,(int)map.get(9));
}

Fixed version (ground truth):
@Test public void testExecuteOnKeys() throws InterruptedException, ExecutionException {
  TestHazelcastInstanceFactory nodeFactory=createHazelcastInstanceFactory(2);
  HazelcastInstance instance1=nodeFactory.newHazelcastInstance();
  HazelcastInstance instance2=nodeFactory.newHazelcastInstance();
  IMap<Integer,Integer> map=instance1.getMap("String_Node_Str");
  IMap<Integer,Integer> map2=instance2.getMap("String_Node_Str");
  for (int i=0; i < 10; i++) {
    map.put(i,0);
  }
  Set keys=new HashSet();
  keys.add(1);
  keys.add(4);
  keys.add(7);
  keys.add(9);
  final Map<Integer,Object> resultMap=map2.executeOnKeys(keys,new IncrementorEntryProcessor());
  assertEquals(1,resultMap.get(1));
  assertEquals(1,resultMap.get(4));
  assertEquals(1,resultMap.get(7));
  assertEquals(1,resultMap.get(9));
  assertEquals(1,(int)map.get(1));
  assertEquals(0,(int)map.get(2));
  assertEquals(0,(int)map.get(3));
  assertEquals(1,(int)map.get(4));
  assertEquals(0,(int)map.get(5));
  assertEquals(0,(int)map.get(6));
  assertEquals(1,(int)map.get(7));
  assertEquals(0,(int)map.get(8));
  assertEquals(1,(int)map.get(9));
}
Program: 48698
Project: 48698
Buggy source:
private static DateFormat getTimestampFormat(){
  return new SimpleDateFormat(timestampFormat);
}

Fixed version (ground truth):
private static DateFormat getTimestampFormat(){
  return new SimpleDateFormat(timestampFormat,Locale.US);
}
Program: 48699
Project: 48699
Buggy source:
private static <T>T throwRuntimeParseException(String value,Exception e){
  throw new RuntimeException("String_Node_Str" + value + "String_Node_Str"+ dateFormat+ "String_Node_Str"+ timestampFormat+ "String_Node_Str"+ sqlDateFormat+ "String_Node_Str",e);
}

Fixed version (ground truth):
private static <T>T throwRuntimeParseException(String value,Exception e,String... legalFormats){
  StringBuilder sb=new StringBuilder();
  for (int i=0; i < legalFormats.length; i++) {
    sb.append("String_Node_Str").append(legalFormats[i]).append("String_Node_Str");
    if (i < legalFormats.length - 2)     sb.append("String_Node_Str");
  }
  throw new RuntimeException("String_Node_Str" + value + "String_Node_Str"+ sb.toString()+ "String_Node_Str",e);
}
Program: 48700
Project: 48700
Buggy source:
static java.sql.Time parseSqlTime(final String value){
  try {
    return new Time(getSqlTimeFormat().parse(value).getTime());
  }
 catch (  ParseException e) {
    return throwRuntimeParseException(value,e);
  }
}

Fixed version (ground truth):
static java.sql.Time parseSqlTime(final String value){
  try {
    return new Time(getSqlTimeFormat().parse(value).getTime());
  }
 catch (  ParseException e) {
    return throwRuntimeParseException(value,e,sqlTimeFormat);
  }
}
Program: 48701
Project: 48701
Buggy source:
private static DateFormat getUtilDateFormat(){
  return new SimpleDateFormat(dateFormat);
}

Fixed version (ground truth):
private static DateFormat getUtilDateFormat(){
  return new SimpleDateFormat(dateFormat,Locale.US);
}
Program: 48702
Project: 48702
Buggy source:
static Date parseDate(final String value){
  try {
    return getUtilDateFormat().parse(value);
  }
 catch (  ParseException e) {
    return throwRuntimeParseException(value,e);
  }
}

Fixed version (ground truth):
static Date parseDate(final String value){
  try {
    return getUtilDateFormat().parse(value);
  }
 catch (  ParseException e) {
    return throwRuntimeParseException(value,e,dateFormat);
  }
}
Program: 48703
Project: 48703
Buggy source:
static Timestamp parseTimeStamp(final String value){
  try {
    return new Timestamp(getTimestampFormat().parse(value).getTime());
  }
 catch (  ParseException e) {
    return throwRuntimeParseException(value,e);
  }
}

Fixed version (ground truth):
static Timestamp parseTimeStamp(final String value){
  try {
    return new Timestamp(getTimestampFormat().parse(value).getTime());
  }
 catch (  ParseException e) {
    return throwRuntimeParseException(value,e,timestampFormat);
  }
}
Program: 48704
Project: 48704
Buggy source:
static Date tryParse(final String value){
  try {
    return getUtilDateFormat().parse(value);
  }
 catch (  Exception ignored) {
  }
  try {
    return getTimestampFormat().parse(value);
  }
 catch (  Exception ignored) {
  }
  try {
    return getSqlDateFormat().parse(value);
  }
 catch (  Exception ignored) {
  }
  return throwRuntimeParseException(value,null);
}

Fixed version (ground truth):
static Date tryParse(final String value){
  try {
    return getUtilDateFormat().parse(value);
  }
 catch (  Exception ignored) {
  }
  try {
    return getTimestampFormat().parse(value);
  }
 catch (  Exception ignored) {
  }
  try {
    return getSqlDateFormat().parse(value);
  }
 catch (  Exception ignored) {
  }
  return throwRuntimeParseException(value,null,sqlDateFormat);
}
Program: 48705
Project: 48705
Buggy source:
private static DateFormat getSqlTimeFormat(){
  return new SimpleDateFormat(sqlTimeFormat);
}

Fixed version (ground truth):
private static DateFormat getSqlTimeFormat(){
  return new SimpleDateFormat(sqlTimeFormat,Locale.US);
}
Program: 48706
Project: 48706
Buggy source:
static java.sql.Date parseSqlDate(final String value){
  try {
    return new java.sql.Date(getSqlDateFormat().parse(value).getTime());
  }
 catch (  ParseException e) {
    return throwRuntimeParseException(value,e);
  }
}

Fixed version (ground truth):
static java.sql.Date parseSqlDate(final String value){
  try {
    return new java.sql.Date(getSqlDateFormat().parse(value).getTime());
  }
 catch (  ParseException e) {
    return throwRuntimeParseException(value,e,sqlDateFormat);
  }
}
Program: 48707
Project: 48707
Buggy source:
private static DateFormat getSqlDateFormat(){
  return new SimpleDateFormat(sqlDateFormat);
}

Fixed version (ground truth):
private static DateFormat getSqlDateFormat(){
  return new SimpleDateFormat(sqlDateFormat,Locale.US);
}
Program: 48709
Project: 48709
Buggy source:
@Test public void testUtilDate(){
  final long now=System.currentTimeMillis();
  final Date date1=new Date(now);
  final Date date2=DateHelper.parseDate(date1.toString());
  Calendar cal1=Calendar.getInstance(Locale.US);
  cal1.setTimeInMillis(date1.getTime());
  Calendar cal2=Calendar.getInstance(Locale.US);
  cal2.setTimeInMillis(date2.getTime());
  Assert.assertEquals(cal1.get(Calendar.YEAR),cal2.get(Calendar.YEAR));
  Assert.assertEquals(cal1.get(Calendar.MONTH),cal2.get(Calendar.MONTH));
  Assert.assertEquals(cal1.get(Calendar.DAY_OF_MONTH),cal2.get(Calendar.DAY_OF_MONTH));
  Assert.assertEquals(cal1.get(Calendar.HOUR_OF_DAY),cal2.get(Calendar.HOUR_OF_DAY));
  Assert.assertEquals(cal1.get(Calendar.MINUTE),cal2.get(Calendar.MINUTE));
  Assert.assertEquals(cal1.get(Calendar.SECOND),cal2.get(Calendar.SECOND));
}

Fixed version (ground truth):
@Test public void testUtilDate(){
  final long now=System.currentTimeMillis();
  final Date date1=new Date(now);
  final Date date2=DateHelper.parseDate(new SimpleDateFormat(DateHelperTest.DATE_FORMAT,Locale.US).format(date1));
  Calendar cal1=Calendar.getInstance(Locale.US);
  cal1.setTimeInMillis(date1.getTime());
  Calendar cal2=Calendar.getInstance(Locale.US);
  cal2.setTimeInMillis(date2.getTime());
  Assert.assertEquals(cal1.get(Calendar.YEAR),cal2.get(Calendar.YEAR));
  Assert.assertEquals(cal1.get(Calendar.MONTH),cal2.get(Calendar.MONTH));
  Assert.assertEquals(cal1.get(Calendar.DAY_OF_MONTH),cal2.get(Calendar.DAY_OF_MONTH));
  Assert.assertEquals(cal1.get(Calendar.HOUR_OF_DAY),cal2.get(Calendar.HOUR_OF_DAY));
  Assert.assertEquals(cal1.get(Calendar.MINUTE),cal2.get(Calendar.MINUTE));
  Assert.assertEquals(cal1.get(Calendar.SECOND),cal2.get(Calendar.SECOND));
}
Program: 48710
Project: 48710
Buggy source:
@Override public void run() throws Exception {
  Member localMember=getNodeEngine().getLocalMember();
  ReplicatedMapService replicatedMapService=getService();
  for (  MemberMapPair replicatedMap : replicatedMaps) {
    String mapName=replicatedMap.getName();
    if (localMember.equals(replicatedMap.getMember())) {
      AbstractReplicatedRecordStore recordStorage=(AbstractReplicatedRecordStore)replicatedMapService.getReplicatedRecordStore(mapName,false);
      if (recordStorage != null && recordStorage.isLoaded()) {
        recordStorage.queueInitialFillup(getCallerAddress(),chunkSize);
      }
 else {
        OperationService operationService=getNodeEngine().getOperationService();
        Operation operation=new ReplicatedMapInitChunkOperation(mapName,localMember,true);
        operationService.send(operation,getCallerAddress());
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  Member localMember=getNodeEngine().getLocalMember();
  ReplicatedMapService replicatedMapService=getService();
  for (  MemberMapPair replicatedMap : replicatedMaps) {
    String mapName=replicatedMap.getName();
    if (localMember.equals(replicatedMap.getMember())) {
      AbstractReplicatedRecordStore recordStorage=(AbstractReplicatedRecordStore)replicatedMapService.getReplicatedRecordStore(mapName,false);
      if (recordStorage != null && recordStorage.isLoaded()) {
        recordStorage.queueInitialFillup(getCallerAddress(),chunkSize);
      }
 else {
        OperationService operationService=getNodeEngine().getOperationService();
        Operation operation=new ReplicatedMapInitChunkOperation(mapName,localMember);
        operationService.send(operation,getCallerAddress());
      }
    }
  }
}
Program: 48711
Project: 48711
Buggy source:
@Override public boolean containsKey(Object key){
  return invoke(new ClientReplicatedMapContainsKeyRequest(getName(),key));
}

Fixed version (ground truth):
@Override public boolean containsKey(Object key){
  return (Boolean)invoke(new ClientReplicatedMapContainsKeyRequest(getName(),key));
}
Program: 48712
Project: 48712
Buggy source:
@Override public boolean isEmpty(){
  return invoke(new ClientReplicatedMapIsEmptyRequest(getName()));
}

Fixed version (ground truth):
@Override public boolean isEmpty(){
  return (Boolean)invoke(new ClientReplicatedMapIsEmptyRequest(getName()));
}
Program: 48713
Project: 48713
Buggy source:
@Override public boolean containsValue(Object value){
  return invoke(new ClientReplicatedMapContainsValueRequest(getName(),value));
}

Fixed version (ground truth):
@Override public boolean containsValue(Object value){
  return (Boolean)invoke(new ClientReplicatedMapContainsValueRequest(getName(),value));
}
Program: 48714
Project: 48714
Buggy source:
@Override public int size(){
  return invoke(new ClientReplicatedMapSizeRequest(getName()));
}

Fixed version (ground truth):
@Override public int size(){
  return (Integer)invoke(new ClientReplicatedMapSizeRequest(getName()));
}
Program: 48715
Project: 48715
Buggy source:
@Override public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command,long initialDelay,long delay,TimeUnit unit){
  return scheduleWithFixedDelay(command,initialDelay,delay,unit);
}

Fixed version (ground truth):
@Override public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command,long initialDelay,long delay,TimeUnit unit){
  return executorService.scheduleWithFixedDelay(command,initialDelay,delay,unit);
}
Program: 48716
Project: 48716
Buggy source:
@Override public void setReplicatorExecutorService(ExecutorService replicatorExecutorService){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void setReplicatorExecutorService(ScheduledExecutorService replicatorExecutorService){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 48717
Project: 48717
Buggy source:
private void initNearCache(){
  if (nearCacheInitialized.compareAndSet(false,true)) {
    final NearCacheConfig nearCacheConfig=getContext().getClientConfig().getNearCacheConfig(name);
    if (nearCacheConfig == null) {
      return;
    }
    ClientNearCache<Data> _nearCache=new ClientNearCache<Data>(name,getContext(),nearCacheConfig);
    nearCache=_nearCache;
  }
}

Fixed version (ground truth):
private void initNearCache(){
  if (nearCacheInitialized.compareAndSet(false,true)) {
    final NearCacheConfig nearCacheConfig=getContext().getClientConfig().getNearCacheConfig(name);
    if (nearCacheConfig == null) {
      return;
    }
    ClientNearCache<Data> _nearCache=new ClientNearCache<Data>(name,ClientNearCacheType.Map,getContext(),nearCacheConfig);
    nearCache=_nearCache;
  }
}
Program: 48718
Project: 48718
Buggy source:
private void initNearCache(){
  if (nearCacheInitialized.compareAndSet(false,true)) {
    final NearCacheConfig nearCacheConfig=getContext().getClientConfig().getNearCacheConfig(getName());
    if (nearCacheConfig == null) {
      return;
    }
    ClientNearCache<Object> _nearCache=new ClientNearCache<Object>(getName(),getContext(),nearCacheConfig);
    nearCache=_nearCache;
  }
}

Fixed version (ground truth):
private void initNearCache(){
  if (nearCacheInitialized.compareAndSet(false,true)) {
    final NearCacheConfig nearCacheConfig=getContext().getClientConfig().getNearCacheConfig(getName());
    if (nearCacheConfig == null) {
      return;
    }
    ClientNearCache<Object> _nearCache=new ClientNearCache<Object>(getName(),ClientNearCacheType.ReplicatedMap,getContext(),nearCacheConfig);
    nearCache=_nearCache;
  }
}
Program: 48719
Project: 48719
Buggy source:
@Override public Set<Entry<K,V>> entrySet(){
  return invoke(new ClientReplicatedMapEntrySetRequest(getName()));
}

Fixed version (ground truth):
@Override public Set<Entry<K,V>> entrySet(){
  return ((ReplicatedMapEntrySet)invoke(new ClientReplicatedMapEntrySetRequest(getName()))).getEntrySet();
}
Program: 48720
Project: 48720
Buggy source:
@Override public Collection<V> values(){
  return invoke(new ClientReplicatedMapValuesRequest(getName()));
}

Fixed version (ground truth):
@Override public Collection<V> values(){
  return ((ReplicatedMapValueCollection)invoke(new ClientReplicatedMapValuesRequest(getName()))).getValues();
}
Program: 48721
Project: 48721
Buggy source:
@Override public Set<K> keySet(){
  return invoke(new ClientReplicatedMapKeySetRequest(getName()));
}

Fixed version (ground truth):
@Override public Set<K> keySet(){
  return ((ReplicatedMapKeySet)invoke(new ClientReplicatedMapKeySetRequest(getName()))).getKeySet();
}
Program: 48722
Project: 48722
Buggy source:
@Override public void onMessage(Message<ReplicationMessage> message){
  ReplicationMessage replicationMessage=message.getMessageObject();
  ReplicatedRecordStore replicatedRecordStorage=replicatedStorages.get(replicationMessage.getName());
  if (replicatedRecordStorage instanceof AbstractReplicatedRecordStorage) {
    ((AbstractReplicatedRecordStorage)replicatedRecordStorage).queueUpdateMessage(replicationMessage);
  }
}

Fixed version (ground truth):
public void onMessage(ReplicationMessage replicationMessage){
  ReplicatedRecordStore replicatedRecordStorage=replicatedStorages.get(replicationMessage.getName());
  if (replicatedRecordStorage instanceof AbstractReplicatedRecordStorage) {
    ((AbstractReplicatedRecordStorage)replicatedRecordStorage).queueUpdateMessage(replicationMessage);
  }
}
Program: 48723
Project: 48723
Buggy source:
@Override public void shutdown(boolean terminate){
  eventService.deregisterListener(SERVICE_NAME,EVENT_TOPIC_NAME,eventRegistration.getId());
  for (  ReplicatedRecordStore replicatedRecordStore : replicatedStorages.values()) {
    replicatedRecordStore.destroy();
  }
  replicatedStorages.clear();
}

Fixed version (ground truth):
@Override public void shutdown(boolean terminate){
  for (  ReplicatedRecordStore replicatedRecordStore : replicatedStorages.values()) {
    replicatedRecordStore.destroy();
  }
  replicatedStorages.clear();
}
Program: 48724
Project: 48724
Buggy source:
public AbstractReplicatedRecordStorage(String name,NodeEngine nodeEngine,CleanerRegistrator cleanerRegistrator,ReplicatedMapService replicatedMapService){
  this.name=name;
  this.nodeEngine=nodeEngine;
  this.localMember=nodeEngine.getLocalMember();
  this.localMemberHash=localMember.getUuid().hashCode();
  this.eventService=nodeEngine.getEventService();
  this.replicatedMapService=replicatedMapService;
  this.replicatedMapConfig=replicatedMapService.getReplicatedMapConfig(name);
  this.replicationTopicName=ReplicatedMapService.SERVICE_NAME + "String_Node_Str";
  this.executorService=getExecutorService(replicatedMapConfig);
  this.mutexes=new Object[replicatedMapConfig.getConcurrencyLevel()];
  for (int i=0; i < mutexes.length; i++) {
    mutexes[i]=new Object();
  }
  this.cleanerFuture=cleanerRegistrator.registerCleaner(this);
}

Fixed version (ground truth):
public AbstractReplicatedRecordStorage(String name,NodeEngine nodeEngine,CleanerRegistrator cleanerRegistrator,ReplicatedMapService replicatedMapService){
  this.name=name;
  this.nodeEngine=nodeEngine;
  this.localMember=nodeEngine.getLocalMember();
  this.localMemberHash=localMember.getUuid().hashCode();
  this.eventService=nodeEngine.getEventService();
  this.replicatedMapService=replicatedMapService;
  this.replicatedMapConfig=replicatedMapService.getReplicatedMapConfig(name);
  this.executorService=getExecutorService(replicatedMapConfig);
  this.mutexes=new Object[replicatedMapConfig.getConcurrencyLevel()];
  for (int i=0; i < mutexes.length; i++) {
    mutexes[i]=new Object();
  }
  this.cleanerFuture=cleanerRegistrator.registerCleaner(this);
}
Program: 48725
Project: 48725
Buggy source:
@Override public Object put(Object key,Object value){
  V oldValue=null;
  Object marshalledKey=marshallKey(key);
  Object marshalledValue=marshallValue(value);
synchronized (getMutex(marshalledKey)) {
    final ReplicatedRecord old=storage.get(marshalledKey);
    final Vector vector;
    if (old == null) {
      vector=new Vector();
      ReplicatedRecord<K,V> record=new ReplicatedRecord(marshalledKey,marshalledValue,vector,localMemberHash);
      storage.put((K)key,record);
    }
 else {
      oldValue=(V)old.getValue();
      vector=old.getVector();
      storage.get(key).setValue((V)marshalledValue,localMemberHash);
    }
    incrementClock(vector);
    publishReplicatedMessage(new ReplicationMessage(name,key,value,vector,localMember,localMemberHash));
  }
  return unmarshallValue(oldValue);
}

Fixed version (ground truth):
@Override public Object put(Object key,Object value){
  V oldValue=null;
  K marshalledKey=(K)marshallKey(key);
  V marshalledValue=(V)marshallValue(value);
synchronized (getMutex(marshalledKey)) {
    final ReplicatedRecord old=storage.get(marshalledKey);
    final Vector vector;
    if (old == null) {
      vector=new Vector();
      ReplicatedRecord<K,V> record=new ReplicatedRecord(marshalledKey,marshalledValue,vector,localMemberHash);
      storage.put(marshalledKey,record);
    }
 else {
      oldValue=(V)old.getValue();
      vector=old.getVector();
      storage.get(marshalledKey).setValue(marshalledValue,localMemberHash);
    }
    incrementClock(vector);
    publishReplicatedMessage(new ReplicationMessage(name,key,value,vector,localMember,localMemberHash));
  }
  return unmarshallValue(oldValue);
}
Program: 48726
Project: 48726
Buggy source:
protected void publishReplicatedMessage(IdentifiedDataSerializable message){
  Collection<EventRegistration> registrations=eventService.getRegistrations(ReplicatedMapService.SERVICE_NAME,replicationTopicName);
  eventService.publishEvent(ReplicatedMapService.SERVICE_NAME,registrations,message,name.hashCode());
}

Fixed version (ground truth):
protected void publishReplicatedMessage(IdentifiedDataSerializable message){
  Collection<EventRegistration> registrations=eventService.getRegistrations(ReplicatedMapService.SERVICE_NAME,ReplicatedMapService.EVENT_TOPIC_NAME);
  eventService.publishEvent(ReplicatedMapService.SERVICE_NAME,registrations,message,name.hashCode());
}
Program: 48727
Project: 48727
Buggy source:
public void writeResponse(ManagementCenterService mcs,ObjectDataOutput dos) throws Exception {
  Map<String,String> properties=new LinkedHashMap<String,String>();
  Runtime runtime=Runtime.getRuntime();
  RuntimeMXBean runtimeMxBean=ManagementFactory.getRuntimeMXBean();
  final PartitionServiceImpl partitionService=mcs.getHazelcastInstance().node.getPartitionService();
  properties.put("String_Node_Str",mcs.getHazelcastInstance().node.initializer.getVersion());
  properties.put("String_Node_Str",Long.toString(runtimeMxBean.getStartTime()));
  properties.put("String_Node_Str",Long.toString(runtimeMxBean.getUptime()));
  properties.put("String_Node_Str",Long.toString(runtime.freeMemory()));
  properties.put("String_Node_Str",Long.toString(runtime.totalMemory()));
  properties.put("String_Node_Str",Long.toString(runtime.maxMemory()));
  properties.put("String_Node_Str",Boolean.toString(partitionService.hasOnGoingMigration()));
  properties.put("String_Node_Str",Long.toString(partitionService.getMigrationQueueSize()));
  dos.writeInt(properties.size());
  for (  Object property : properties.keySet()) {
    dos.writeUTF((String)property + "String_Node_Str" + (String)properties.get(property));
  }
}

Fixed version (ground truth):
public void writeResponse(ManagementCenterService mcs,ObjectDataOutput dos) throws Exception {
  Map<String,String> properties=new LinkedHashMap<String,String>();
  Runtime runtime=Runtime.getRuntime();
  RuntimeMXBean runtimeMxBean=ManagementFactory.getRuntimeMXBean();
  final PartitionServiceImpl partitionService=mcs.getHazelcastInstance().node.getPartitionService();
  properties.put("String_Node_Str",mcs.getHazelcastInstance().node.initializer.getVersion());
  properties.put("String_Node_Str",Long.toString(runtimeMxBean.getStartTime()));
  properties.put("String_Node_Str",Long.toString(runtimeMxBean.getUptime()));
  properties.put("String_Node_Str",Long.toString(runtime.freeMemory()));
  properties.put("String_Node_Str",Long.toString(runtime.totalMemory()));
  properties.put("String_Node_Str",Long.toString(runtime.maxMemory()));
  properties.put("String_Node_Str",Boolean.toString(partitionService.hasOnGoingMigration()));
  properties.put("String_Node_Str",Long.toString(partitionService.getMigrationQueueSize()));
  dos.writeInt(properties.size());
  for (  Map.Entry<String,String> entry : properties.entrySet()) {
    dos.writeUTF(entry.getKey() + "String_Node_Str" + entry.getValue());
  }
}
Program: 48728
Project: 48728
Buggy source:
public void writeResponse(ManagementCenterService mcs,ObjectDataOutput dos) throws Exception {
  IMap map=mcs.getHazelcastInstance().getMap(mapName);
  EntryView entry=null;
  if (type.equals("String_Node_Str")) {
    entry=map.getEntryView(key);
  }
 else   if (type.equals("String_Node_Str")) {
    entry=map.getEntryView(Long.valueOf(key));
  }
 else   if (type.equals("String_Node_Str")) {
    entry=map.getEntryView(Integer.valueOf(key));
  }
  TreeMap result=new TreeMap();
  if (entry == null) {
    result.put("String_Node_Str","String_Node_Str");
  }
 else {
    Object value=entry.getValue();
    result.put("String_Node_Str",value != null ? value.toString() : "String_Node_Str");
    result.put("String_Node_Str",value != null ? value.getClass().getName() : "String_Node_Str");
    result.put("String_Node_Str",Long.toString(entry.getCost()));
    result.put("String_Node_Str",Long.toString(entry.getCreationTime()));
    result.put("String_Node_Str",Long.toString(entry.getExpirationTime()));
    result.put("String_Node_Str",Long.toString(entry.getHits()));
    result.put("String_Node_Str",Long.toString(entry.getLastAccessTime()));
    result.put("String_Node_Str",Long.toString(entry.getLastUpdateTime()));
    result.put("String_Node_Str",Long.toString(entry.getVersion()));
  }
  dos.writeInt(result.size());
  for (  Object property : result.keySet()) {
    dos.writeUTF(property + "String_Node_Str" + result.get(property));
  }
}

Fixed version (ground truth):
public void writeResponse(ManagementCenterService mcs,ObjectDataOutput dos) throws Exception {
  IMap map=mcs.getHazelcastInstance().getMap(mapName);
  EntryView entry=null;
  if (type.equals("String_Node_Str")) {
    entry=map.getEntryView(key);
  }
 else   if (type.equals("String_Node_Str")) {
    entry=map.getEntryView(Long.valueOf(key));
  }
 else   if (type.equals("String_Node_Str")) {
    entry=map.getEntryView(Integer.valueOf(key));
  }
  TreeMap<String,String> result=new TreeMap<String,String>();
  if (entry == null) {
    result.put("String_Node_Str","String_Node_Str");
  }
 else {
    Object value=entry.getValue();
    result.put("String_Node_Str",value != null ? value.toString() : "String_Node_Str");
    result.put("String_Node_Str",value != null ? value.getClass().getName() : "String_Node_Str");
    result.put("String_Node_Str",Long.toString(entry.getCost()));
    result.put("String_Node_Str",Long.toString(entry.getCreationTime()));
    result.put("String_Node_Str",Long.toString(entry.getExpirationTime()));
    result.put("String_Node_Str",Long.toString(entry.getHits()));
    result.put("String_Node_Str",Long.toString(entry.getLastAccessTime()));
    result.put("String_Node_Str",Long.toString(entry.getLastUpdateTime()));
    result.put("String_Node_Str",Long.toString(entry.getVersion()));
  }
  dos.writeInt(result.size());
  for (  Map.Entry<String,String> propertyEntry : result.entrySet()) {
    dos.writeUTF(propertyEntry.getKey() + "String_Node_Str" + propertyEntry.getValue());
  }
}
Program: 48729
Project: 48729
Buggy source:
public void writeResponse(ManagementCenterService mcs,ObjectDataOutput dos) throws Exception {
  Properties properties=System.getProperties();
  dos.writeInt(properties.size());
  for (  Object property : properties.keySet()) {
    dos.writeUTF((String)property + "String_Node_Str" + (String)properties.get(property));
  }
}

Fixed version (ground truth):
public void writeResponse(ManagementCenterService mcs,ObjectDataOutput dos) throws Exception {
  Properties properties=System.getProperties();
  dos.writeInt(properties.size());
  for (  Map.Entry entry : properties.entrySet()) {
    dos.writeUTF(entry.getKey() + "String_Node_Str" + entry.getValue());
  }
}
Program: 48730
Project: 48730
Buggy source:
private void testBackupMigrationAndRecovery(int nodeCount,int backupCount,int mapSize) throws Exception {
  TestHazelcastInstanceFactory nodeFactory=createHazelcastInstanceFactory(nodeCount);
  final String name=MAP_NAME;
  final Config config=new Config();
  config.setProperty(GroupProperties.PROP_PARTITION_COUNT,"String_Node_Str");
  config.getMapConfig(name).setBackupCount(backupCount).setStatisticsEnabled(true);
  final HazelcastInstance[] instances=new HazelcastInstance[nodeCount];
  HazelcastInstance hz=nodeFactory.newHazelcastInstance(config);
  instances[0]=hz;
  IMap map1=hz.getMap(name);
  for (int i=0; i < mapSize; i++) {
    map1.put(i,"String_Node_Str" + i);
  }
  checkMapSizes(mapSize,backupCount,instances);
  for (int i=1; i < nodeCount; i++) {
    instances[i]=nodeFactory.newHazelcastInstance(config);
    checkMapSizes(mapSize,backupCount,instances);
  }
  final Random rand=new Random();
  for (int i=1; i < nodeCount; i++) {
    int ix;
    do {
      ix=rand.nextInt(nodeCount);
    }
 while (instances[ix] == null);
    TestUtil.terminateInstance(instances[ix]);
    instances[ix]=null;
    checkMapSizes(mapSize,backupCount,instances);
  }
}

Fixed version (ground truth):
private void testBackupMigrationAndRecovery(int nodeCount,int backupCount,int mapSize) throws Exception {
  TestHazelcastInstanceFactory nodeFactory=createHazelcastInstanceFactory(nodeCount);
  final String name=MAP_NAME;
  final Config config=new Config();
  config.setProperty(GroupProperties.PROP_PARTITION_COUNT,"String_Node_Str");
  config.getMapConfig(name).setBackupCount(backupCount).setStatisticsEnabled(true);
  final HazelcastInstance[] instances=new HazelcastInstance[nodeCount];
  HazelcastInstance hz=nodeFactory.newHazelcastInstance(config);
  instances[0]=hz;
  IMap map1=hz.getMap(name);
  for (int i=0; i < mapSize; i++) {
    map1.put(i,"String_Node_Str" + i);
  }
  checkMapSizes(mapSize,backupCount,instances);
  for (int i=1; i < nodeCount; i++) {
    instances[i]=nodeFactory.newHazelcastInstance(config);
    checkMapSizes(mapSize,backupCount,instances);
  }
  final Random rand=new Random();
  for (int i=1; i < nodeCount; i++) {
    int ix;
    do {
      ix=rand.nextInt(nodeCount);
    }
 while (instances[ix] == null);
    final CountDownLatch latch=new CountDownLatch(1);
    instances[ix].getLifecycleService().addLifecycleListener(new LifecycleListener(){
      @Override public void stateChanged(      LifecycleEvent event){
        if (event.getState().equals(LifecycleEvent.LifecycleState.SHUTDOWN)) {
          latch.countDown();
        }
      }
    }
);
    instances[ix].getLifecycleService().shutdown();
    instances[ix]=null;
    Thread.sleep(3000);
    checkMapSizes(mapSize,backupCount,instances);
  }
}