nus-yam/ex-repair huggingface dataset:
Program: 48485
Project: 48485
Buggy source:
private EventHandler<PortableEntryEvent> createHandler(final EntryListener<K,V> listener,final boolean includeValue){
  return new EventHandler<PortableEntryEvent>(){
    public void handle(    PortableEntryEvent event){
      V value=null;
      V oldValue=null;
      if (includeValue) {
        value=(V)toObject(event.getValue());
        oldValue=(V)toObject(event.getOldValue());
      }
      K key=(K)toObject(event.getKey());
      Member member=getContext().getClusterService().getMember(event.getUuid());
      EntryEvent<K,V> entryEvent=new EntryEvent<K,V>(name,member,event.getEventType().getType(),key,oldValue,value);
switch (event.getEventType()) {
case ADDED:
        listener.entryAdded(entryEvent);
      break;
case REMOVED:
    listener.entryRemoved(entryEvent);
  break;
case UPDATED:
listener.entryUpdated(entryEvent);
break;
case EVICTED:
listener.entryEvicted(entryEvent);
break;
}
}
}
;
}

Fixed version (ground truth):
private EventHandler<PortableEntryEvent> createHandler(final EntryListener<K,V> listener,final boolean includeValue){
  return new EventHandler<PortableEntryEvent>(){
    public void handle(    PortableEntryEvent event){
      V value=null;
      V oldValue=null;
      if (includeValue) {
        value=(V)toObject(event.getValue());
        oldValue=(V)toObject(event.getOldValue());
      }
      K key=(K)toObject(event.getKey());
      Member member=getContext().getClusterService().getMember(event.getUuid());
      EntryEvent<K,V> entryEvent=new EntryEvent<K,V>(name,member,event.getEventType().getType(),key,oldValue,value);
switch (event.getEventType()) {
case ADDED:
        listener.entryAdded(entryEvent);
      break;
case REMOVED:
    listener.entryRemoved(entryEvent);
  break;
case UPDATED:
listener.entryUpdated(entryEvent);
break;
case EVICTED:
listener.entryEvicted(entryEvent);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + event.getEventType());
}
}
}
;
}
Program: 48486
Project: 48486
Buggy source:
public void handle(PortableEntryEvent event){
  V value=null;
  V oldValue=null;
  if (includeValue) {
    value=(V)toObject(event.getValue());
    oldValue=(V)toObject(event.getOldValue());
  }
  K key=(K)toObject(event.getKey());
  Member member=getContext().getClusterService().getMember(event.getUuid());
  EntryEvent<K,V> entryEvent=new EntryEvent<K,V>(name,member,event.getEventType().getType(),key,oldValue,value);
switch (event.getEventType()) {
case ADDED:
    listener.entryAdded(entryEvent);
  break;
case REMOVED:
listener.entryRemoved(entryEvent);
break;
case UPDATED:
listener.entryUpdated(entryEvent);
break;
case EVICTED:
listener.entryEvicted(entryEvent);
break;
}
}

Fixed version (ground truth):
public void handle(PortableEntryEvent event){
  V value=null;
  V oldValue=null;
  if (includeValue) {
    value=(V)toObject(event.getValue());
    oldValue=(V)toObject(event.getOldValue());
  }
  K key=(K)toObject(event.getKey());
  Member member=getContext().getClusterService().getMember(event.getUuid());
  EntryEvent<K,V> entryEvent=new EntryEvent<K,V>(name,member,event.getEventType().getType(),key,oldValue,value);
switch (event.getEventType()) {
case ADDED:
    listener.entryAdded(entryEvent);
  break;
case REMOVED:
listener.entryRemoved(entryEvent);
break;
case UPDATED:
listener.entryUpdated(entryEvent);
break;
case EVICTED:
listener.entryEvicted(entryEvent);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + event.getEventType());
}
}
Program: 48487
Project: 48487
Buggy source:
public void handle(ReplicatedMapPortableEntryEvent event){
  V value=(V)event.getValue();
  V oldValue=(V)event.getOldValue();
  K key=(K)event.getKey();
  Member member=getContext().getClusterService().getMember(event.getUuid());
  EntryEvent<K,V> entryEvent=new EntryEvent<K,V>(getName(),member,event.getEventType().getType(),key,oldValue,value);
switch (event.getEventType()) {
case ADDED:
    listener.entryAdded(entryEvent);
  break;
case REMOVED:
listener.entryRemoved(entryEvent);
break;
case UPDATED:
listener.entryUpdated(entryEvent);
break;
case EVICTED:
listener.entryEvicted(entryEvent);
break;
}
}

Fixed version (ground truth):
public void handle(ReplicatedMapPortableEntryEvent event){
  V value=(V)event.getValue();
  V oldValue=(V)event.getOldValue();
  K key=(K)event.getKey();
  Member member=getContext().getClusterService().getMember(event.getUuid());
  EntryEvent<K,V> entryEvent=new EntryEvent<K,V>(getName(),member,event.getEventType().getType(),key,oldValue,value);
switch (event.getEventType()) {
case ADDED:
    listener.entryAdded(entryEvent);
  break;
case REMOVED:
listener.entryRemoved(entryEvent);
break;
case UPDATED:
listener.entryUpdated(entryEvent);
break;
case EVICTED:
listener.entryEvicted(entryEvent);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + event.getEventType());
}
}
Program: 48488
Project: 48488
Buggy source:
private EventHandler<ReplicatedMapPortableEntryEvent> createHandler(final EntryListener<K,V> listener){
  return new EventHandler<ReplicatedMapPortableEntryEvent>(){
    public void handle(    ReplicatedMapPortableEntryEvent event){
      V value=(V)event.getValue();
      V oldValue=(V)event.getOldValue();
      K key=(K)event.getKey();
      Member member=getContext().getClusterService().getMember(event.getUuid());
      EntryEvent<K,V> entryEvent=new EntryEvent<K,V>(getName(),member,event.getEventType().getType(),key,oldValue,value);
switch (event.getEventType()) {
case ADDED:
        listener.entryAdded(entryEvent);
      break;
case REMOVED:
    listener.entryRemoved(entryEvent);
  break;
case UPDATED:
listener.entryUpdated(entryEvent);
break;
case EVICTED:
listener.entryEvicted(entryEvent);
break;
}
}
}
;
}

Fixed version (ground truth):
private EventHandler<ReplicatedMapPortableEntryEvent> createHandler(final EntryListener<K,V> listener){
  return new EventHandler<ReplicatedMapPortableEntryEvent>(){
    public void handle(    ReplicatedMapPortableEntryEvent event){
      V value=(V)event.getValue();
      V oldValue=(V)event.getOldValue();
      K key=(K)event.getKey();
      Member member=getContext().getClusterService().getMember(event.getUuid());
      EntryEvent<K,V> entryEvent=new EntryEvent<K,V>(getName(),member,event.getEventType().getType(),key,oldValue,value);
switch (event.getEventType()) {
case ADDED:
        listener.entryAdded(entryEvent);
      break;
case REMOVED:
    listener.entryRemoved(entryEvent);
  break;
case UPDATED:
listener.entryUpdated(entryEvent);
break;
case EVICTED:
listener.entryEvicted(entryEvent);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + event.getEventType());
}
}
}
;
}
Program: 48489
Project: 48489
Buggy source:
private boolean resend(){
  reSendCount++;
  if (reSendCount > MAX_RESEND_COUNT) {
    return false;
  }
  executionService.execute(new ReSendTask());
  return true;
}

Fixed version (ground truth):
private boolean resend(){
  if (reSendCount.incrementAndGet() > MAX_RESEND_COUNT) {
    return false;
  }
  executionService.execute(new ReSendTask());
  return true;
}
Program: 48491
Project: 48491
Buggy source:
public boolean merge(Data dataKey,EntryView mergingEntry,MapMergePolicy mergePolicy){
  checkIfLoaded();
  Record record=records.get(dataKey);
  Object newValue=null;
  if (record == null) {
    newValue=mergingEntry.getValue();
    record=mapService.createRecord(name,dataKey,newValue,-1);
    mapStoreWrite(record,dataKey,newValue);
    records.put(dataKey,record);
    updateSizeEstimator(calculateRecordSize(record));
  }
 else {
    Object oldValue=record.getValue();
    EntryView existingEntry=new SimpleEntryView(mapService.toObject(record.getKey()),mapService.toObject(record.getValue()),record.getStatistics(),record.getVersion());
    newValue=mergePolicy.merge(name,mergingEntry,existingEntry);
    if (newValue == null) {
      deleteRecord(dataKey);
      removeIndex(dataKey);
      mapStoreDelete(record,dataKey);
      updateSizeEstimator(-calculateRecordSize(record));
      return true;
    }
    if (mapService.compare(name,newValue,oldValue)) {
      return true;
    }
    mapStoreWrite(record,dataKey,newValue);
    updateSizeEstimator(-calculateRecordSize(record));
    recordFactory.setValue(record,newValue);
    updateSizeEstimator(calculateRecordSize(record));
  }
  saveIndex(record);
  return newValue != null;
}

Fixed version (ground truth):
public boolean merge(Data dataKey,EntryView mergingEntry,MapMergePolicy mergePolicy){
  checkIfLoaded();
  Record record=records.get(dataKey);
  Object newValue=null;
  if (record == null) {
    newValue=mergingEntry.getValue();
    record=mapService.createRecord(name,dataKey,newValue,-1);
    mapStoreWrite(record,dataKey,newValue);
    records.put(dataKey,record);
    updateSizeEstimator(calculateRecordSize(record));
  }
 else {
    Object oldValue=record.getValue();
    EntryView existingEntry=new SimpleEntryView(mapService.toObject(record.getKey()),mapService.toObject(record.getValue()),record.getStatistics(),record.getCost(),record.getVersion());
    newValue=mergePolicy.merge(name,mergingEntry,existingEntry);
    if (newValue == null) {
      deleteRecord(dataKey);
      removeIndex(dataKey);
      mapStoreDelete(record,dataKey);
      updateSizeEstimator(-calculateRecordSize(record));
      return true;
    }
    if (mapService.compare(name,newValue,oldValue)) {
      return true;
    }
    mapStoreWrite(record,dataKey,newValue);
    updateSizeEstimator(-calculateRecordSize(record));
    recordFactory.setValue(record,newValue);
    updateSizeEstimator(calculateRecordSize(record));
  }
  saveIndex(record);
  return newValue != null;
}
Program: 48492
Project: 48492
Buggy source:
@SuppressWarnings("String_Node_Str") public void dispatchEvent(EventData eventData,EntryListener listener){
  Member member=nodeEngine.getClusterService().getMember(eventData.getCaller());
  EntryEvent event=new DataAwareEntryEvent(member,eventData.getEventType(),eventData.getMapName(),eventData.getDataKey(),eventData.getDataNewValue(),eventData.getDataOldValue(),getSerializationService());
switch (event.getEventType()) {
case ADDED:
    listener.entryAdded(event);
  break;
case EVICTED:
listener.entryEvicted(event);
break;
case UPDATED:
listener.entryUpdated(event);
break;
case REMOVED:
listener.entryRemoved(event);
break;
}
MapContainer mapContainer=getMapContainer(eventData.getMapName());
if (mapContainer.getMapConfig().isStatisticsEnabled()) {
getLocalMapStatsImpl(eventData.getMapName()).incrementReceivedEvents();
}
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void dispatchEvent(EventData eventData,EntryListener listener){
  Member member=nodeEngine.getClusterService().getMember(eventData.getCaller());
  EntryEvent event=new DataAwareEntryEvent(member,eventData.getEventType(),eventData.getMapName(),eventData.getDataKey(),eventData.getDataNewValue(),eventData.getDataOldValue(),getSerializationService());
switch (event.getEventType()) {
case ADDED:
    listener.entryAdded(event);
  break;
case EVICTED:
listener.entryEvicted(event);
break;
case UPDATED:
listener.entryUpdated(event);
break;
case REMOVED:
listener.entryRemoved(event);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + event.getEventType());
}
MapContainer mapContainer=getMapContainer(eventData.getMapName());
if (mapContainer.getMapConfig().isStatisticsEnabled()) {
getLocalMapStatsImpl(eventData.getMapName()).incrementReceivedEvents();
}
}
Program: 48493
Project: 48493
Buggy source:
public Permission getRequiredPermission(){
  String action=ActionConstants.ACTION_READ;
switch (requestType) {
case PUT:
case PUT_IF_ABSENT:
case REPLACE:
case REPLACE_IF_SAME:
case SET:
    action=ActionConstants.ACTION_PUT;
  break;
case REMOVE:
case DELETE:
case REMOVE_IF_SAME:
action=ActionConstants.ACTION_REMOVE;
break;
}
return new MapPermission(name,action);
}

Fixed version (ground truth):
public Permission getRequiredPermission(){
  String action=ActionConstants.ACTION_READ;
switch (requestType) {
case PUT:
case PUT_IF_ABSENT:
case REPLACE:
case REPLACE_IF_SAME:
case SET:
    action=ActionConstants.ACTION_PUT;
  break;
case REMOVE:
case DELETE:
case REMOVE_IF_SAME:
action=ActionConstants.ACTION_REMOVE;
break;
default :
throw new IllegalArgumentException("String_Node_Str" + requestType);
}
return new MapPermission(name,action);
}
Program: 48494
Project: 48494
Buggy source:
public void afterRun(){
  mapService.interceptAfterPut(name,dataValue);
  if (eventType == null)   eventType=dataOldValue == null ? EntryEventType.ADDED : EntryEventType.UPDATED;
  mapService.publishEvent(getCallerAddress(),name,eventType,dataKey,dataOldValue,dataValue);
  invalidateNearCaches();
  if (mapContainer.getWanReplicationPublisher() != null && mapContainer.getWanMergePolicy() != null) {
    Record record=recordStore.getRecord(dataKey);
    SimpleEntryView entryView=new SimpleEntryView(dataKey,mapService.toData(dataValue),record.getStatistics(),record.getVersion());
    mapService.publishWanReplicationUpdate(name,entryView);
  }
}

Fixed version (ground truth):
public void afterRun(){
  mapService.interceptAfterPut(name,dataValue);
  if (eventType == null)   eventType=dataOldValue == null ? EntryEventType.ADDED : EntryEventType.UPDATED;
  mapService.publishEvent(getCallerAddress(),name,eventType,dataKey,dataOldValue,dataValue);
  invalidateNearCaches();
  if (mapContainer.getWanReplicationPublisher() != null && mapContainer.getWanMergePolicy() != null) {
    Record record=recordStore.getRecord(dataKey);
    SimpleEntryView entryView=new SimpleEntryView(dataKey,mapService.toData(dataValue),record.getStatistics(),record.getCost(),record.getVersion());
    mapService.publishWanReplicationUpdate(name,entryView);
  }
}
Program: 48495
Project: 48495
Buggy source:
public void afterRun() throws Exception {
  super.afterRun();
  if (eventType == __NO_NEED_TO_FIRE_EVENT) {
    return;
  }
  mapService.publishEvent(getCallerAddress(),name,eventType,dataKey,mapService.toData(oldValue),dataValue);
  invalidateNearCaches();
  if (mapContainer.getWanReplicationPublisher() != null && mapContainer.getWanMergePolicy() != null) {
    if (EntryEventType.REMOVED.equals(eventType)) {
      mapService.publishWanReplicationRemove(name,dataKey,Clock.currentTimeMillis());
    }
 else {
      Record record=recordStore.getRecord(dataKey);
      SimpleEntryView entryView=new SimpleEntryView(dataKey,mapService.toData(dataValue),record.getStatistics(),record.getVersion());
      mapService.publishWanReplicationUpdate(name,entryView);
    }
  }
}

Fixed version (ground truth):
public void afterRun() throws Exception {
  super.afterRun();
  if (eventType == __NO_NEED_TO_FIRE_EVENT) {
    return;
  }
  mapService.publishEvent(getCallerAddress(),name,eventType,dataKey,mapService.toData(oldValue),dataValue);
  invalidateNearCaches();
  if (mapContainer.getWanReplicationPublisher() != null && mapContainer.getWanMergePolicy() != null) {
    if (EntryEventType.REMOVED.equals(eventType)) {
      mapService.publishWanReplicationRemove(name,dataKey,Clock.currentTimeMillis());
    }
 else {
      Record record=recordStore.getRecord(dataKey);
      SimpleEntryView entryView=new SimpleEntryView(dataKey,mapService.toData(dataValue),record.getStatistics(),record.getCost(),record.getVersion());
      mapService.publishWanReplicationUpdate(name,entryView);
    }
  }
}
Program: 48496
Project: 48496
Buggy source:
public void run(){
  MapService mapService=(MapService)getService();
  RecordStore recordStore=mapService.getRecordStore(getPartitionId(),name);
  Record record=recordStore.getRecord(dataKey);
  if (record != null) {
    result=new SimpleEntryView(record.getKey(),mapService.toData(record.getValue()),record.getStatistics(),record.getVersion());
  }
}

Fixed version (ground truth):
public void run(){
  MapService mapService=(MapService)getService();
  RecordStore recordStore=mapService.getRecordStore(getPartitionId(),name);
  Record record=recordStore.getRecord(dataKey);
  if (record != null) {
    result=new SimpleEntryView(record.getKey(),mapService.toData(record.getValue()),record.getStatistics(),record.getCost(),record.getVersion());
  }
}
Program: 48498
Project: 48498
Buggy source:
public void run(){
  backupEntrySet=new MapEntrySet();
  int partitionId=getPartitionId();
  RecordStore recordStore=mapService.getRecordStore(partitionId,name);
  Set<Map.Entry<Data,Data>> entries=entrySet.getEntrySet();
  PartitionService partitionService=getNodeEngine().getPartitionService();
  for (  Map.Entry<Data,Data> entry : entries) {
    Data dataKey=entry.getKey();
    Data dataValue=entry.getValue();
    if (partitionId == partitionService.getPartitionId(dataKey)) {
      Data dataOldValue=null;
      if (initialLoad) {
        recordStore.putFromLoad(dataKey,dataValue,-1);
      }
 else {
        dataOldValue=mapService.toData(recordStore.put(dataKey,dataValue,-1));
      }
      mapService.interceptAfterPut(name,dataValue);
      EntryEventType eventType=dataOldValue == null ? EntryEventType.ADDED : EntryEventType.UPDATED;
      mapService.publishEvent(getCallerAddress(),name,eventType,dataKey,dataOldValue,dataValue);
      invalidateNearCaches(dataKey);
      if (mapContainer.getWanReplicationPublisher() != null && mapContainer.getWanMergePolicy() != null) {
        Record record=recordStore.getRecord(dataKey);
        SimpleEntryView entryView=new SimpleEntryView(dataKey,mapService.toData(dataValue),record.getStatistics(),record.getVersion());
        mapService.publishWanReplicationUpdate(name,entryView);
      }
      backupEntrySet.add(entry);
    }
  }
}

Fixed version (ground truth):
public void run(){
  backupEntrySet=new MapEntrySet();
  int partitionId=getPartitionId();
  RecordStore recordStore=mapService.getRecordStore(partitionId,name);
  Set<Map.Entry<Data,Data>> entries=entrySet.getEntrySet();
  PartitionService partitionService=getNodeEngine().getPartitionService();
  for (  Map.Entry<Data,Data> entry : entries) {
    Data dataKey=entry.getKey();
    Data dataValue=entry.getValue();
    if (partitionId == partitionService.getPartitionId(dataKey)) {
      Data dataOldValue=null;
      if (initialLoad) {
        recordStore.putFromLoad(dataKey,dataValue,-1);
      }
 else {
        dataOldValue=mapService.toData(recordStore.put(dataKey,dataValue,-1));
      }
      mapService.interceptAfterPut(name,dataValue);
      EntryEventType eventType=dataOldValue == null ? EntryEventType.ADDED : EntryEventType.UPDATED;
      mapService.publishEvent(getCallerAddress(),name,eventType,dataKey,dataOldValue,dataValue);
      invalidateNearCaches(dataKey);
      if (mapContainer.getWanReplicationPublisher() != null && mapContainer.getWanMergePolicy() != null) {
        Record record=recordStore.getRecord(dataKey);
        SimpleEntryView entryView=new SimpleEntryView(dataKey,mapService.toData(dataValue),record.getStatistics(),record.getCost(),record.getVersion());
        mapService.publishWanReplicationUpdate(name,entryView);
      }
      backupEntrySet.add(entry);
    }
  }
}
Program: 48499
Project: 48499
Buggy source:
public void readData(ObjectDataInput in) throws IOException {
  hits=in.readInt();
  lastStoredTime=in.readLong();
  lastUpdateTime=in.readLong();
  lastAccessTime=in.readLong();
  cost=in.readLong();
}

Fixed version (ground truth):
public void readData(ObjectDataInput in) throws IOException {
  hits=in.readInt();
  lastStoredTime=in.readLong();
  lastUpdateTime=in.readLong();
  lastAccessTime=in.readLong();
  in.readLong();
}
Program: 48500
Project: 48500
Buggy source:
public void writeData(ObjectDataOutput out) throws IOException {
  out.writeInt(hits);
  out.writeLong(lastStoredTime);
  out.writeLong(lastUpdateTime);
  out.writeLong(lastAccessTime);
  out.writeLong(cost);
}

Fixed version (ground truth):
public void writeData(ObjectDataOutput out) throws IOException {
  out.writeInt(hits);
  out.writeLong(lastStoredTime);
  out.writeLong(lastUpdateTime);
  out.writeLong(lastAccessTime);
  out.writeLong(0l);
}
Program: 48501
Project: 48501
Buggy source:
public long size(){
  return 6 * (Long.SIZE / Byte.SIZE) + (Integer.SIZE / Byte.SIZE);
}

Fixed version (ground truth):
public long size(){
  return 5 * (Long.SIZE / Byte.SIZE) + (Integer.SIZE / Byte.SIZE);
}
Program: 48502
Project: 48502
Buggy source:
@Test public void testPuts() throws InterruptedException {
  final String MAP_NAME="String_Node_Str";
  Config config=new Config();
  final TestHazelcastInstanceFactory factory=createHazelcastInstanceFactory(1);
  final HazelcastInstance h=factory.newHazelcastInstance(config);
  final IMap<Integer,Long> map=h.getMap(MAP_NAME);
  map.put(0,10L);
  Assert.assertEquals(156,map.getLocalMapStats().getHeapCost());
}

Fixed version (ground truth):
@Test public void testPuts() throws InterruptedException {
  final String MAP_NAME="String_Node_Str";
  Config config=new Config();
  final TestHazelcastInstanceFactory factory=createHazelcastInstanceFactory(1);
  final HazelcastInstance h=factory.newHazelcastInstance(config);
  final IMap<Integer,Long> map=h.getMap(MAP_NAME);
  map.put(0,10L);
  Assert.assertEquals(148,map.getLocalMapStats().getHeapCost());
}
Program: 48503
Project: 48503
Buggy source:
@Override public void readData(ObjectDataInput in) throws IOException {
  key=in.readUTF();
  member=new MemberImpl();
  member.readData(in);
  int operation=in.readByte();
switch (operation) {
case DELTA_MEMBER_PROPERTIES_OP_PUT:
    operationType=MapOperationType.PUT;
  value=IOUtil.readAttributeValue(in);
break;
case DELTA_MEMBER_PROPERTIES_OP_REMOVE:
operationType=MapOperationType.REMOVE;
break;
}
this.source=member;
}

Fixed version (ground truth):
@Override public void readData(ObjectDataInput in) throws IOException {
  key=in.readUTF();
  member=new MemberImpl();
  member.readData(in);
  int operation=in.readByte();
switch (operation) {
case DELTA_MEMBER_PROPERTIES_OP_PUT:
    operationType=MapOperationType.PUT;
  value=IOUtil.readAttributeValue(in);
break;
case DELTA_MEMBER_PROPERTIES_OP_REMOVE:
operationType=MapOperationType.REMOVE;
break;
default :
throw new IllegalStateException("String_Node_Str" + operationType);
}
this.source=member;
}
Program: 48504
Project: 48504
Buggy source:
@Override public void writeData(ObjectDataOutput out) throws IOException {
  out.writeUTF(key);
  member.writeData(out);
switch (operationType) {
case PUT:
    out.writeByte(DELTA_MEMBER_PROPERTIES_OP_PUT);
  IOUtil.writeAttributeValue(value,out);
break;
case REMOVE:
out.writeByte(DELTA_MEMBER_PROPERTIES_OP_REMOVE);
break;
}
}

Fixed version (ground truth):
@Override public void writeData(ObjectDataOutput out) throws IOException {
  out.writeUTF(key);
  member.writeData(out);
switch (operationType) {
case PUT:
    out.writeByte(DELTA_MEMBER_PROPERTIES_OP_PUT);
  IOUtil.writeAttributeValue(value,out);
break;
case REMOVE:
out.writeByte(DELTA_MEMBER_PROPERTIES_OP_REMOVE);
break;
default :
throw new IllegalStateException("String_Node_Str" + operationType);
}
}
Program: 48505
Project: 48505
Buggy source:
public Collection<V> remove(Object key){
  TxnMultiMapRemoveRequest request=new TxnMultiMapRemoveRequest(getName(),toData(key));
  PortableCollection portableCollection=invoke(request);
  final Collection<Data> collection=portableCollection.getCollection();
  Collection<V> coll;
  if (collection instanceof List) {
    coll=new ArrayList<V>(collection.size());
  }
 else {
    coll=new HashSet<V>(collection.size());
  }
  for (  Data data : collection) {
    coll.add((V)toObject(data));
  }
  return coll;
}

Fixed version (ground truth):
public Collection<V> remove(Object key){
  TxnMultiMapRemoveAllRequest request=new TxnMultiMapRemoveAllRequest(getName(),toData(key));
  PortableCollection portableCollection=invoke(request);
  final Collection<Data> collection=portableCollection.getCollection();
  Collection<V> coll;
  if (collection instanceof List) {
    coll=new ArrayList<V>(collection.size());
  }
 else {
    coll=new HashSet<V>(collection.size());
  }
  for (  Data data : collection) {
    coll.add((V)toObject(data));
  }
  return coll;
}
Program: 48507
Project: 48507
Buggy source:
public Portable createNew(Integer arg){
  return new RemoveEntryListenerRequest();
}

Fixed version (ground truth):
public Portable createNew(Integer arg){
  return new TxnMultiMapRemoveAllRequest();
}
Program: 48508
Project: 48508
Buggy source:
public int getClassId(){
  return MultiMapPortableHook.TXN_MM_GET;
}

Fixed version (ground truth):
public int getClassId(){
  return MultiMapPortableHook.TXN_MM_REMOVE;
}
Program: 48509
Project: 48509
Buggy source:
public Object innerCall() throws Exception {
  final TransactionContext context=getEndpoint().getTransactionContext(txnId);
  final TransactionalMultiMap<Object,Object> multiMap=context.getMultiMap(name);
  if (value == null) {
    final Collection<Object> objects=multiMap.remove(key);
    Collection<Data> coll=createCollection(objects.size());
    for (    Object object : objects) {
      final Data data=toData(object);
      coll.add(data);
    }
    return new PortableCollection(coll);
  }
 else {
    return multiMap.remove(key,value);
  }
}

Fixed version (ground truth):
public Object innerCall() throws Exception {
  final TransactionContext context=getEndpoint().getTransactionContext(txnId);
  final TransactionalMultiMap<Object,Object> multiMap=context.getMultiMap(name);
  return multiMap.remove(key,value);
}
Program: 48510
Project: 48510
Buggy source:
/** 
 * This method is called before accessing the key-value pairs of this KeyValueSource
 * @param nodeEngine nodeEngine of this cluster node
 */
public abstract void open(NodeEngine nodeEngine);

Fixed version (ground truth):
/** 
 * This method is called before accessing the key-value pairs of this KeyValueSource
 * @param nodeEngine nodeEngine of this cluster node
 * @return true if operation succeed otherwise false
 */
public abstract boolean open(NodeEngine nodeEngine);
Program: 48511
Project: 48511
Buggy source:
@Override public void open(NodeEngine nodeEngine){
  NodeEngineImpl nei=(NodeEngineImpl)nodeEngine;
  ss=nei.getSerializationService();
  Address thisAddress=nei.getThisAddress();
  PartitionService ps=nei.getPartitionService();
  Data data=ss.toData(listName,StringAndPartitionAwarePartitioningStrategy.INSTANCE);
  int partitionId=ps.getPartitionId(data);
  if (!thisAddress.equals(ps.getPartitionOwner(partitionId))) {
    return;
  }
  ListService listService=nei.getService(ListService.SERVICE_NAME);
  ListContainer listContainer=listService.getOrCreateContainer(listName,false);
  List<CollectionItem> items=new ArrayList<CollectionItem>(listContainer.getCollection());
  iterator=items.iterator();
}

Fixed version (ground truth):
@Override public boolean open(NodeEngine nodeEngine){
  NodeEngineImpl nei=(NodeEngineImpl)nodeEngine;
  ss=nei.getSerializationService();
  Address thisAddress=nei.getThisAddress();
  PartitionService ps=nei.getPartitionService();
  Data data=ss.toData(listName,StringAndPartitionAwarePartitioningStrategy.INSTANCE);
  int partitionId=ps.getPartitionId(data);
  Address partitionOwner=ps.getPartitionOwner(partitionId);
  if (partitionOwner == null) {
    return false;
  }
  if (thisAddress.equals(partitionOwner)) {
    ListService listService=nei.getService(ListService.SERVICE_NAME);
    ListContainer listContainer=listService.getOrCreateContainer(listName,false);
    List<CollectionItem> items=new ArrayList<CollectionItem>(listContainer.getCollection());
    iterator=items.iterator();
  }
  return true;
}
Program: 48512
Project: 48512
Buggy source:
@Override public void open(NodeEngine nodeEngine){
  NodeEngineImpl nei=(NodeEngineImpl)nodeEngine;
  MapService mapService=nei.getService(MapService.SERVICE_NAME);
  ss=nei.getSerializationService();
  RecordStore recordStore=mapService.getRecordStore(partitionId,mapName);
  iterator=recordStore.entrySetData().iterator();
}

Fixed version (ground truth):
@Override public boolean open(NodeEngine nodeEngine){
  NodeEngineImpl nei=(NodeEngineImpl)nodeEngine;
  MapService mapService=nei.getService(MapService.SERVICE_NAME);
  ss=nei.getSerializationService();
  RecordStore recordStore=mapService.getRecordStore(partitionId,mapName);
  iterator=recordStore.entrySetData().iterator();
  return true;
}
Program: 48514
Project: 48514
Buggy source:
@Override public IdentifiedDataSerializable createNew(Integer arg){
  return new KeysAssignmentOperation();
}

Fixed version (ground truth):
@Override public IdentifiedDataSerializable createNew(Integer arg){
  return new PostPonePartitionProcessing();
}
Program: 48515
Project: 48515
Buggy source:
@Override public void open(NodeEngine nodeEngine){
  NodeEngineImpl nei=(NodeEngineImpl)nodeEngine;
  MultiMapService multiMapService=nei.getService(MultiMapService.SERVICE_NAME);
  ss=nei.getSerializationService();
  multiMapContainer=multiMapService.getOrCreateCollectionContainer(partitionId,multiMapName);
  isBinary=multiMapContainer.getConfig().isBinary();
  keyIterator=multiMapContainer.keySet().iterator();
}

Fixed version (ground truth):
@Override public boolean open(NodeEngine nodeEngine){
  NodeEngineImpl nei=(NodeEngineImpl)nodeEngine;
  MultiMapService multiMapService=nei.getService(MultiMapService.SERVICE_NAME);
  ss=nei.getSerializationService();
  multiMapContainer=multiMapService.getOrCreateCollectionContainer(partitionId,multiMapName);
  isBinary=multiMapContainer.getConfig().isBinary();
  keyIterator=multiMapContainer.keySet().iterator();
  return true;
}
Program: 48516
Project: 48516
Buggy source:
@Override public void open(NodeEngine nodeEngine){
  NodeEngineImpl nei=(NodeEngineImpl)nodeEngine;
  ss=nei.getSerializationService();
  Address thisAddress=nei.getThisAddress();
  PartitionService ps=nei.getPartitionService();
  Data data=ss.toData(setName,StringAndPartitionAwarePartitioningStrategy.INSTANCE);
  int partitionId=ps.getPartitionId(data);
  if (!thisAddress.equals(ps.getPartitionOwner(partitionId))) {
    return;
  }
  SetService setService=nei.getService(SetService.SERVICE_NAME);
  SetContainer setContainer=setService.getOrCreateContainer(setName,false);
  List<CollectionItem> items=new ArrayList<CollectionItem>(setContainer.getCollection());
  iterator=items.iterator();
}

Fixed version (ground truth):
@Override public boolean open(NodeEngine nodeEngine){
  NodeEngineImpl nei=(NodeEngineImpl)nodeEngine;
  ss=nei.getSerializationService();
  Address thisAddress=nei.getThisAddress();
  PartitionService ps=nei.getPartitionService();
  Data data=ss.toData(setName,StringAndPartitionAwarePartitioningStrategy.INSTANCE);
  int partitionId=ps.getPartitionId(data);
  Address partitionOwner=ps.getPartitionOwner(partitionId);
  if (partitionOwner == null) {
    return false;
  }
  if (thisAddress.equals(partitionOwner)) {
    SetService setService=nei.getService(SetService.SERVICE_NAME);
    SetContainer setContainer=setService.getOrCreateContainer(setName,false);
    List<CollectionItem> items=new ArrayList<CollectionItem>(setContainer.getCollection());
    iterator=items.iterator();
  }
  return true;
}
Program: 48517
Project: 48517
Buggy source:
@Override public void open(NodeEngine nodeEngine){
  keyValueSource.open(nodeEngine);
}

Fixed version (ground truth):
@Override public boolean open(NodeEngine nodeEngine){
  return keyValueSource.open(nodeEngine);
}
Program: 48518
Project: 48518
Buggy source:
@Override public void run(){
  try {
    RequestPartitionResult result=mapReduceService.processRequest(supervisor.getJobOwner(),new RequestMemberIdAssignment(name,jobId),name);
    if (result.getResultState() == NO_SUPERVISOR) {
      return;
    }
 else     if (result.getResultState() == NO_MORE_PARTITIONS) {
      return;
    }
    KeyValueSource<KeyIn,ValueIn> delegate=keyValueSource;
    if (supervisor.getConfiguration().isCommunicateStats()) {
      delegate=new KeyValueSourceFacade<KeyIn,ValueIn>(keyValueSource,supervisor);
    }
    delegate.reset();
    delegate.open(nodeEngine);
    DefaultContext<KeyOut,ValueOut> context=supervisor.getOrCreateContext(MapCombineTask.this);
    processMapping(result.getPartitionId(),context,delegate);
    delegate.close();
    finalizeMapping(result.getPartitionId(),context);
  }
 catch (  Throwable t) {
    notifyRemoteException(supervisor,t);
    if (t instanceof Error) {
      ExceptionUtil.sneakyThrow(t);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    RequestPartitionResult result=mapReduceService.processRequest(supervisor.getJobOwner(),new RequestMemberIdAssignment(name,jobId),name);
    if (result.getResultState() == NO_SUPERVISOR) {
      return;
    }
 else     if (result.getResultState() == NO_MORE_PARTITIONS) {
      return;
    }
    int partitionId=result.getPartitionId();
    KeyValueSource<KeyIn,ValueIn> delegate=keyValueSource;
    if (supervisor.getConfiguration().isCommunicateStats()) {
      delegate=new KeyValueSourceFacade<KeyIn,ValueIn>(keyValueSource,supervisor);
    }
    delegate.reset();
    if (delegate.open(nodeEngine)) {
      DefaultContext<KeyOut,ValueOut> context=supervisor.getOrCreateContext(MapCombineTask.this);
      processMapping(partitionId,context,delegate);
      delegate.close();
      finalizeMapping(partitionId,context);
    }
 else {
      postponePartitionProcessing(partitionId);
    }
  }
 catch (  Throwable t) {
    notifyRemoteException(supervisor,t);
    if (t instanceof Error) {
      ExceptionUtil.sneakyThrow(t);
    }
  }
}
Program: 48519
Project: 48519
Buggy source:
@Override public void open(NodeEngine nodeEngine){
  entries=new ArrayList<Map.Entry<String,Integer>>();
  for (int i=0; i < 1000; i++) {
    entries.add(new AbstractMap.SimpleEntry<String,Integer>(String.valueOf(i),i));
  }
  iterator=entries.iterator();
}

Fixed version (ground truth):
@Override public boolean open(NodeEngine nodeEngine){
  entries=new ArrayList<Map.Entry<String,Integer>>();
  for (int i=0; i < 1000; i++) {
    entries.add(new AbstractMap.SimpleEntry<String,Integer>(String.valueOf(i),i));
  }
  iterator=entries.iterator();
  return true;
}
Program: 48520
Project: 48520
Buggy source:
public Collection<V> remove(Object key){
  int threadId=(int)Thread.currentThread().getId();
  TxnMultiMapRemoveRequest request=new TxnMultiMapRemoveRequest(getName(),toData(key),threadId);
  PortableCollection portableCollection=invoke(request);
  final Collection<Data> collection=portableCollection.getCollection();
  Collection<V> coll;
  if (collection instanceof List) {
    coll=new ArrayList<V>(collection.size());
  }
 else {
    coll=new HashSet<V>(collection.size());
  }
  for (  Data data : collection) {
    coll.add((V)toObject(data));
  }
  return coll;
}

Fixed version (ground truth):
public Collection<V> remove(Object key){
  throwExceptionIfNull(key);
  int threadId=(int)Thread.currentThread().getId();
  TxnMultiMapRemoveAllRequest request=new TxnMultiMapRemoveAllRequest(getName(),toData(key),threadId);
  PortableCollection portableCollection=invoke(request);
  final Collection<Data> collection=portableCollection.getCollection();
  Collection<V> coll;
  if (collection instanceof List) {
    coll=new ArrayList<V>(collection.size());
  }
 else {
    coll=new HashSet<V>(collection.size());
  }
  for (  Data data : collection) {
    coll.add((V)toObject(data));
  }
  return coll;
}
Program: 48522
Project: 48522
Buggy source:
public Portable createNew(Integer arg){
  return new TxnMultiMapSizeRequest();
}

Fixed version (ground truth):
public Portable createNew(Integer arg){
  return new TxnMultiMapRemoveAllRequest();
}
Program: 48523
Project: 48523
Buggy source:
public int getClassId(){
  return MultiMapPortableHook.TXN_MM_GET;
}

Fixed version (ground truth):
public int getClassId(){
  return MultiMapPortableHook.TXN_MM_REMOVE;
}
Program: 48524
Project: 48524
Buggy source:
public Object innerCall() throws Exception {
  final TransactionContext context=getEndpoint().getTransactionContext();
  final TransactionalMultiMap<Object,Object> multiMap=context.getMultiMap(name);
  if (value == null) {
    final Collection<Object> objects=multiMap.remove(key);
    Collection<Data> coll=createCollection(objects.size());
    for (    Object object : objects) {
      final Data data=toData(object);
      coll.add(data);
    }
    return new PortableCollection(coll);
  }
 else {
    return multiMap.remove(key,value);
  }
}

Fixed version (ground truth):
public Object innerCall() throws Exception {
  final TransactionContext context=getEndpoint().getTransactionContext();
  final TransactionalMultiMap<Object,Object> multiMap=context.getMultiMap(name);
  return multiMap.remove(key,value);
}
Program: 48525
Project: 48525
Buggy source:
public boolean isIndexed(QueryContext queryContext){
  if (predicate instanceof IndexAwarePredicate) {
    return ((IndexAwarePredicate)predicate).isIndexed(queryContext);
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isIndexed(QueryContext queryContext){
  if (predicate instanceof IndexAwarePredicate) {
    return ((IndexAwarePredicate)predicate).isIndexed(queryContext);
  }
  return false;
}
Program: 48526
Project: 48526
Buggy source:
public void readData(ObjectDataInput in) throws IOException {
  sql=in.readUTF();
  predicate=createPredicate(sql);
}

Fixed version (ground truth):
@Override public void readData(ObjectDataInput in) throws IOException {
  sql=in.readUTF();
  predicate=createPredicate(sql);
}
Program: 48527
Project: 48527
Buggy source:
public boolean apply(Map.Entry mapEntry){
  return predicate.apply(mapEntry);
}

Fixed version (ground truth):
@Override public boolean apply(Map.Entry mapEntry){
  return predicate.apply(mapEntry);
}
Program: 48528
Project: 48528
Buggy source:
public void writeData(ObjectDataOutput out) throws IOException {
  out.writeUTF(sql);
}

Fixed version (ground truth):
@Override public void writeData(ObjectDataOutput out) throws IOException {
  out.writeUTF(sql);
}
Program: 48529
Project: 48529
Buggy source:
public Set<QueryableEntry> filter(QueryContext queryContext){
  return ((IndexAwarePredicate)predicate).filter(queryContext);
}

Fixed version (ground truth):
@Override public Set<QueryableEntry> filter(QueryContext queryContext){
  return ((IndexAwarePredicate)predicate).filter(queryContext);
}
Program: 48531
Project: 48531
Buggy source:
public void init(NodeEngine nodeEngine,CollectionService service){
  this.nodeEngine=nodeEngine;
  this.service=service;
}

Fixed version (ground truth):
public void init(NodeEngine nodeEngine){
  this.nodeEngine=nodeEngine;
}
Program: 48532
Project: 48532
Buggy source:
protected CollectionContainer(String name,NodeEngine nodeEngine,CollectionService service){
  this.name=name;
  this.nodeEngine=nodeEngine;
  this.service=service;
  logger=nodeEngine.getLogger(getClass());
}

Fixed version (ground truth):
protected CollectionContainer(String name,NodeEngine nodeEngine){
  this.name=name;
  this.nodeEngine=nodeEngine;
  this.logger=nodeEngine.getLogger(getClass());
}
Program: 48533
Project: 48533
Buggy source:
@Override public void run() throws Exception {
  CollectionService service=getService();
  for (  Map.Entry<String,CollectionContainer> entry : migrationData.entrySet()) {
    String name=entry.getKey();
    CollectionContainer container=entry.getValue();
    container.init(getNodeEngine(),service);
    service.addContainer(name,container);
  }
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  CollectionService service=getService();
  for (  Map.Entry<String,CollectionContainer> entry : migrationData.entrySet()) {
    String name=entry.getKey();
    CollectionContainer container=entry.getValue();
    container.init(getNodeEngine());
    service.addContainer(name,container);
  }
}
Program: 48534
Project: 48534
Buggy source:
public ListContainer(String name,NodeEngine nodeEngine,CollectionService service){
  super(name,nodeEngine,service);
}

Fixed version (ground truth):
public ListContainer(String name,NodeEngine nodeEngine){
  super(name,nodeEngine);
}
Program: 48535
Project: 48535
Buggy source:
@Override public ListContainer getOrCreateContainer(String name,boolean backup){
  ListContainer container=containerMap.get(name);
  if (container == null) {
    container=new ListContainer(name,nodeEngine,this);
    final ListContainer current=containerMap.putIfAbsent(name,container);
    if (current != null) {
      container=current;
    }
  }
  return container;
}

Fixed version (ground truth):
@Override public ListContainer getOrCreateContainer(String name,boolean backup){
  ListContainer container=containerMap.get(name);
  if (container == null) {
    container=new ListContainer(name,nodeEngine);
    final ListContainer current=containerMap.putIfAbsent(name,container);
    if (current != null) {
      container=current;
    }
  }
  return container;
}
Program: 48536
Project: 48536
Buggy source:
public SetContainer(String name,NodeEngine nodeEngine,CollectionService service){
  super(name,nodeEngine,service);
}

Fixed version (ground truth):
public SetContainer(String name,NodeEngine nodeEngine){
  super(name,nodeEngine);
}
Program: 48537
Project: 48537
Buggy source:
@Override public SetContainer getOrCreateContainer(String name,boolean backup){
  SetContainer container=containerMap.get(name);
  if (container == null) {
    container=new SetContainer(name,nodeEngine,this);
    final SetContainer current=containerMap.putIfAbsent(name,container);
    if (current != null) {
      container=current;
    }
  }
  return container;
}

Fixed version (ground truth):
@Override public SetContainer getOrCreateContainer(String name,boolean backup){
  SetContainer container=containerMap.get(name);
  if (container == null) {
    container=new SetContainer(name,nodeEngine);
    final SetContainer current=containerMap.putIfAbsent(name,container);
    if (current != null) {
      container=current;
    }
  }
  return container;
}
Program: 48538
Project: 48538
Buggy source:
public void run() throws Exception {
  MultiMapWrapper wrapper=getOrCreateContainer().getMultiMapWrapper(dataKey);
  Collection coll=null;
  if (wrapper != null) {
    wrapper.incrementHit();
    coll=wrapper.getCollection();
  }
  begin=Clock.currentTimeMillis();
  response=new MultiMapResponse(coll);
}

Fixed version (ground truth):
public void run() throws Exception {
  MultiMapWrapper wrapper=getOrCreateContainer().getMultiMapWrapper(dataKey);
  Collection coll=null;
  if (wrapper != null) {
    wrapper.incrementHit();
    coll=wrapper.getCollection();
  }
  response=new MultiMapResponse(coll);
}
Program: 48539
Project: 48539
Buggy source:
public void run() throws Exception {
  begin=Clock.currentTimeMillis();
  MultiMapContainer container=getOrCreateContainer();
  recordId=container.nextId();
  MultiMapRecord record=new MultiMapRecord(recordId,isBinary() ? value : toObject(value));
  Collection<MultiMapRecord> coll=container.getOrCreateMultiMapWrapper(dataKey).getCollection();
  if (index == -1) {
    response=coll.add(record);
  }
 else {
    try {
      ((List<MultiMapRecord>)coll).add(index,record);
      response=true;
    }
 catch (    IndexOutOfBoundsException e) {
      response=e;
    }
  }
}

Fixed version (ground truth):
public void run() throws Exception {
  MultiMapContainer container=getOrCreateContainer();
  recordId=container.nextId();
  MultiMapRecord record=new MultiMapRecord(recordId,isBinary() ? value : toObject(value));
  Collection<MultiMapRecord> coll=container.getOrCreateMultiMapWrapper(dataKey).getCollection();
  if (index == -1) {
    response=coll.add(record);
  }
 else {
    try {
      ((List<MultiMapRecord>)coll).add(index,record);
      response=true;
    }
 catch (    IndexOutOfBoundsException e) {
      response=e;
    }
  }
}
Program: 48540
Project: 48540
Buggy source:
public void run() throws Exception {
  begin=Clock.currentTimeMillis();
  coll=remove();
  response=new MultiMapResponse(coll);
}

Fixed version (ground truth):
public void run() throws Exception {
  coll=remove();
  response=new MultiMapResponse(coll);
}
Program: 48541
Project: 48541
Buggy source:
public void run() throws Exception {
  begin=Clock.currentTimeMillis();
  response=false;
  MultiMapWrapper wrapper=getCollectionWrapper();
  if (wrapper == null) {
    return;
  }
  Collection<MultiMapRecord> coll=wrapper.getCollection();
  MultiMapRecord record=new MultiMapRecord(isBinary() ? value : toObject(value));
  Iterator<MultiMapRecord> iter=coll.iterator();
  while (iter.hasNext()) {
    MultiMapRecord r=iter.next();
    if (r.equals(record)) {
      iter.remove();
      recordId=r.getRecordId();
      response=true;
      if (coll.isEmpty()) {
        remove();
      }
      break;
    }
  }
}

Fixed version (ground truth):
public void run() throws Exception {
  response=false;
  MultiMapWrapper wrapper=getCollectionWrapper();
  if (wrapper == null) {
    return;
  }
  Collection<MultiMapRecord> coll=wrapper.getCollection();
  MultiMapRecord record=new MultiMapRecord(isBinary() ? value : toObject(value));
  Iterator<MultiMapRecord> iter=coll.iterator();
  while (iter.hasNext()) {
    MultiMapRecord r=iter.next();
    if (r.equals(record)) {
      iter.remove();
      recordId=r.getRecordId();
      response=true;
      if (coll.isEmpty()) {
        remove();
      }
      break;
    }
  }
}
Program: 48542
Project: 48542
Buggy source:
private static <T>T lookupByPattern(Map<String,T> map,String name){
  T t=map.get(name);
  if (t == null) {
    final Set<String> tNames=map.keySet();
    for (    final String pattern : tNames) {
      if (nameMatches(name,pattern)) {
        return map.get(pattern);
      }
    }
  }
  return t;
}

Fixed version (ground truth):
private static <T>T lookupByPattern(Map<String,T> map,String name){
  T t=map.get(name);
  if (t == null) {
    for (    Map.Entry<String,T> entry : map.entrySet()) {
      String pattern=entry.getKey();
      T value=entry.getValue();
      if (nameMatches(name,pattern)) {
        return value;
      }
    }
  }
  return t;
}
Program: 48543
Project: 48543
Buggy source:
private void handleLoginModules(final Node node,final BeanDefinitionBuilder securityConfigBuilder,boolean member){
  final String name=(member ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str";
  final List lms=new ManagedList();
  for (  org.w3c.dom.Node child : new IterableNodeList(node.getChildNodes())) {
    final String nodeName=cleanNodeName(child.getNodeName());
    if ("String_Node_Str".equals(nodeName)) {
      handleLoginModule(child,lms);
    }
  }
  if (member) {
    securityConfigBuilder.addPropertyValue("String_Node_Str",lms);
  }
 else {
    securityConfigBuilder.addPropertyValue("String_Node_Str",lms);
  }
}

Fixed version (ground truth):
private void handleLoginModules(final Node node,final BeanDefinitionBuilder securityConfigBuilder,boolean member){
  final List lms=new ManagedList();
  for (  org.w3c.dom.Node child : new IterableNodeList(node.getChildNodes())) {
    final String nodeName=cleanNodeName(child.getNodeName());
    if ("String_Node_Str".equals(nodeName)) {
      handleLoginModule(child,lms);
    }
  }
  if (member) {
    securityConfigBuilder.addPropertyValue("String_Node_Str",lms);
  }
 else {
    securityConfigBuilder.addPropertyValue("String_Node_Str",lms);
  }
}
Program: 48544
Project: 48544
Buggy source:
public void storeAll(Map map){
  for (  Object key : map.keySet()) {
    store(key,map.get(key));
  }
}

Fixed version (ground truth):
public void storeAll(Map map){
  for (  Map.Entry entry : (Set<Map.Entry>)map.entrySet()) {
    Object key=entry.getKey();
    Object value=entry.getValue();
    store(key,value);
  }
}