nus-yam/ex-repair huggingface dataset:
Program: 50050
Project: 50050
Buggy source:
protected final void toByte(final FastByteArrayOutputStream bos,final Object object){
  if (object == null) {
    return;
  }
  try {
    TypeSerializer ts=(ds.isSuitable(object)) ? ds : cs;
    bos.writeByte(ts.getTypeId());
    ts.write(bos,object);
    bos.flush();
  }
 catch (  final Throwable e) {
    logger.log(Level.SEVERE,e.getMessage(),e);
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
protected void toByte(final FastByteArrayOutputStream bos,final Object object){
  if (object == null) {
    return;
  }
  try {
    TypeSerializer ts=(ds.isSuitable(object)) ? ds : cs;
    bos.writeByte(ts.getTypeId());
    ts.write(bos,object);
    bos.flush();
  }
 catch (  Throwable e) {
    logger.log(Level.SEVERE,e.getMessage(),e);
    throw new RuntimeException(e);
  }
}
Program: 50051
Project: 50051
Buggy source:
public MulticastService(Node node,MulticastSocket multicastSocket) throws Exception {
  this.node=node;
  Config config=node.getConfig();
  this.multicastSocket=multicastSocket;
  int bufferSize=1024;
  this.datagramPacketReceive=new DatagramPacket(new byte[bufferSize],bufferSize);
  this.datagramPacketSend=new DatagramPacket(new byte[bufferSize],bufferSize,InetAddress.getByName(config.getNetworkConfig().getJoin().getMulticastConfig().getMulticastGroup()),config.getNetworkConfig().getJoin().getMulticastConfig().getMulticastPort());
  running=true;
}

Fixed version (ground truth):
public MulticastService(Node node,MulticastSocket multicastSocket) throws Exception {
  this.node=node;
  Config config=node.getConfig();
  this.multicastSocket=multicastSocket;
  int bufferSize=1024 * 1024;
  this.datagramPacketReceive=new DatagramPacket(new byte[bufferSize],bufferSize);
  this.datagramPacketSend=new DatagramPacket(new byte[bufferSize],bufferSize,InetAddress.getByName(config.getNetworkConfig().getJoin().getMulticastConfig().getMulticastGroup()),config.getNetworkConfig().getJoin().getMulticastConfig().getMulticastPort());
  running=true;
}
Program: 50052
Project: 50052
Buggy source:
public Entries(String name,ClusterOperation operation){
  this.name=name;
  this.operation=operation;
  TransactionImpl txn=ThreadContext.get().getCallContext().getTransaction();
  this.checkValue=(InstanceType.MAP == getInstanceType(name)) && (operation == CONCURRENT_MAP_ITERATE_VALUES || operation == CONCURRENT_MAP_ITERATE_ENTRIES);
  if (txn != null) {
    List<Map.Entry> entriesUnderTxn=txn.newEntries(name);
    if (entriesUnderTxn != null) {
      lsKeyValues.addAll(entriesUnderTxn);
    }
  }
}

Fixed version (ground truth):
public Entries(String name,ClusterOperation operation,Predicate predicate){
  this.name=name;
  this.operation=operation;
  this.predicate=predicate;
  TransactionImpl txn=ThreadContext.get().getCallContext().getTransaction();
  this.checkValue=(InstanceType.MAP == getInstanceType(name)) && (operation == CONCURRENT_MAP_ITERATE_VALUES || operation == CONCURRENT_MAP_ITERATE_ENTRIES);
  if (txn != null) {
    List<Map.Entry> entriesUnderTxn=txn.newEntries(name);
    if (entriesUnderTxn != null) {
      if (predicate != null) {
        for (        Map.Entry entry : entriesUnderTxn) {
          if (predicate.apply((MapEntry)entry)) {
            lsKeyValues.add(entry);
          }
        }
      }
 else {
        lsKeyValues.addAll(entriesUnderTxn);
      }
    }
  }
}
Program: 50053
Project: 50053
Buggy source:
void onCall(){
  entries=new Entries(name,operation);
}

Fixed version (ground truth):
void onCall(){
  entries=new Entries(name,operation,predicate);
}
Program: 50054
Project: 50054
Buggy source:
public Set iterate(){
  Entries entries=new Entries(request.name,request.operation);
  Pairs pairs=(Pairs)getResultAsObject();
  entries.addEntries(pairs);
  return entries;
}

Fixed version (ground truth):
public Set iterate(){
  Entries entries=new Entries(name,CONCURRENT_MAP_ITERATE_KEYS,predicate);
  Pairs pairs=(Pairs)getResultAsObject();
  entries.addEntries(pairs);
  return entries;
}
Program: 50055
Project: 50055
Buggy source:
public void addEntries(Pairs pairs){
  if (pairs == null)   return;
  if (pairs.getKeyValues() == null)   return;
  TransactionImpl txn=ThreadContext.get().getCallContext().getTransaction();
  for (  KeyValue entry : pairs.getKeyValues()) {
    if (txn != null) {
      Object key=entry.getKey();
      if (txn.has(name,key)) {
        Object value=txn.get(name,key);
        if (value != null) {
          lsKeyValues.add(createSimpleEntry(node.factory,name,key,value));
        }
      }
 else {
        entry.setName(node.factory,name);
        lsKeyValues.add(entry);
      }
    }
 else {
      entry.setName(node.factory,name);
      lsKeyValues.add(entry);
    }
  }
}

Fixed version (ground truth):
public void addEntries(Pairs pairs){
  if (pairs == null)   return;
  if (pairs.getKeyValues() == null)   return;
  TransactionImpl txn=ThreadContext.get().getCallContext().getTransaction();
  for (  KeyValue entry : pairs.getKeyValues()) {
    if (txn != null) {
      Object key=entry.getKey();
      if (txn.has(name,key)) {
        Object value=txn.get(name,key);
        if (value != null) {
          lsKeyValues.add(createSimpleMapEntry(node.factory,name,key,value));
        }
      }
 else {
        entry.setName(node.factory,name);
        lsKeyValues.add(entry);
      }
    }
 else {
      entry.setName(node.factory,name);
      lsKeyValues.add(entry);
    }
  }
}
Program: 50056
Project: 50056
Buggy source:
public MIterateLocal(String name,Predicate predicate){
  super(thisAddress,CONCURRENT_MAP_ITERATE_KEYS,name,predicate);
  doOp();
}

Fixed version (ground truth):
public MIterateLocal(String name,Predicate predicate){
  super(thisAddress,CONCURRENT_MAP_ITERATE_KEYS,name,predicate);
  this.name=name;
  this.predicate=predicate;
  doOp();
}
Program: 50057
Project: 50057
Buggy source:
public List<Map.Entry> newEntries(String name){
  List<Map.Entry> lsEntries=null;
  for (  TransactionRecord transactionRecord : transactionRecords) {
    if (transactionRecord.name.equals(name)) {
      if (!transactionRecord.removed) {
        if (transactionRecord.value != null) {
          if (transactionRecord.newRecord) {
            if (lsEntries == null) {
              lsEntries=new ArrayList<Map.Entry>(2);
            }
            lsEntries.add(BaseManager.createSimpleEntry(factory,name,transactionRecord.key,transactionRecord.value));
          }
        }
      }
    }
  }
  return lsEntries;
}

Fixed version (ground truth):
public List<Map.Entry> newEntries(String name){
  List<Map.Entry> lsEntries=null;
  for (  TransactionRecord transactionRecord : transactionRecords) {
    if (transactionRecord.name.equals(name)) {
      if (!transactionRecord.removed) {
        if (transactionRecord.value != null) {
          if (transactionRecord.newRecord) {
            if (lsEntries == null) {
              lsEntries=new ArrayList<Map.Entry>(2);
            }
            lsEntries.add(BaseManager.createSimpleMapEntry(factory,name,transactionRecord.key,transactionRecord.value));
          }
        }
      }
    }
  }
  return lsEntries;
}
Program: 50058
Project: 50058
Buggy source:
public Set<MapEntry> filter(QueryContext queryContext){
  Set<MapEntry> results=null;
  for (  Predicate predicate : predicates) {
    if (predicate instanceof IndexAwarePredicate) {
      IndexAwarePredicate p=(IndexAwarePredicate)predicate;
      final Set<MapEntry> filter=p.filter(queryContext);
      if (and && (filter == null || filter.isEmpty()))       return null;
      if (results == null) {
        results=and ? filter : new HashSet<MapEntry>(filter);
      }
 else {
        if (and) {
          boolean direct=results.size() < filter.size();
          final Set<MapEntry> s1=direct ? results : filter;
          final Set<MapEntry> s2=direct ? filter : results;
          results=new HashSet<MapEntry>();
          for (final Iterator<MapEntry> it=s1.iterator(); it.hasNext(); ) {
            final MapEntry next=it.next();
            if (s2.contains(next)) {
              results.add(next);
            }
          }
          if (results.isEmpty())           return null;
        }
 else {
          results.addAll(filter);
        }
      }
    }
  }
  return results;
}

Fixed version (ground truth):
public Set<MapEntry> filter(QueryContext queryContext){
  Set<MapEntry> results=null;
  for (  Predicate predicate : predicates) {
    if (predicate instanceof IndexAwarePredicate) {
      IndexAwarePredicate p=(IndexAwarePredicate)predicate;
      final Set<MapEntry> filter=p.filter(queryContext);
      if (and && (filter == null || filter.isEmpty()))       return null;
      if (results == null) {
        if (and) {
          results=filter;
        }
 else         if (filter == null) {
          results=new HashSet<MapEntry>();
        }
 else {
          results=new HashSet<MapEntry>(filter);
        }
      }
 else {
        if (and) {
          boolean direct=results.size() < filter.size();
          final Set<MapEntry> s1=direct ? results : filter;
          final Set<MapEntry> s2=direct ? filter : results;
          results=new HashSet<MapEntry>();
          for (          MapEntry next : s1) {
            if (s2.contains(next)) {
              results.add(next);
            }
          }
          if (results.isEmpty())           return null;
        }
 else         if (filter != null) {
          results.addAll(filter);
        }
      }
    }
  }
  return results;
}
Program: 50060
Project: 50060
Buggy source:
public QueueConfig getQueueConfig(final String name){
  QueueConfig config;
  if ((config=lookupByPattern(mapQueueConfigs,name)) != null)   return config;
  config=mapQueueConfigs.get("String_Node_Str");
  if (config == null) {
    config=new QueueConfig();
    config.setName("String_Node_Str");
    mapQueueConfigs.put("String_Node_Str",config);
  }
  return config;
}

Fixed version (ground truth):
public QueueConfig getQueueConfig(final String name){
  QueueConfig config;
  if ((config=lookupByPattern(mapQueueConfigs,name)) != null)   return config;
  QueueConfig defConfig=mapQueueConfigs.get("String_Node_Str");
  if (defConfig == null) {
    defConfig=new QueueConfig();
    defConfig.setName("String_Node_Str");
    addQueueConfig(defConfig);
  }
  config=new QueueConfig(defConfig);
  config.setName(name);
  addQueueConfig(config);
  return config;
}
Program: 50061
Project: 50061
Buggy source:
public MapConfig getMapConfig(final String name){
  MapConfig config;
  if ((config=lookupByPattern(mapConfigs,name)) != null)   return config;
  config=mapConfigs.get("String_Node_Str");
  if (config == null) {
    config=new MapConfig();
    config.setName("String_Node_Str");
    mapConfigs.put("String_Node_Str",config);
  }
  return config;
}

Fixed version (ground truth):
public MapConfig getMapConfig(final String name){
  MapConfig config;
  if ((config=lookupByPattern(mapConfigs,name)) != null)   return config;
  MapConfig defConfig=mapConfigs.get("String_Node_Str");
  if (defConfig == null) {
    defConfig=new MapConfig();
    defConfig.setName("String_Node_Str");
    addMapConfig(defConfig);
  }
  config=new MapConfig(defConfig);
  config.setName(name);
  addMapConfig(config);
  return config;
}
Program: 50062
Project: 50062
Buggy source:
private static <T>T lookupByPattern(Map<String,T> map,String name){
  T t=name.indexOf('*') < 0 ? map.get(name) : null;
  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) {
    final Set<String> tNames=map.keySet();
    for (    final String pattern : tNames) {
      if (nameMatches(name,pattern)) {
        return map.get(pattern);
      }
    }
  }
  return t;
}
Program: 50063
Project: 50063
Buggy source:
private void checkTopicConfigCompatible(final Config config){
  Set<String> topicConfigNames=new HashSet<String>(mapTopicConfigs.keySet());
  topicConfigNames.addAll(config.mapTopicConfigs.keySet());
  for (  final String name : topicConfigNames) {
    final TopicConfig thisTopicConfig=getTopicConfig(name);
    final TopicConfig thatTopicConfig=config.getTopicConfig(name);
    if (!thisTopicConfig.equals(thatTopicConfig)) {
      throw new RuntimeException(format("String_Node_Str",thisTopicConfig,thatTopicConfig));
    }
  }
}

Fixed version (ground truth):
private void checkTopicConfigCompatible(final Config config){
  Set<String> topicConfigNames=new HashSet<String>(mapTopicConfigs.keySet());
  topicConfigNames.addAll(config.mapTopicConfigs.keySet());
  for (  final String name : topicConfigNames) {
    final TopicConfig thisTopicConfig=lookupByPattern(mapTopicConfigs,name);
    final TopicConfig thatTopicConfig=lookupByPattern(config.mapTopicConfigs,name);
    if (thisTopicConfig != null && thatTopicConfig != null && !thisTopicConfig.equals(thatTopicConfig)) {
      throw new RuntimeException(format("String_Node_Str",thisTopicConfig,thatTopicConfig));
    }
  }
}
Program: 50064
Project: 50064
Buggy source:
public TopicConfig getTopicConfig(final String name){
  TopicConfig config;
  if ((config=lookupByPattern(mapTopicConfigs,name)) != null) {
    return config;
  }
  config=mapTopicConfigs.get("String_Node_Str");
  if (config == null) {
    config=new TopicConfig();
    config.setName("String_Node_Str");
    mapTopicConfigs.put("String_Node_Str",config);
  }
  return config;
}

Fixed version (ground truth):
public TopicConfig getTopicConfig(final String name){
  TopicConfig config;
  if ((config=lookupByPattern(mapTopicConfigs,name)) != null) {
    return config;
  }
  TopicConfig defConfig=mapTopicConfigs.get("String_Node_Str");
  if (defConfig == null) {
    defConfig=new TopicConfig();
    defConfig.setName("String_Node_Str");
    addTopicConfig(defConfig);
  }
  config=new TopicConfig(defConfig);
  config.setName(name);
  addTopicConfig(defConfig);
  return config;
}
Program: 50065
Project: 50065
Buggy source:
private void checkQueueConfigCompatible(final Config config){
  Set<String> queueConfigNames=new HashSet<String>(mapQueueConfigs.keySet());
  queueConfigNames.addAll(config.mapQueueConfigs.keySet());
  for (  final String name : queueConfigNames) {
    final QueueConfig thisQueueConfig=getQueueConfig(name);
    final QueueConfig thatQueueConfig=config.getQueueConfig(name);
    if (!thisQueueConfig.isCompatible(thatQueueConfig)) {
      throw new RuntimeException(format("String_Node_Str",thisQueueConfig,thatQueueConfig));
    }
  }
}

Fixed version (ground truth):
private void checkQueueConfigCompatible(final Config config){
  Set<String> queueConfigNames=new HashSet<String>(mapQueueConfigs.keySet());
  queueConfigNames.addAll(config.mapQueueConfigs.keySet());
  for (  final String name : queueConfigNames) {
    final QueueConfig thisQueueConfig=lookupByPattern(mapQueueConfigs,name);
    final QueueConfig thatQueueConfig=lookupByPattern(config.mapQueueConfigs,name);
    if (thisQueueConfig != null && thatQueueConfig != null && !thisQueueConfig.isCompatible(thatQueueConfig)) {
      throw new RuntimeException(format("String_Node_Str",thisQueueConfig,thatQueueConfig));
    }
  }
}
Program: 50066
Project: 50066
Buggy source:
private void checkMapConfigCompatible(final Config config){
  Set<String> mapConfigNames=new HashSet<String>(mapConfigs.keySet());
  mapConfigNames.addAll(config.mapConfigs.keySet());
  for (  final String name : mapConfigNames) {
    final MapConfig thisMapConfig=getMapConfig(name);
    final MapConfig thatMapConfig=config.getMapConfig(name);
    if (!thisMapConfig.isCompatible(thatMapConfig)) {
      throw new RuntimeException(format("String_Node_Str",thisMapConfig,thatMapConfig));
    }
  }
}

Fixed version (ground truth):
private void checkMapConfigCompatible(final Config config){
  Set<String> mapConfigNames=new HashSet<String>(mapConfigs.keySet());
  mapConfigNames.addAll(config.mapConfigs.keySet());
  for (  final String name : mapConfigNames) {
    final MapConfig thisMapConfig=lookupByPattern(mapConfigs,name);
    final MapConfig thatMapConfig=lookupByPattern(config.mapConfigs,name);
    if (thisMapConfig != null && thatMapConfig != null && !thisMapConfig.isCompatible(thatMapConfig)) {
      throw new RuntimeException(format("String_Node_Str",thisMapConfig,thatMapConfig));
    }
  }
}
Program: 50067
Project: 50067
Buggy source:
public MapConfig(){
}

Fixed version (ground truth):
public MapConfig(MapConfig config){
  this.name=config.name;
  this.backupCount=config.backupCount;
  this.evictionPercentage=config.evictionPercentage;
  this.timeToLiveSeconds=config.timeToLiveSeconds;
  this.maxIdleSeconds=config.maxIdleSeconds;
  this.evictionDelaySeconds=config.evictionDelaySeconds;
  this.maxSize=config.maxSize;
  this.evictionPolicy=config.evictionPolicy;
  this.valueIndexed=config.valueIndexed;
  this.mapStoreConfig=config.mapStoreConfig;
  this.nearCacheConfig=config.nearCacheConfig;
  this.readBackupData=config.readBackupData;
  this.cacheValue=config.cacheValue;
  this.mergePolicy=config.mergePolicy;
}
Program: 50071
Project: 50071
Buggy source:
public void checkCompatibility(final Config config){
  if (config == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!this.groupConfig.equals(config.getGroupConfig())) {
    throw new RuntimeException(format("String_Node_Str",this.groupConfig,config.getGroupConfig()));
  }
  checkMapConfigCompatible(config);
  checkQueueConfigCompatible(config);
  checkTopicConfigCompatible(config);
}

Fixed version (ground truth):
public void checkCompatibility(final Config config){
  if (config == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!this.groupConfig.equals(config.getGroupConfig())) {
    throw new RuntimeException(format("String_Node_Str",this.groupConfig,config.getGroupConfig()));
  }
  if (checkCompatibility) {
    checkMapConfigCompatible(config);
    checkQueueConfigCompatible(config);
    checkTopicConfigCompatible(config);
  }
}
Program: 50072
Project: 50072
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + this.groupConfig + "String_Node_Str"+ this.port+ "String_Node_Str"+ this.superClient+ "String_Node_Str"+ this.reuseAddress+ "String_Node_Str"+ this.portAutoIncrement+ "String_Node_Str"+ this.properties+ "String_Node_Str"+ this.networkConfig+ "String_Node_Str"+ this.mapConfigs+ "String_Node_Str"+ this.mapMergePolicyConfigs+ "String_Node_Str"+ this.executorConfig+ "String_Node_Str"+ this.mapExecutors+ "String_Node_Str"+ this.mapTopicConfigs+ "String_Node_Str"+ this.mapQueueConfigs+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + this.groupConfig + "String_Node_Str"+ this.port+ "String_Node_Str"+ this.superClient+ "String_Node_Str"+ this.reuseAddress+ "String_Node_Str"+ this.checkCompatibility+ "String_Node_Str"+ this.portAutoIncrement+ "String_Node_Str"+ this.properties+ "String_Node_Str"+ this.networkConfig+ "String_Node_Str"+ this.mapConfigs+ "String_Node_Str"+ this.mapMergePolicyConfigs+ "String_Node_Str"+ this.executorConfig+ "String_Node_Str"+ this.mapExecutors+ "String_Node_Str"+ this.mapTopicConfigs+ "String_Node_Str"+ this.mapQueueConfigs+ "String_Node_Str";
}
Program: 50073
Project: 50073
Buggy source:
void enqueueEvent(int eventType,String name,Data eventKey,Data eventValue,Address from){
  try {
    Member member=getMember(from);
    if (member == null) {
      member=new MemberImpl(from,thisAddress.equals(from));
    }
    final EventTask eventTask=new EventTask(member,eventType,name,eventKey,eventValue);
    int hash;
    if (eventKey != null) {
      hash=eventKey.hashCode();
    }
 else {
      hash=hashTwo(from.hashCode(),name.hashCode());
    }
    node.executorManager.getEventExecutorService().executeOrderedRunnable(hash,eventTask);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
void enqueueEvent(int eventType,String name,Data key,Data value,Address from){
  try {
    Member member=getMember(from);
    if (member == null) {
      member=new MemberImpl(from,thisAddress.equals(from));
    }
    Data newValue=value;
    Data oldValue=null;
    if (value != null && getInstanceType(name).isMap()) {
      Keys keys=(Keys)toObject(value);
      Collection<Data> values=keys.getKeys();
      if (values != null) {
        Iterator<Data> it=values.iterator();
        if (it.hasNext()) {
          newValue=it.next();
        }
        if (it.hasNext()) {
          oldValue=it.next();
        }
      }
    }
    final DataAwareEntryEvent dataAwareEntryEvent=new DataAwareEntryEvent(member,eventType,name,key,newValue,oldValue);
    int hash;
    if (key != null) {
      hash=key.hashCode();
    }
 else {
      hash=hashTwo(from.hashCode(),name.hashCode());
    }
    node.executorManager.getEventExecutorService().executeOrderedRunnable(hash,new Runnable(){
      public void run(){
        try {
          node.listenerManager.callListeners(dataAwareEntryEvent);
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 50074
Project: 50074
Buggy source:
public void run(){
  try {
    node.listenerManager.callListeners(EventTask.this);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void run(){
  try {
    node.listenerManager.callListeners(dataAwareEntryEvent);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 50075
Project: 50075
Buggy source:
void fireMapEvent(final Map<Address,Boolean> mapListeners,final String name,final int eventType,final Data key,final Data oldValue,final Data value,Map<Address,Boolean> keyListeners,Address callerAddress){
  if (keyListeners == null && (mapListeners == null || mapListeners.size() == 0)) {
    return;
  }
  try {
    Map<Address,Boolean> mapTargetListeners=null;
    if (keyListeners != null) {
      mapTargetListeners=new HashMap<Address,Boolean>(keyListeners);
    }
    if (mapListeners != null && mapListeners.size() > 0) {
      if (mapTargetListeners == null) {
        mapTargetListeners=new HashMap<Address,Boolean>(mapListeners);
      }
 else {
        final Set<Map.Entry<Address,Boolean>> entries=mapListeners.entrySet();
        for (        final Map.Entry<Address,Boolean> entry : entries) {
          if (mapTargetListeners.containsKey(entry.getKey())) {
            if (entry.getValue()) {
              mapTargetListeners.put(entry.getKey(),entry.getValue());
            }
          }
 else           mapTargetListeners.put(entry.getKey(),entry.getValue());
        }
      }
    }
    if (mapTargetListeners == null || mapTargetListeners.size() == 0) {
      return;
    }
    Data packetValue=oldValue != null ? toData(new Keys(Arrays.asList(value,oldValue))) : value;
    sendEvents(eventType,name,key,packetValue,mapTargetListeners,callerAddress);
  }
 catch (  final Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
void fireMapEvent(final Map<Address,Boolean> mapListeners,final String name,final int eventType,final Data key,final Data oldValue,final Data value,Map<Address,Boolean> keyListeners,Address callerAddress){
  if (keyListeners == null && (mapListeners == null || mapListeners.size() == 0)) {
    return;
  }
  try {
    Map<Address,Boolean> mapTargetListeners=null;
    if (keyListeners != null) {
      mapTargetListeners=new HashMap<Address,Boolean>(keyListeners);
    }
    if (mapListeners != null && mapListeners.size() > 0) {
      if (mapTargetListeners == null) {
        mapTargetListeners=new HashMap<Address,Boolean>(mapListeners);
      }
 else {
        final Set<Map.Entry<Address,Boolean>> entries=mapListeners.entrySet();
        for (        final Map.Entry<Address,Boolean> entry : entries) {
          if (mapTargetListeners.containsKey(entry.getKey())) {
            if (entry.getValue()) {
              mapTargetListeners.put(entry.getKey(),entry.getValue());
            }
          }
 else           mapTargetListeners.put(entry.getKey(),entry.getValue());
        }
      }
    }
    if (mapTargetListeners == null || mapTargetListeners.size() == 0) {
      return;
    }
    Data packetValue=value;
    if (value != null && getInstanceType(name).isMap()) {
      Keys keys=new Keys();
      keys.addKey(value);
      if (oldValue != null) {
        keys.addKey(oldValue);
      }
      packetValue=toData(keys);
    }
    sendEvents(eventType,name,key,packetValue,mapTargetListeners,callerAddress);
  }
 catch (  final Exception e) {
    e.printStackTrace();
  }
}
Program: 50076
Project: 50076
Buggy source:
public Object getKey(){
  if (key == null && dataKey != null) {
    key=toObject(dataKey);
  }
  return key;
}

Fixed version (ground truth):
public Object getKey(){
  return key;
}
Program: 50077
Project: 50077
Buggy source:
public Object getValue(){
  if (value == null) {
    if (dataValue != null) {
      fillValues();
    }
 else     if (collection) {
      value=key;
    }
  }
  return value;
}

Fixed version (ground truth):
public Object getValue(){
  return value;
}
Program: 50078
Project: 50078
Buggy source:
Packet createEntryEventPacket(EntryEvent event){
  Packet packet=new Packet();
  BaseManager.EventTask eventTask=(BaseManager.EventTask)event;
  packet.set(event.getName(),ClusterOperation.EVENT,eventTask.getDataKey(),eventTask.getDataValue());
  packet.longValue=event.getEventType().getType();
  return packet;
}

Fixed version (ground truth):
Packet createEntryEventPacket(EntryEvent event){
  Packet packet=new Packet();
  DataAwareEntryEvent dataAwareEntryEvent=(DataAwareEntryEvent)event;
  packet.set(event.getName(),ClusterOperation.EVENT,dataAwareEntryEvent.getKeyData(),dataAwareEntryEvent.getNewValueData());
  packet.longValue=event.getEventType().getType();
  return packet;
}
Program: 50079
Project: 50079
Buggy source:
void callListeners(EventTask event){
  for (  ListenerItem listenerItem : listeners) {
    if (listenerItem.listens(event)) {
      callListener(listenerItem,event);
    }
  }
}

Fixed version (ground truth):
void callListeners(DataAwareEntryEvent dataAwareEntryEvent){
  for (  ListenerItem listenerItem : listeners) {
    if (listenerItem.listens(dataAwareEntryEvent)) {
      callListener(listenerItem,dataAwareEntryEvent);
    }
  }
}
Program: 50080
Project: 50080
Buggy source:
public boolean listens(EventTask event){
  String name=event.getName();
  return this.name.equals(name) && (this.key == null || event.getKey().equals(this.key));
}

Fixed version (ground truth):
public boolean listens(DataAwareEntryEvent dataAwareEntryEvent){
  String name=dataAwareEntryEvent.getName();
  return this.name.equals(name) && (this.key == null || dataAwareEntryEvent.getKey().equals(this.key));
}
Program: 50082
Project: 50082
Buggy source:
public void setExpirationTime(long ttl){
  if (ttl <= 0 || ttl == Long.MAX_VALUE) {
    expirationTime=Long.MAX_VALUE;
  }
 else {
    expirationTime=getCreationTime() + ttl;
  }
}

Fixed version (ground truth):
public void setExpirationTime(long ttl){
  if (ttl <= 0 || ttl == Long.MAX_VALUE) {
    expirationTime=Long.MAX_VALUE;
  }
 else {
    long age=(System.currentTimeMillis() - getCreationTime());
    expirationTime=getCreationTime() + age + ttl;
  }
}
Program: 50083
Project: 50083
Buggy source:
public Collection<V> values(Predicate predicate){
  Set<V> result=new HashSet<V>();
  Set<Map.Entry<K,V>> entries=super.entrySet();
  for (  Map.Entry<K,V> entry : entries) {
    if (predicate.apply((MapEntry)entry)) {
      result.add(entry.getValue());
    }
  }
  return result;
}

Fixed version (ground truth):
public Collection<V> values(Predicate predicate){
  Set<V> result=new HashSet<V>();
  Set<Map.Entry<K,V>> entries=super.entrySet();
  for (  Map.Entry<K,V> entry : entries) {
    if (apply(predicate,entry)) {
      result.add(entry.getValue());
    }
  }
  return result;
}
Program: 50084
Project: 50084
Buggy source:
public Set<K> keySet(Predicate predicate){
  Set<K> result=new HashSet<K>();
  Set<Map.Entry<K,V>> entries=super.entrySet();
  for (  Map.Entry<K,V> entry : entries) {
    if (predicate.apply((MapEntry)entry)) {
      result.add(entry.getKey());
    }
  }
  return result;
}

Fixed version (ground truth):
public Set<K> keySet(Predicate predicate){
  Set<K> result=new HashSet<K>();
  Set<Map.Entry<K,V>> entries=super.entrySet();
  for (  Map.Entry<K,V> entry : entries) {
    if (apply(predicate,entry)) {
      result.add(entry.getKey());
    }
  }
  return result;
}
Program: 50085
Project: 50085
Buggy source:
public Set<Entry<K,V>> entrySet(Predicate predicate){
  Set<Map.Entry<K,V>> result=new HashSet<Map.Entry<K,V>>();
  Set<Map.Entry<K,V>> entries=super.entrySet();
  for (  Map.Entry<K,V> entry : entries) {
    if (predicate.apply((MapEntry)entry)) {
      result.add(entry);
    }
  }
  return result;
}

Fixed version (ground truth):
public Set<Entry<K,V>> entrySet(Predicate predicate){
  Set<Map.Entry<K,V>> result=new HashSet<Map.Entry<K,V>>();
  Set<Map.Entry<K,V>> entries=super.entrySet();
  for (  Map.Entry<K,V> entry : entries) {
    if (apply(predicate,entry)) {
      result.add(entry);
    }
  }
  return result;
}
Program: 50086
Project: 50086
Buggy source:
@Ignore @Test public void issue387(){
  IMap cache=ReplicatedMapFactory.getMap("String_Node_Str");
  ExampleObject object1=new ExampleObject("String_Node_Str","String_Node_Str");
  cache.put(object1.getId(),object1);
  EntryObject e=new PredicateBuilder().getEntryObject();
  Predicate predicate=e.get("String_Node_Str").equal("String_Node_Str");
  Collection<Object> queryResultCollection=cache.values(predicate);
}

Fixed version (ground truth):
@Test public void issue387(){
  IMap cache=ReplicatedMapFactory.getMap("String_Node_Str");
  ExampleObject object1=new ExampleObject("String_Node_Str","String_Node_Str");
  cache.put(object1.getId(),object1);
  EntryObject e=new PredicateBuilder().getEntryObject();
  Predicate predicate=e.get("String_Node_Str").equal("String_Node_Str");
  Collection<Object> queryResultCollection=cache.values(predicate);
}
Program: 50087
Project: 50087
Buggy source:
public V put(K key,V value,long ttl,TimeUnit timeunit){
  throw new UnsupportedOperationException();
}

Fixed version (ground truth):
public V put(K key,V value,long ttl,TimeUnit timeunit){
  check(key);
  check(value);
  return (V)proxyHelper.doOp(ClusterOperation.CONCURRENT_MAP_PUT,key,value,ttl,timeunit);
}
Program: 50088
Project: 50088
Buggy source:
public boolean tryPut(K key,V value,long timeout,TimeUnit timeunit){
  throw new UnsupportedOperationException();
}

Fixed version (ground truth):
public boolean tryPut(K key,V value,long timeout,TimeUnit timeunit){
  check(key);
  check(value);
  return (Boolean)proxyHelper.doOp(ClusterOperation.CONCURRENT_MAP_TRY_PUT,key,value,timeout,timeunit);
}
Program: 50089
Project: 50089
Buggy source:
protected Object doOp(ClusterOperation operation,Object key,Object value){
  Packet request=prepareRequest(operation,key,value);
  Packet response=callAndGetResult(request);
  return getValue(response);
}

Fixed version (ground truth):
public Object doOp(ClusterOperation operation,Object key,Object value,long ttl,TimeUnit timeunit){
  Packet request=prepareRequest(operation,key,value,ttl,timeunit);
  Packet response=callAndGetResult(request);
  return getValue(response);
}
Program: 50090
Project: 50090
Buggy source:
protected Packet prepareRequest(ClusterOperation operation,Object key,Object value){
  byte[] k=null;
  byte[] v=null;
  if (key != null) {
    k=toByte(key);
  }
  if (value != null) {
    v=toByte(value);
  }
  return createRequestPacket(operation,k,v);
}

Fixed version (ground truth):
protected Packet prepareRequest(ClusterOperation operation,Object key,Object value){
  return prepareRequest(operation,key,value,0,null);
}
Program: 50091
Project: 50091
Buggy source:
public Packet createRequestPacket(ClusterOperation operation,byte[] key,byte[] value){
  Packet request=createRequestPacket();
  request.setOperation(operation);
  request.setKey(key);
  request.setValue(value);
  return request;
}

Fixed version (ground truth):
private Packet createRequestPacket(ClusterOperation operation,byte[] key,byte[] value,long ttl,TimeUnit timeunit){
  Packet request=createRequestPacket();
  request.setOperation(operation);
  request.setKey(key);
  request.setValue(value);
  if (ttl > 0 && timeunit != null) {
    request.setTimeout(timeunit.toMillis(ttl));
  }
  return request;
}
Program: 50092
Project: 50092
Buggy source:
public abstract Data processMapOp(IMap<Object,Object> map,Data key,Data value);

Fixed version (ground truth):
protected abstract Data processMapOp(IMap<Object,Object> map,Data keyData,Data valueData,long ttl);
Program: 50094
Project: 50094
Buggy source:
@Test public void testRun() throws Exception {
  final AtomicInteger counter=new AtomicInteger(0);
  final ClientRunnable clientRunnable=new ClientRunnable(){
    @Override protected void customRun() throws InterruptedException {
      counter.incrementAndGet();
    }
  }
;
  final CountDownLatch latch=new CountDownLatch(1);
  final CountDownLatch waitLatch=new CountDownLatch(1);
  new Thread(new Runnable(){
    public void run(){
      try {
        waitLatch.countDown();
        Thread.sleep(100);
        clientRunnable.running=false;
synchronized (clientRunnable.monitor) {
          clientRunnable.monitor.wait();
        }
        latch.countDown();
      }
 catch (      InterruptedException e) {
      }
    }
  }
).start();
  clientRunnable.run();
  waitLatch.countDown();
  assertTrue(counter.get() > 1);
  assertTrue("String_Node_Str",latch.await(25,TimeUnit.SECONDS));
}

Fixed version (ground truth):
@Test public void testRun() throws Exception {
  final AtomicInteger counter=new AtomicInteger(0);
  final ClientRunnable clientRunnable=new ClientRunnable(){
    @Override protected void customRun() throws InterruptedException {
      counter.incrementAndGet();
    }
  }
;
  final CountDownLatch latch=new CountDownLatch(1);
  final CountDownLatch waitLatch=new CountDownLatch(1);
  new Thread(new Runnable(){
    public void run(){
      try {
        waitLatch.countDown();
        Thread.sleep(100);
        clientRunnable.running=false;
synchronized (clientRunnable.monitor) {
          clientRunnable.monitor.wait();
        }
        latch.countDown();
      }
 catch (      InterruptedException e) {
      }
    }
  }
).start();
  clientRunnable.run();
  assertTrue(waitLatch.await(10,TimeUnit.SECONDS));
  assertTrue(counter.get() > 1);
  assertTrue("String_Node_Str",latch.await(10,TimeUnit.SECONDS));
}
Program: 50095
Project: 50095
Buggy source:
public void run(){
  Collection<MemberInfo> lsMemberInfos=membersUpdate.getMemberInfos();
  List<Address> newMemberList=new ArrayList<Address>(lsMemberInfos.size());
  for (  final MemberInfo memberInfo : lsMemberInfos) {
    newMemberList.add(memberInfo.address);
  }
  List<AsyncRemotelyBooleanCallable> calls=new ArrayList<AsyncRemotelyBooleanCallable>(lsMemberInfos.size());
  for (  final Address target : newMemberList) {
    if (!thisAddress.equals(target)) {
      AsyncRemotelyBooleanCallable rrp=new AsyncRemotelyBooleanCallable();
      rrp.executeProcess(target,membersUpdate);
      calls.add(rrp);
    }
  }
  for (  AsyncRemotelyBooleanCallable call : calls) {
    if (!call.getResultAsBoolean()) {
      newMemberList.remove(call.getTarget());
    }
  }
  calls.clear();
  for (  final Address target : newMemberList) {
    AsyncRemotelyBooleanCallable call=new AsyncRemotelyBooleanCallable();
    call.executeProcess(target,new SyncProcess());
    calls.add(call);
  }
  for (  AsyncRemotelyBooleanCallable call : calls) {
    if (!call.getResultAsBoolean()) {
      newMemberList.remove(call.getTarget());
    }
  }
  calls.clear();
  AbstractRemotelyCallable<Boolean> connCheckCallable=new ConnectionCheckCall();
  for (  final Address target : newMemberList) {
    AsyncRemotelyBooleanCallable call=new AsyncRemotelyBooleanCallable();
    call.executeProcess(target,connCheckCallable);
    calls.add(call);
  }
  for (  AsyncRemotelyBooleanCallable call : calls) {
    if (!call.getResultAsBoolean()) {
      newMemberList.remove(call.getTarget());
    }
  }
}

Fixed version (ground truth):
public void run(){
  checkScheduledActions();
}
Program: 50096
Project: 50096
Buggy source:
public void destroy(String name){
  mapQueues.remove(name);
}

Fixed version (ground truth):
public void destroy(){
  lsBlocks.clear();
  mapListeners.clear();
  for (  ScheduledPollAction scheduledPollAction : lsScheduledPollActions) {
    scheduledPollAction.setValid(false);
  }
  lsScheduledPollActions.clear();
  for (  ScheduledOfferAction scheduledOfferAction : lsScheduledOfferActions) {
    scheduledOfferAction.setValid(false);
  }
  lsScheduledOfferActions.clear();
}
Program: 50097
Project: 50097
Buggy source:
void reset(){
  if (locallyOwnedMap != null) {
    locallyOwnedMap.reset();
  }
  if (mapNearCache != null) {
    mapNearCache.reset();
  }
  mapRecords.clear();
  mapIndexService.clear();
  if (store != null && store instanceof MapStoreWrapper) {
    try {
      ((MapStoreWrapper)store).destroy();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
void reset(){
  for (  Record record : mapRecords.values()) {
    if (record.hasScheduledAction()) {
      List<ScheduledAction> lsScheduledActions=record.getScheduledActions();
      if (lsScheduledActions != null) {
        for (        ScheduledAction scheduledAction : lsScheduledActions) {
          scheduledAction.setValid(false);
        }
      }
    }
  }
  if (locallyOwnedMap != null) {
    locallyOwnedMap.reset();
  }
  if (mapNearCache != null) {
    mapNearCache.reset();
  }
  mapRecordEntries.clear();
  mapRecords.clear();
  mapIndexService.clear();
  if (store != null && store instanceof MapStoreWrapper) {
    try {
      ((MapStoreWrapper)store).destroy();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}
Program: 50098
Project: 50098
Buggy source:
public void own(Request req){
  if (req.key == null || req.key.size() == 0) {
    throw new RuntimeException("String_Node_Str" + req.key);
  }
  Record record=toRecord(req);
  if (req.ttl <= 0 || req.timeout <= 0) {
    record.setInvalid();
  }
 else {
    record.setExpirationTime(req.ttl);
    record.setMaxIdle(req.timeout);
  }
  markAsActive(record);
  if (store != null && writeDelayMillis > 0) {
    markAsDirty(record);
  }
  if (req.value != null) {
    updateIndexes(record);
  }
  record.setVersion(req.version);
}

Fixed version (ground truth):
public void own(Request req){
  if (req.key == null || req.key.size() == 0) {
    throw new RuntimeException("String_Node_Str" + req.key);
  }
  if (req.value == null) {
    if (isSet() || isList()) {
      req.value=new Data();
    }
  }
  Record record=toRecord(req);
  if (req.ttl <= 0 || req.timeout <= 0) {
    record.setInvalid();
  }
 else {
    record.setExpirationTime(req.ttl);
    record.setMaxIdle(req.timeout);
  }
  markAsActive(record);
  if (store != null && writeDelayMillis > 0) {
    markAsDirty(record);
  }
  if (req.value != null) {
    updateIndexes(record);
  }
  record.setVersion(req.version);
}
Program: 50099
Project: 50099
Buggy source:
public void destroy(String name){
  maps.remove(name);
}

Fixed version (ground truth):
public void destroy(String name){
  CMap cmap=maps.remove(name);
  if (cmap != null) {
    cmap.reset();
  }
  mapLocallyOwnedMaps.remove(name);
  mapCaches.remove(name);
}
Program: 50100
Project: 50100
Buggy source:
public void stop(){
  if (!started)   return;
  parallelExecutorService.shutdown();
  Collection<NamedExecutorService> executors=mapExecutors.values();
  for (  NamedExecutorService namedExecutorService : executors) {
    namedExecutorService.stop();
  }
  threadPoolExecutor.shutdownNow();
  try {
    threadPoolExecutor.awaitTermination(3,TimeUnit.SECONDS);
  }
 catch (  InterruptedException ignored) {
  }
  started=false;
}

Fixed version (ground truth):
public void stop(){
  if (!started)   return;
  Collection<NamedExecutorService> executors=mapExecutors.values();
  for (  NamedExecutorService namedExecutorService : executors) {
    namedExecutorService.stop();
  }
  parallelExecutorService.shutdown();
  try {
    threadPoolExecutor.shutdownNow();
    threadPoolExecutor.awaitTermination(5,TimeUnit.SECONDS);
  }
 catch (  InterruptedException ignored) {
  }
  started=false;
}
Program: 50102
Project: 50102
Buggy source:
public void reset(){
  lsBlocksToMigrate.clear();
  for (int i=0; i < PARTITION_COUNT; i++) {
    blocks[i]=null;
  }
  partitionServiceImpl.reset();
}

Fixed version (ground truth):
public void reset(){
  lsBlocksToMigrate.clear();
  for (int i=0; i < PARTITION_COUNT; i++) {
    blocks[i]=null;
  }
  partitionServiceImpl.reset();
  parallelExecutorBackups.shutdown();
  parallelExecutorMigration.shutdown();
}
Program: 50103
Project: 50103
Buggy source:
public void run(){
  searchForOtherClusters();
  lastRun=System.currentTimeMillis();
  inProgress=false;
}

Fixed version (ground truth):
public void run(){
  if (node.isMaster() && node.joined() && node.isActive()) {
    long now=System.currentTimeMillis();
    if (!inProgress && (now - lastRun > NEXT_RUN_DELAY_MILLIS) && node.clusterManager.shouldTryMerge()) {
      inProgress=true;
      node.executorManager.executeNow(new FallThroughRunnable(){
        @Override public void doRun(){
          searchForOtherClusters();
          lastRun=System.currentTimeMillis();
          inProgress=false;
        }
      }
);
    }
  }
}
Program: 50104
Project: 50104
Buggy source:
public ParallelExecutor newParallelExecutor(int concurrencyLevel){
  if (concurrencyLevel > 0 && concurrencyLevel < Integer.MAX_VALUE) {
    return new ParallelExecutorImpl(concurrencyLevel);
  }
 else {
    return new FullyParallelExecutorImpl();
  }
}

Fixed version (ground truth):
public ParallelExecutor newParallelExecutor(int concurrencyLevel){
  ParallelExecutor parallelExecutor=null;
  if (concurrencyLevel > 0 && concurrencyLevel < Integer.MAX_VALUE) {
    parallelExecutor=new ParallelExecutorImpl(concurrencyLevel);
  }
 else {
    parallelExecutor=new FullyParallelExecutorImpl();
  }
  lsParallelExecutors.add(parallelExecutor);
  return parallelExecutor;
}
Program: 50105
Project: 50105
Buggy source:
/** 
 * only ServiceThread should call
 */
private static void putString(ByteBuffer bb,String str){
  if (str == null) {
    bb.putInt(0);
  }
 else {
    byte[] bytes=mapStringByteCache.get(str);
    if (bytes == null) {
      bytes=str.getBytes();
      if (mapStringByteCache.size() >= 10000) {
        mapStringByteCache.clear();
        throw new RuntimeException("String_Node_Str");
      }
      mapStringByteCache.put(str,bytes);
    }
    bb.putInt(bytes.length);
    bb.put(bytes);
  }
}

Fixed version (ground truth):
/** 
 * only ServiceThread should call
 */
private static void putString(ByteBuffer bb,String str){
  if (str == null) {
    bb.putInt(0);
  }
 else {
    byte[] bytes=mapStringByteCache.get(str);
    if (bytes == null) {
      bytes=str.getBytes();
      if (mapStringByteCache.size() >= 10000) {
        mapStringByteCache.clear();
      }
      mapStringByteCache.put(str,bytes);
    }
    bb.putInt(bytes.length);
    bb.put(bytes);
  }
}
Program: 50106
Project: 50106
Buggy source:
public ThreadStats publish(){
  long now=System.nanoTime();
  totalTime+=(now - start);
  long totalRun=totalTime - totalWait;
  int utilizationPercentage=(int)((totalRun * 100L) / totalTime);
  ThreadStats threadStats=new ThreadStats(utilizationPercentage,runCount,waitCount);
  start=now;
  totalTime=0;
  totalWait=0;
  return threadStats;
}

Fixed version (ground truth):
public ThreadStats publish(){
  long now=System.nanoTime();
  totalTime+=(now - start);
  long totalRun=totalTime - totalWait;
  int utilizationPercentage=(totalTime <= 0 || runCount <= 0) ? 0 : (int)((totalRun * 100L) / totalTime);
  ThreadStats threadStats=new ThreadStats(utilizationPercentage,runCount,waitCount);
  start=now;
  totalTime=0;
  totalWait=0;
  return threadStats;
}
Program: 50108
Project: 50108
Buggy source:
public void handleQueue(final org.w3c.dom.Node node){
  final Node attName=node.getAttributes().getNamedItem("String_Node_Str");
  final String name=getTextContent(attName);
  final QueueConfig qConfig=new QueueConfig();
  qConfig.setName(name);
  for (  org.w3c.dom.Node n : new IterableNodeList(node.getChildNodes())) {
    final String nodeName=cleanNodeName(n.getNodeName());
    final String value=getTextContent(n).trim();
    if ("String_Node_Str".equals(nodeName)) {
      qConfig.setMaxSizePerJVM(getIntegerValue("String_Node_Str",value,QueueConfig.DEFAULT_MAX_SIZE_PER_JVM));
    }
 else     if ("String_Node_Str".equals(nodeName)) {
      qConfig.setTimeToLiveSeconds(getIntegerValue("String_Node_Str",value,QueueConfig.DEFAULT_TTL_SECONDS));
    }
  }
  this.config.getQConfigs().put(name,qConfig);
}

Fixed version (ground truth):
public void handleQueue(final org.w3c.dom.Node node){
  final Node attName=node.getAttributes().getNamedItem("String_Node_Str");
  final String name=getTextContent(attName);
  final QueueConfig qConfig=new QueueConfig();
  qConfig.setName(name);
  for (  org.w3c.dom.Node n : new IterableNodeList(node.getChildNodes())) {
    final String nodeName=cleanNodeName(n.getNodeName());
    final String value=getTextContent(n).trim();
    if ("String_Node_Str".equals(nodeName)) {
      qConfig.setMaxSizePerJVM(getIntegerValue("String_Node_Str",value,QueueConfig.DEFAULT_MAX_SIZE_PER_JVM));
    }
 else     if ("String_Node_Str".equals(nodeName)) {
      qConfig.setTimeToLiveSeconds(getIntegerValue("String_Node_Str",value,QueueConfig.DEFAULT_TTL_SECONDS));
    }
  }
  this.config.addQueueConfig(qConfig);
}
Program: 50109
Project: 50109
Buggy source:
public void handleTopic(final org.w3c.dom.Node node){
  final Node attName=node.getAttributes().getNamedItem("String_Node_Str");
  final String name=getTextContent(attName);
  final TopicConfig tConfig=new TopicConfig();
  tConfig.setName(name);
  for (  org.w3c.dom.Node n : new IterableNodeList(node.getChildNodes())) {
    final String value=getTextContent(n).trim();
    if (cleanNodeName(n.getNodeName()).equals("String_Node_Str")) {
      tConfig.setGlobalOrderingEnabled(checkTrue(value));
    }
  }
  config.getTopicConfigs().put(name,tConfig);
}

Fixed version (ground truth):
public void handleTopic(final org.w3c.dom.Node node){
  final Node attName=node.getAttributes().getNamedItem("String_Node_Str");
  final String name=getTextContent(attName);
  final TopicConfig tConfig=new TopicConfig();
  tConfig.setName(name);
  for (  org.w3c.dom.Node n : new IterableNodeList(node.getChildNodes())) {
    final String value=getTextContent(n).trim();
    if (cleanNodeName(n.getNodeName()).equals("String_Node_Str")) {
      tConfig.setGlobalOrderingEnabled(checkTrue(value));
    }
  }
  config.addTopicConfig(tConfig);
}
Program: 50110
Project: 50110
Buggy source:
final void handleBackup(Packet packet){
  try {
    String name=packet.name;
    int blockId=packet.blockId;
    Q q=getQ(name);
    if (packet.operation == ClusterOperation.BLOCKING_QUEUE_BACKUP_ADD) {
      Data data=packet.getValueData();
      q.doBackup(true,data,blockId,(int)packet.longValue);
    }
 else     if (packet.operation == ClusterOperation.BLOCKING_QUEUE_BACKUP_REMOVE) {
      q.doBackup(false,null,blockId,(int)packet.longValue);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    releasePacket(packet);
  }
}

Fixed version (ground truth):
final void handleBackup(Packet packet){
  try {
    String name=packet.name;
    int blockId=packet.blockId;
    Q q=getQ(name);
    if (packet.operation == ClusterOperation.BLOCKING_QUEUE_BACKUP_ADD) {
      Data data=packet.getValueData();
      q.doBackup(true,data,blockId,(int)packet.longValue);
    }
 else     if (packet.operation == ClusterOperation.BLOCKING_QUEUE_BACKUP_REMOVE) {
      q.doBackup(false,null,blockId,(int)packet.longValue);
    }
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + packet.longValue);
    e.printStackTrace();
  }
 finally {
    releasePacket(packet);
  }
}