nus-yam/ex-repair huggingface dataset:
Program: 48193
Project: 48193
Buggy source:
public ReplicatedMapPostJoinOperation(MemberMapPair[] replicatedMaps,int chunkSize){
  this.replicatedMaps=replicatedMaps;
  this.chunkSize=chunkSize;
}

Fixed version (ground truth):
public ReplicatedMapPostJoinOperation(MemberMapPair[] replicatedMaps,int chunkSize){
  this.replicatedMaps=Arrays.copyOf(replicatedMaps,replicatedMaps.length);
  this.chunkSize=chunkSize;
}
Program: 48194
Project: 48194
Buggy source:
public static Collection<InetSocketAddress> getSocketAddresses(String address){
  final AddressHolder addressHolder=AddressUtil.getAddressHolder(address,-1);
  final String scopedAddress=addressHolder.scopeId != null ? addressHolder.address + "String_Node_Str" + addressHolder.scopeId : addressHolder.address;
  InetAddress inetAddress=null;
  try {
    inetAddress=InetAddress.getByName(scopedAddress);
  }
 catch (  UnknownHostException ignored) {
  }
  return getPossibleSocketAddresses(inetAddress,addressHolder.port,scopedAddress);
}

Fixed version (ground truth):
public static Collection<InetSocketAddress> getSocketAddresses(String address){
  final AddressHolder addressHolder=AddressUtil.getAddressHolder(address,-1);
  final String scopedAddress=addressHolder.getScopeId() != null ? addressHolder.getAddress() + "String_Node_Str" + addressHolder.getScopeId() : addressHolder.getAddress();
  InetAddress inetAddress=null;
  try {
    inetAddress=InetAddress.getByName(scopedAddress);
  }
 catch (  UnknownHostException ignored) {
    Logger.getLogger(AddressHelper.class).finest("String_Node_Str",ignored);
  }
  return getPossibleSocketAddresses(inetAddress,addressHolder.getPort(),scopedAddress);
}
Program: 48195
Project: 48195
Buggy source:
public static Collection<InetSocketAddress> getPossibleSocketAddresses(InetAddress inetAddress,int port,String scopedAddress){
  int portTryCount=1;
  if (port == -1) {
    portTryCount=MAX_PORT_TRIES;
    port=5701;
  }
  final Collection<InetSocketAddress> socketAddresses=new LinkedList<InetSocketAddress>();
  if (inetAddress == null) {
    for (int i=0; i < portTryCount; i++) {
      socketAddresses.add(new InetSocketAddress(scopedAddress,port + i));
    }
  }
 else   if (inetAddress instanceof Inet4Address) {
    for (int i=0; i < portTryCount; i++) {
      socketAddresses.add(new InetSocketAddress(inetAddress,port + i));
    }
  }
 else   if (inetAddress instanceof Inet6Address) {
    final Collection<Inet6Address> addresses=getPossibleInetAddressesFor((Inet6Address)inetAddress);
    for (    Inet6Address inet6Address : addresses) {
      for (int i=0; i < portTryCount; i++) {
        socketAddresses.add(new InetSocketAddress(inet6Address,port + i));
      }
    }
  }
  return socketAddresses;
}

Fixed version (ground truth):
public static Collection<InetSocketAddress> getPossibleSocketAddresses(InetAddress inetAddress,int port,String scopedAddress){
  int possiblePort=port;
  int portTryCount=1;
  if (possiblePort == -1) {
    portTryCount=MAX_PORT_TRIES;
    possiblePort=INITIAL_FIRST_PORT;
  }
  final Collection<InetSocketAddress> socketAddresses=new LinkedList<InetSocketAddress>();
  if (inetAddress == null) {
    for (int i=0; i < portTryCount; i++) {
      socketAddresses.add(new InetSocketAddress(scopedAddress,possiblePort + i));
    }
  }
 else   if (inetAddress instanceof Inet4Address) {
    for (int i=0; i < portTryCount; i++) {
      socketAddresses.add(new InetSocketAddress(inetAddress,possiblePort + i));
    }
  }
 else   if (inetAddress instanceof Inet6Address) {
    final Collection<Inet6Address> addresses=getPossibleInetAddressesFor((Inet6Address)inetAddress);
    for (    Inet6Address inet6Address : addresses) {
      for (int i=0; i < portTryCount; i++) {
        socketAddresses.add(new InetSocketAddress(inet6Address,possiblePort + i));
      }
    }
  }
  return socketAddresses;
}
Program: 48196
Project: 48196
Buggy source:
@Override public Future<V> removeAsync(final K key){
  final Data keyData=toData(key);
  MapRemoveRequest request=new MapRemoveRequest(name,keyData,ThreadUtil.getThreadId());
  try {
    final ICompletableFuture future=getContext().getInvocationService().invokeOnKeyOwner(request,keyData);
    return new DelegatingFuture<V>(future,getContext().getSerializationService());
  }
 catch (  Exception e) {
    throw ExceptionUtil.rethrow(e);
  }
}

Fixed version (ground truth):
@Override public Future<V> removeAsync(final K key){
  final Data keyData=toData(key);
  invalidateNearCache(keyData);
  MapRemoveRequest request=new MapRemoveRequest(name,keyData,ThreadUtil.getThreadId());
  try {
    final ICompletableFuture future=getContext().getInvocationService().invokeOnKeyOwner(request,keyData);
    return new DelegatingFuture<V>(future,getContext().getSerializationService());
  }
 catch (  Exception e) {
    throw ExceptionUtil.rethrow(e);
  }
}
Program: 48197
Project: 48197
Buggy source:
@Override public V replace(K key,V value){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapReplaceRequest request=new MapReplaceRequest(name,keyData,valueData,ThreadUtil.getThreadId());
  return invoke(request,keyData);
}

Fixed version (ground truth):
@Override public V replace(K key,V value){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapReplaceRequest request=new MapReplaceRequest(name,keyData,valueData,ThreadUtil.getThreadId());
  return invoke(request,keyData);
}
Program: 48198
Project: 48198
Buggy source:
@Override public void putTransient(K key,V value,long ttl,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapPutTransientRequest request=new MapPutTransientRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  invoke(request);
}

Fixed version (ground truth):
@Override public void putTransient(K key,V value,long ttl,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapPutTransientRequest request=new MapPutTransientRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  invoke(request);
}
Program: 48199
Project: 48199
Buggy source:
@Override public V put(K key,V value,long ttl,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapPutRequest request=new MapPutRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  return invoke(request,keyData);
}

Fixed version (ground truth):
@Override public V put(K key,V value,long ttl,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapPutRequest request=new MapPutRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  return invoke(request,keyData);
}
Program: 48200
Project: 48200
Buggy source:
@Override public boolean tryPut(K key,V value,long timeout,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapTryPutRequest request=new MapTryPutRequest(name,keyData,valueData,ThreadUtil.getThreadId(),timeunit.toMillis(timeout));
  Boolean result=invoke(request,keyData);
  return result;
}

Fixed version (ground truth):
@Override public boolean tryPut(K key,V value,long timeout,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapTryPutRequest request=new MapTryPutRequest(name,keyData,valueData,ThreadUtil.getThreadId(),timeunit.toMillis(timeout));
  Boolean result=invoke(request,keyData);
  return result;
}
Program: 48201
Project: 48201
Buggy source:
@Override public void delete(Object key){
  final Data keyData=toData(key);
  MapDeleteRequest request=new MapDeleteRequest(name,keyData,ThreadUtil.getThreadId());
  invoke(request,keyData);
}

Fixed version (ground truth):
@Override public void delete(Object key){
  final Data keyData=toData(key);
  invalidateNearCache(keyData);
  MapDeleteRequest request=new MapDeleteRequest(name,keyData,ThreadUtil.getThreadId());
  invoke(request,keyData);
}
Program: 48202
Project: 48202
Buggy source:
@Override public boolean remove(Object key,Object value){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapRemoveIfSameRequest request=new MapRemoveIfSameRequest(name,keyData,valueData,ThreadUtil.getThreadId());
  Boolean result=invoke(request,keyData);
  return result;
}

Fixed version (ground truth):
@Override public boolean remove(Object key,Object value){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapRemoveIfSameRequest request=new MapRemoveIfSameRequest(name,keyData,valueData,ThreadUtil.getThreadId());
  Boolean result=invoke(request,keyData);
  return result;
}
Program: 48203
Project: 48203
Buggy source:
@Override public Future<V> putAsync(final K key,final V value,final long ttl,final TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapPutRequest request=new MapPutRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  try {
    final ICompletableFuture future=getContext().getInvocationService().invokeOnKeyOwner(request,keyData);
    return new DelegatingFuture<V>(future,getContext().getSerializationService());
  }
 catch (  Exception e) {
    throw ExceptionUtil.rethrow(e);
  }
}

Fixed version (ground truth):
@Override public Future<V> putAsync(final K key,final V value,final long ttl,final TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapPutRequest request=new MapPutRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  try {
    final ICompletableFuture future=getContext().getInvocationService().invokeOnKeyOwner(request,keyData);
    return new DelegatingFuture<V>(future,getContext().getSerializationService());
  }
 catch (  Exception e) {
    throw ExceptionUtil.rethrow(e);
  }
}
Program: 48204
Project: 48204
Buggy source:
@Override public boolean tryRemove(K key,long timeout,TimeUnit timeunit){
  final Data keyData=toData(key);
  MapTryRemoveRequest request=new MapTryRemoveRequest(name,keyData,ThreadUtil.getThreadId(),timeunit.toMillis(timeout));
  Boolean result=invoke(request,keyData);
  return result;
}

Fixed version (ground truth):
@Override public boolean tryRemove(K key,long timeout,TimeUnit timeunit){
  final Data keyData=toData(key);
  invalidateNearCache(keyData);
  MapTryRemoveRequest request=new MapTryRemoveRequest(name,keyData,ThreadUtil.getThreadId(),timeunit.toMillis(timeout));
  Boolean result=invoke(request,keyData);
  return result;
}
Program: 48205
Project: 48205
Buggy source:
@Override public void putAll(Map<? extends K,? extends V> m){
  MapEntrySet entrySet=new MapEntrySet();
  for (  Entry<? extends K,? extends V> entry : m.entrySet()) {
    entrySet.add(new AbstractMap.SimpleImmutableEntry<Data,Data>(toData(entry.getKey()),toData(entry.getValue())));
  }
  MapPutAllRequest request=new MapPutAllRequest(name,entrySet);
  invoke(request);
}

Fixed version (ground truth):
@Override public void putAll(Map<? extends K,? extends V> m){
  MapEntrySet entrySet=new MapEntrySet();
  for (  Entry<? extends K,? extends V> entry : m.entrySet()) {
    final Data keyData=toData(entry.getKey());
    invalidateNearCache(keyData);
    entrySet.add(new AbstractMap.SimpleImmutableEntry<Data,Data>(keyData,toData(entry.getValue())));
  }
  MapPutAllRequest request=new MapPutAllRequest(name,entrySet);
  invoke(request);
}
Program: 48206
Project: 48206
Buggy source:
@Override public V putIfAbsent(K key,V value,long ttl,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapPutIfAbsentRequest request=new MapPutIfAbsentRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  return invoke(request,keyData);
}

Fixed version (ground truth):
@Override public V putIfAbsent(K key,V value,long ttl,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapPutIfAbsentRequest request=new MapPutIfAbsentRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  return invoke(request,keyData);
}
Program: 48207
Project: 48207
Buggy source:
@Override public Future<V> removeAsync(final K key){
  final Data keyData=toData(key);
  MapRemoveRequest request=new MapRemoveRequest(name,keyData,ThreadUtil.getThreadId());
  try {
    final ICompletableFuture future=getContext().getInvocationService().invokeOnKeyOwner(request,keyData);
    return new DelegatingFuture<V>(future,getContext().getSerializationService());
  }
 catch (  Exception e) {
    throw ExceptionUtil.rethrow(e);
  }
}

Fixed version (ground truth):
@Override public Future<V> removeAsync(final K key){
  final Data keyData=toData(key);
  invalidateNearCache(keyData);
  MapRemoveRequest request=new MapRemoveRequest(name,keyData,ThreadUtil.getThreadId());
  try {
    final ICompletableFuture future=getContext().getInvocationService().invokeOnKeyOwner(request,keyData);
    return new DelegatingFuture<V>(future,getContext().getSerializationService());
  }
 catch (  Exception e) {
    throw ExceptionUtil.rethrow(e);
  }
}
Program: 48208
Project: 48208
Buggy source:
@Override public V replace(K key,V value){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapReplaceRequest request=new MapReplaceRequest(name,keyData,valueData,ThreadUtil.getThreadId());
  return invoke(request,keyData);
}

Fixed version (ground truth):
@Override public V replace(K key,V value){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapReplaceRequest request=new MapReplaceRequest(name,keyData,valueData,ThreadUtil.getThreadId());
  return invoke(request,keyData);
}
Program: 48209
Project: 48209
Buggy source:
@Override public void putTransient(K key,V value,long ttl,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapPutTransientRequest request=new MapPutTransientRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  invoke(request);
}

Fixed version (ground truth):
@Override public void putTransient(K key,V value,long ttl,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapPutTransientRequest request=new MapPutTransientRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  invoke(request);
}
Program: 48210
Project: 48210
Buggy source:
@Override public V put(K key,V value,long ttl,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapPutRequest request=new MapPutRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  return invoke(request,keyData);
}

Fixed version (ground truth):
@Override public V put(K key,V value,long ttl,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapPutRequest request=new MapPutRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  return invoke(request,keyData);
}
Program: 48211
Project: 48211
Buggy source:
@Override public boolean tryPut(K key,V value,long timeout,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapTryPutRequest request=new MapTryPutRequest(name,keyData,valueData,ThreadUtil.getThreadId(),timeunit.toMillis(timeout));
  Boolean result=invoke(request,keyData);
  return result;
}

Fixed version (ground truth):
@Override public boolean tryPut(K key,V value,long timeout,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapTryPutRequest request=new MapTryPutRequest(name,keyData,valueData,ThreadUtil.getThreadId(),timeunit.toMillis(timeout));
  Boolean result=invoke(request,keyData);
  return result;
}
Program: 48212
Project: 48212
Buggy source:
@Override public void delete(Object key){
  final Data keyData=toData(key);
  MapDeleteRequest request=new MapDeleteRequest(name,keyData,ThreadUtil.getThreadId());
  invoke(request,keyData);
}

Fixed version (ground truth):
@Override public void delete(Object key){
  final Data keyData=toData(key);
  invalidateNearCache(keyData);
  MapDeleteRequest request=new MapDeleteRequest(name,keyData,ThreadUtil.getThreadId());
  invoke(request,keyData);
}
Program: 48213
Project: 48213
Buggy source:
@Override public boolean remove(Object key,Object value){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapRemoveIfSameRequest request=new MapRemoveIfSameRequest(name,keyData,valueData,ThreadUtil.getThreadId());
  Boolean result=invoke(request,keyData);
  return result;
}

Fixed version (ground truth):
@Override public boolean remove(Object key,Object value){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapRemoveIfSameRequest request=new MapRemoveIfSameRequest(name,keyData,valueData,ThreadUtil.getThreadId());
  Boolean result=invoke(request,keyData);
  return result;
}
Program: 48214
Project: 48214
Buggy source:
@Override public Future<V> putAsync(final K key,final V value,final long ttl,final TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapPutRequest request=new MapPutRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  try {
    final ICompletableFuture future=getContext().getInvocationService().invokeOnKeyOwner(request,keyData);
    return new DelegatingFuture<V>(future,getContext().getSerializationService());
  }
 catch (  Exception e) {
    throw ExceptionUtil.rethrow(e);
  }
}

Fixed version (ground truth):
@Override public Future<V> putAsync(final K key,final V value,final long ttl,final TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapPutRequest request=new MapPutRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  try {
    final ICompletableFuture future=getContext().getInvocationService().invokeOnKeyOwner(request,keyData);
    return new DelegatingFuture<V>(future,getContext().getSerializationService());
  }
 catch (  Exception e) {
    throw ExceptionUtil.rethrow(e);
  }
}
Program: 48215
Project: 48215
Buggy source:
@Override public boolean tryRemove(K key,long timeout,TimeUnit timeunit){
  final Data keyData=toData(key);
  MapTryRemoveRequest request=new MapTryRemoveRequest(name,keyData,ThreadUtil.getThreadId(),timeunit.toMillis(timeout));
  Boolean result=invoke(request,keyData);
  return result;
}

Fixed version (ground truth):
@Override public boolean tryRemove(K key,long timeout,TimeUnit timeunit){
  final Data keyData=toData(key);
  invalidateNearCache(keyData);
  MapTryRemoveRequest request=new MapTryRemoveRequest(name,keyData,ThreadUtil.getThreadId(),timeunit.toMillis(timeout));
  Boolean result=invoke(request,keyData);
  return result;
}
Program: 48216
Project: 48216
Buggy source:
@Override public void putAll(Map<? extends K,? extends V> m){
  MapEntrySet entrySet=new MapEntrySet();
  for (  Entry<? extends K,? extends V> entry : m.entrySet()) {
    entrySet.add(new AbstractMap.SimpleImmutableEntry<Data,Data>(toData(entry.getKey()),toData(entry.getValue())));
  }
  MapPutAllRequest request=new MapPutAllRequest(name,entrySet);
  invoke(request);
}

Fixed version (ground truth):
@Override public void putAll(Map<? extends K,? extends V> m){
  MapEntrySet entrySet=new MapEntrySet();
  for (  Entry<? extends K,? extends V> entry : m.entrySet()) {
    final Data keyData=toData(entry.getKey());
    invalidateNearCache(keyData);
    entrySet.add(new AbstractMap.SimpleImmutableEntry<Data,Data>(keyData,toData(entry.getValue())));
  }
  MapPutAllRequest request=new MapPutAllRequest(name,entrySet);
  invoke(request);
}
Program: 48217
Project: 48217
Buggy source:
@Override public V putIfAbsent(K key,V value,long ttl,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  MapPutIfAbsentRequest request=new MapPutIfAbsentRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  return invoke(request,keyData);
}

Fixed version (ground truth):
@Override public V putIfAbsent(K key,V value,long ttl,TimeUnit timeunit){
  final Data keyData=toData(key);
  final Data valueData=toData(value);
  invalidateNearCache(keyData);
  MapPutIfAbsentRequest request=new MapPutIfAbsentRequest(name,keyData,valueData,ThreadUtil.getThreadId(),getTimeInMillis(ttl,timeunit));
  return invoke(request,keyData);
}
Program: 48218
Project: 48218
Buggy source:
public static void notifyRemoteException(JobSupervisor supervisor,Throwable throwable){
  String name=supervisor.getConfiguration().getName();
  String jobId=supervisor.getConfiguration().getJobId();
  NotifyRemoteExceptionOperation operation=new NotifyRemoteExceptionOperation(name,jobId,throwable);
  MapReduceService mapReduceService=supervisor.getMapReduceService();
  NodeEngine nodeEngine=mapReduceService.getNodeEngine();
  OperationService os=nodeEngine.getOperationService();
  Address jobOwner=supervisor.getJobOwner();
  os.send(operation,jobOwner);
}

Fixed version (ground truth):
public static void notifyRemoteException(JobSupervisor supervisor,Throwable throwable){
  MapReduceService mapReduceService=supervisor.getMapReduceService();
  NodeEngine nodeEngine=mapReduceService.getNodeEngine();
  try {
    Address jobOwner=supervisor.getJobOwner();
    if (supervisor.isOwnerNode()) {
      supervisor.notifyRemoteException(jobOwner,throwable);
    }
 else {
      String name=supervisor.getConfiguration().getName();
      String jobId=supervisor.getConfiguration().getJobId();
      NotifyRemoteExceptionOperation operation=new NotifyRemoteExceptionOperation(name,jobId,throwable);
      OperationService os=nodeEngine.getOperationService();
      os.send(operation,jobOwner);
    }
  }
 catch (  Exception e) {
    ILogger logger=nodeEngine.getLogger(MapReduceUtil.class);
    logger.warning("String_Node_Str",e);
  }
}
Program: 48219
Project: 48219
Buggy source:
public static void notifyRemoteException(JobSupervisor supervisor,Throwable throwable){
  String name=supervisor.getConfiguration().getName();
  String jobId=supervisor.getConfiguration().getJobId();
  NotifyRemoteExceptionOperation operation=new NotifyRemoteExceptionOperation(name,jobId,throwable);
  MapReduceService mapReduceService=supervisor.getMapReduceService();
  NodeEngine nodeEngine=mapReduceService.getNodeEngine();
  OperationService os=nodeEngine.getOperationService();
  Address jobOwner=supervisor.getJobOwner();
  os.send(operation,jobOwner);
}

Fixed version (ground truth):
public static void notifyRemoteException(JobSupervisor supervisor,Throwable throwable){
  MapReduceService mapReduceService=supervisor.getMapReduceService();
  NodeEngine nodeEngine=mapReduceService.getNodeEngine();
  try {
    Address jobOwner=supervisor.getJobOwner();
    if (supervisor.isOwnerNode()) {
      supervisor.notifyRemoteException(jobOwner,throwable);
    }
 else {
      String name=supervisor.getConfiguration().getName();
      String jobId=supervisor.getConfiguration().getJobId();
      NotifyRemoteExceptionOperation operation=new NotifyRemoteExceptionOperation(name,jobId,throwable);
      OperationService os=nodeEngine.getOperationService();
      os.send(operation,jobOwner);
    }
  }
 catch (  Exception e) {
    ILogger logger=nodeEngine.getLogger(MapReduceUtil.class);
    logger.warning("String_Node_Str",e);
  }
}
Program: 48220
Project: 48220
Buggy source:
public static <T>Iterator<T> iterator(final Class<T> clazz,final String factoryId,final ClassLoader classLoader) throws Exception {
  final Set<ServiceDefinition> serviceDefinitions=parse(factoryId,classLoader);
  final ClassLoader hazelcastClassLoader=ServiceLoader.class.getClassLoader();
  if (hazelcastClassLoader != classLoader) {
    final Set<ServiceDefinition> systemDefinitions=parse(factoryId,hazelcastClassLoader);
    serviceDefinitions.addAll(systemDefinitions);
  }
  if (serviceDefinitions.isEmpty()) {
    Logger.getLogger(ServiceLoader.class).warning("String_Node_Str" + factoryId + "String_Node_Str");
  }
  return new Iterator<T>(){
    final Iterator<ServiceDefinition> iterator=serviceDefinitions.iterator();
    public boolean hasNext(){
      return iterator.hasNext();
    }
    public T next(){
      final ServiceDefinition definition=iterator.next();
      try {
        String className=definition.className;
        ClassLoader classLoader=definition.classLoader;
        return clazz.cast(ClassLoaderUtil.newInstance(classLoader,className));
      }
 catch (      Exception e) {
        throw new HazelcastException(e);
      }
    }
    public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}

Fixed version (ground truth):
public static <T>Iterator<T> iterator(final Class<T> clazz,String factoryId,ClassLoader classLoader) throws Exception {
  final Set<ClassLoader> classLoaders=selectClassLoaders(classLoader);
  final Set<URLDefinition> factoryUrls=new HashSet<URLDefinition>();
  for (  ClassLoader selectedClassLoader : classLoaders) {
    factoryUrls.addAll(collectFactoryUrls(factoryId,selectedClassLoader));
  }
  final Set<ServiceDefinition> serviceDefinitions=new HashSet<ServiceDefinition>();
  for (  URLDefinition urlDefinition : factoryUrls) {
    serviceDefinitions.addAll(parse(urlDefinition));
  }
  if (serviceDefinitions.isEmpty()) {
    Logger.getLogger(ServiceLoader.class).warning("String_Node_Str" + factoryId + "String_Node_Str");
  }
  return new Iterator<T>(){
    final Iterator<ServiceDefinition> iterator=serviceDefinitions.iterator();
    public boolean hasNext(){
      return iterator.hasNext();
    }
    public T next(){
      final ServiceDefinition definition=iterator.next();
      try {
        String className=definition.className;
        ClassLoader classLoader=definition.classLoader;
        return clazz.cast(ClassLoaderUtil.newInstance(classLoader,className));
      }
 catch (      Exception e) {
        throw new HazelcastException(e);
      }
    }
    public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}
Program: 48221
Project: 48221
Buggy source:
public static <T>T load(Class<T> clazz,String factoryId,ClassLoader classLoader) throws Exception {
  final Iterator<T> iter=iterator(clazz,factoryId,classLoader);
  if (iter.hasNext()) {
    return iter.next();
  }
  return null;
}

Fixed version (ground truth):
public static <T>T load(Class<T> clazz,String factoryId,ClassLoader classLoader) throws Exception {
  final Iterator<T> iterator=iterator(clazz,factoryId,classLoader);
  if (iterator.hasNext()) {
    return iterator.next();
  }
  return null;
}
Program: 48222
Project: 48222
Buggy source:
@Override public int hashCode(){
  return className != null ? className.hashCode() : 0;
}

Fixed version (ground truth):
@Override public int hashCode(){
  int result=url != null ? url.hashCode() : 0;
  result=31 * result + (classLoader != null ? classLoader.hashCode() : 0);
  return result;
}
Program: 48223
Project: 48223
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  ServiceDefinition that=(ServiceDefinition)o;
  if (className != null ? !className.equals(that.className) : that.className != null)   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  URLDefinition that=(URLDefinition)o;
  if (classLoader != null ? !classLoader.equals(that.classLoader) : that.classLoader != null) {
    return false;
  }
  if (url != null ? !url.equals(that.url) : that.url != null) {
    return false;
  }
  return true;
}
Program: 48224
Project: 48224
Buggy source:
private static Set<ServiceDefinition> parse(String factoryId,ClassLoader classLoader){
  final ClassLoader cl=(classLoader == null) ? Thread.currentThread().getContextClassLoader() : classLoader;
  final String resourceName="String_Node_Str" + factoryId;
  try {
    final Enumeration<URL> configs;
    if (cl != null) {
      configs=cl.getResources(resourceName);
    }
 else {
      configs=ClassLoader.getSystemResources(resourceName);
    }
    final Set<ServiceDefinition> names=new HashSet<ServiceDefinition>();
    while (configs.hasMoreElements()) {
      URL url=configs.nextElement();
      BufferedReader r=null;
      try {
        r=new BufferedReader(new InputStreamReader(url.openStream(),"String_Node_Str"));
        while (true) {
          String line=r.readLine();
          if (line == null) {
            break;
          }
          int comment=line.indexOf('#');
          if (comment >= 0) {
            line=line.substring(0,comment);
          }
          String name=line.trim();
          if (name.length() == 0) {
            continue;
          }
          names.add(new ServiceDefinition(name,cl));
        }
      }
  finally {
        IOUtil.closeResource(r);
      }
    }
    return names;
  }
 catch (  Exception e) {
    logger.severe(e);
  }
  return Collections.emptySet();
}

Fixed version (ground truth):
private static Set<ServiceDefinition> parse(URLDefinition urlDefinition){
  try {
    final Set<ServiceDefinition> names=new HashSet<ServiceDefinition>();
    BufferedReader r=null;
    try {
      URL url=urlDefinition.url;
      r=new BufferedReader(new InputStreamReader(url.openStream(),"String_Node_Str"));
      while (true) {
        String line=r.readLine();
        if (line == null) {
          break;
        }
        int comment=line.indexOf('#');
        if (comment >= 0) {
          line=line.substring(0,comment);
        }
        String name=line.trim();
        if (name.length() == 0) {
          continue;
        }
        names.add(new ServiceDefinition(name,urlDefinition.classLoader));
      }
    }
  finally {
      IOUtil.closeResource(r);
    }
    return names;
  }
 catch (  Exception e) {
    LOGGER.severe(e);
  }
  return Collections.emptySet();
}
Program: 48225
Project: 48225
Buggy source:
private ServiceDefinition(String className,ClassLoader classLoader){
  this.className=className;
  this.classLoader=classLoader;
}

Fixed version (ground truth):
private ServiceDefinition(String className,ClassLoader classLoader){
  ValidationUtil.isNotNull(className,"String_Node_Str");
  ValidationUtil.isNotNull(classLoader,"String_Node_Str");
  this.className=className;
  this.classLoader=classLoader;
}
Program: 48226
Project: 48226
Buggy source:
public static <T>Iterator<T> iterator(final Class<T> clazz,final String factoryId,final ClassLoader classLoader) throws Exception {
  final Set<ServiceDefinition> serviceDefinitions=parse(factoryId,classLoader);
  final ClassLoader hazelcastClassLoader=ServiceLoader.class.getClassLoader();
  if (hazelcastClassLoader != classLoader) {
    final Set<ServiceDefinition> systemDefinitions=parse(factoryId,hazelcastClassLoader);
    serviceDefinitions.addAll(systemDefinitions);
  }
  if (serviceDefinitions.isEmpty()) {
    Logger.getLogger(ServiceLoader.class).warning("String_Node_Str" + factoryId + "String_Node_Str");
  }
  return new Iterator<T>(){
    final Iterator<ServiceDefinition> iterator=serviceDefinitions.iterator();
    public boolean hasNext(){
      return iterator.hasNext();
    }
    public T next(){
      final ServiceDefinition definition=iterator.next();
      try {
        String className=definition.className;
        ClassLoader classLoader=definition.classLoader;
        return clazz.cast(ClassLoaderUtil.newInstance(classLoader,className));
      }
 catch (      Exception e) {
        throw new HazelcastException(e);
      }
    }
    public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}

Fixed version (ground truth):
public static <T>Iterator<T> iterator(final Class<T> clazz,String factoryId,ClassLoader classLoader) throws Exception {
  final Set<ServiceDefinition> serviceDefinitions=new HashSet<ServiceDefinition>();
  final Set<ClassLoader> classLoaders=selectClassLoaders(classLoader);
  for (  ClassLoader selectedClassLoader : classLoaders) {
    serviceDefinitions.addAll(parse(factoryId,selectedClassLoader));
  }
  if (serviceDefinitions.isEmpty()) {
    Logger.getLogger(ServiceLoader.class).warning("String_Node_Str" + factoryId + "String_Node_Str");
  }
  return new Iterator<T>(){
    final Iterator<ServiceDefinition> iterator=serviceDefinitions.iterator();
    public boolean hasNext(){
      return iterator.hasNext();
    }
    public T next(){
      final ServiceDefinition definition=iterator.next();
      try {
        String className=definition.className;
        ClassLoader classLoader=definition.classLoader;
        return clazz.cast(ClassLoaderUtil.newInstance(classLoader,className));
      }
 catch (      Exception e) {
        throw new HazelcastException(e);
      }
    }
    public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}
Program: 48227
Project: 48227
Buggy source:
public static <T>T load(Class<T> clazz,String factoryId,ClassLoader classLoader) throws Exception {
  final Iterator<T> iter=iterator(clazz,factoryId,classLoader);
  if (iter.hasNext()) {
    return iter.next();
  }
  return null;
}

Fixed version (ground truth):
public static <T>T load(Class<T> clazz,String factoryId,ClassLoader classLoader) throws Exception {
  final Iterator<T> iterator=iterator(clazz,factoryId,classLoader);
  if (iterator.hasNext()) {
    return iterator.next();
  }
  return null;
}
Program: 48228
Project: 48228
Buggy source:
@Override public int hashCode(){
  return className != null ? className.hashCode() : 0;
}

Fixed version (ground truth):
@Override public int hashCode(){
  int result=className.hashCode();
  result=31 * result + classLoader.hashCode();
  return result;
}
Program: 48229
Project: 48229
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  ServiceDefinition that=(ServiceDefinition)o;
  if (className != null ? !className.equals(that.className) : that.className != null)   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  ServiceDefinition that=(ServiceDefinition)o;
  if (!classLoader.equals(that.classLoader)) {
    return false;
  }
  if (!className.equals(that.className)) {
    return false;
  }
  return true;
}
Program: 48230
Project: 48230
Buggy source:
private static Set<ServiceDefinition> parse(String factoryId,ClassLoader classLoader){
  final ClassLoader cl=(classLoader == null) ? Thread.currentThread().getContextClassLoader() : classLoader;
  final String resourceName="String_Node_Str" + factoryId;
  try {
    final Enumeration<URL> configs;
    if (cl != null) {
      configs=cl.getResources(resourceName);
    }
 else {
      configs=ClassLoader.getSystemResources(resourceName);
    }
    final Set<ServiceDefinition> names=new HashSet<ServiceDefinition>();
    while (configs.hasMoreElements()) {
      URL url=configs.nextElement();
      BufferedReader r=null;
      try {
        r=new BufferedReader(new InputStreamReader(url.openStream(),"String_Node_Str"));
        while (true) {
          String line=r.readLine();
          if (line == null) {
            break;
          }
          int comment=line.indexOf('#');
          if (comment >= 0) {
            line=line.substring(0,comment);
          }
          String name=line.trim();
          if (name.length() == 0) {
            continue;
          }
          names.add(new ServiceDefinition(name,cl));
        }
      }
  finally {
        IOUtil.closeResource(r);
      }
    }
    return names;
  }
 catch (  Exception e) {
    logger.severe(e);
  }
  return Collections.emptySet();
}

Fixed version (ground truth):
private static Set<ServiceDefinition> parse(String factoryId,ClassLoader classLoader){
  final String resourceName="String_Node_Str" + factoryId;
  try {
    final Enumeration<URL> configs;
    if (classLoader != null) {
      configs=classLoader.getResources(resourceName);
    }
 else {
      configs=ClassLoader.getSystemResources(resourceName);
    }
    final Set<ServiceDefinition> names=new HashSet<ServiceDefinition>();
    while (configs.hasMoreElements()) {
      URL url=configs.nextElement();
      BufferedReader r=null;
      try {
        r=new BufferedReader(new InputStreamReader(url.openStream(),"String_Node_Str"));
        while (true) {
          String line=r.readLine();
          if (line == null) {
            break;
          }
          int comment=line.indexOf('#');
          if (comment >= 0) {
            line=line.substring(0,comment);
          }
          String name=line.trim();
          if (name.length() == 0) {
            continue;
          }
          names.add(new ServiceDefinition(name,classLoader));
        }
      }
  finally {
        IOUtil.closeResource(r);
      }
    }
    return names;
  }
 catch (  Exception e) {
    LOGGER.severe(e);
  }
  return Collections.emptySet();
}
Program: 48231
Project: 48231
Buggy source:
private ServiceDefinition(String className,ClassLoader classLoader){
  this.className=className;
  this.classLoader=classLoader;
}

Fixed version (ground truth):
private ServiceDefinition(String className,ClassLoader classLoader){
  ValidationUtil.isNotNull(className,"String_Node_Str");
  ValidationUtil.isNotNull(classLoader,"String_Node_Str");
  this.className=className;
  this.classLoader=classLoader;
}
Program: 48232
Project: 48232
Buggy source:
public static <T>Iterator<T> iterator(final Class<T> clazz,final String factoryId,final ClassLoader classLoader) throws Exception {
  final Set<ServiceDefinition> serviceDefinitions=parse(factoryId,classLoader);
  final ClassLoader hazelcastClassLoader=ServiceLoader.class.getClassLoader();
  if (hazelcastClassLoader != classLoader) {
    final Set<ServiceDefinition> systemDefinitions=parse(factoryId,hazelcastClassLoader);
    serviceDefinitions.addAll(systemDefinitions);
  }
  if (serviceDefinitions.isEmpty()) {
    Logger.getLogger(ServiceLoader.class).warning("String_Node_Str" + factoryId + "String_Node_Str");
  }
  return new Iterator<T>(){
    final Iterator<ServiceDefinition> iterator=serviceDefinitions.iterator();
    public boolean hasNext(){
      return iterator.hasNext();
    }
    public T next(){
      final ServiceDefinition definition=iterator.next();
      try {
        String className=definition.className;
        ClassLoader classLoader=definition.classLoader;
        return clazz.cast(ClassLoaderUtil.newInstance(classLoader,className));
      }
 catch (      Exception e) {
        throw new HazelcastException(e);
      }
    }
    public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}

Fixed version (ground truth):
public static <T>Iterator<T> iterator(final Class<T> clazz,String factoryId,ClassLoader classLoader) throws Exception {
  final Set<ClassLoader> classLoaders=selectClassLoaders(classLoader);
  final Set<URLDefinition> factoryUrls=new HashSet<URLDefinition>();
  for (  ClassLoader selectedClassLoader : classLoaders) {
    factoryUrls.addAll(collectFactoryUrls(factoryId,selectedClassLoader));
  }
  final Set<ServiceDefinition> serviceDefinitions=new HashSet<ServiceDefinition>();
  for (  URLDefinition urlDefinition : factoryUrls) {
    serviceDefinitions.addAll(parse(urlDefinition));
  }
  if (serviceDefinitions.isEmpty()) {
    Logger.getLogger(ServiceLoader.class).warning("String_Node_Str" + factoryId + "String_Node_Str");
  }
  return new Iterator<T>(){
    final Iterator<ServiceDefinition> iterator=serviceDefinitions.iterator();
    public boolean hasNext(){
      return iterator.hasNext();
    }
    public T next(){
      final ServiceDefinition definition=iterator.next();
      try {
        String className=definition.className;
        ClassLoader classLoader=definition.classLoader;
        return clazz.cast(ClassLoaderUtil.newInstance(classLoader,className));
      }
 catch (      Exception e) {
        throw new HazelcastException(e);
      }
    }
    public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}
Program: 48233
Project: 48233
Buggy source:
public static <T>T load(Class<T> clazz,String factoryId,ClassLoader classLoader) throws Exception {
  final Iterator<T> iter=iterator(clazz,factoryId,classLoader);
  if (iter.hasNext()) {
    return iter.next();
  }
  return null;
}

Fixed version (ground truth):
public static <T>T load(Class<T> clazz,String factoryId,ClassLoader classLoader) throws Exception {
  final Iterator<T> iterator=iterator(clazz,factoryId,classLoader);
  if (iterator.hasNext()) {
    return iterator.next();
  }
  return null;
}
Program: 48234
Project: 48234
Buggy source:
@Override public int hashCode(){
  return className != null ? className.hashCode() : 0;
}

Fixed version (ground truth):
@Override public int hashCode(){
  int result=url != null ? url.hashCode() : 0;
  result=31 * result + (classLoader != null ? classLoader.hashCode() : 0);
  return result;
}
Program: 48235
Project: 48235
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  ServiceDefinition that=(ServiceDefinition)o;
  if (className != null ? !className.equals(that.className) : that.className != null)   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  URLDefinition that=(URLDefinition)o;
  if (classLoader != null ? !classLoader.equals(that.classLoader) : that.classLoader != null) {
    return false;
  }
  if (url != null ? !url.equals(that.url) : that.url != null) {
    return false;
  }
  return true;
}
Program: 48236
Project: 48236
Buggy source:
private static Set<ServiceDefinition> parse(String factoryId,ClassLoader classLoader){
  final ClassLoader cl=(classLoader == null) ? Thread.currentThread().getContextClassLoader() : classLoader;
  final String resourceName="String_Node_Str" + factoryId;
  try {
    final Enumeration<URL> configs;
    if (cl != null) {
      configs=cl.getResources(resourceName);
    }
 else {
      configs=ClassLoader.getSystemResources(resourceName);
    }
    final Set<ServiceDefinition> names=new HashSet<ServiceDefinition>();
    while (configs.hasMoreElements()) {
      URL url=configs.nextElement();
      BufferedReader r=null;
      try {
        r=new BufferedReader(new InputStreamReader(url.openStream(),"String_Node_Str"));
        while (true) {
          String line=r.readLine();
          if (line == null) {
            break;
          }
          int comment=line.indexOf('#');
          if (comment >= 0) {
            line=line.substring(0,comment);
          }
          String name=line.trim();
          if (name.length() == 0) {
            continue;
          }
          names.add(new ServiceDefinition(name,cl));
        }
      }
  finally {
        IOUtil.closeResource(r);
      }
    }
    return names;
  }
 catch (  Exception e) {
    logger.severe(e);
  }
  return Collections.emptySet();
}

Fixed version (ground truth):
private static Set<ServiceDefinition> parse(URLDefinition urlDefinition){
  try {
    final Set<ServiceDefinition> names=new HashSet<ServiceDefinition>();
    BufferedReader r=null;
    try {
      URL url=urlDefinition.url;
      r=new BufferedReader(new InputStreamReader(url.openStream(),"String_Node_Str"));
      while (true) {
        String line=r.readLine();
        if (line == null) {
          break;
        }
        int comment=line.indexOf('#');
        if (comment >= 0) {
          line=line.substring(0,comment);
        }
        String name=line.trim();
        if (name.length() == 0) {
          continue;
        }
        names.add(new ServiceDefinition(name,urlDefinition.classLoader));
      }
    }
  finally {
      IOUtil.closeResource(r);
    }
    return names;
  }
 catch (  Exception e) {
    LOGGER.severe(e);
  }
  return Collections.emptySet();
}
Program: 48237
Project: 48237
Buggy source:
private ServiceDefinition(String className,ClassLoader classLoader){
  this.className=className;
  this.classLoader=classLoader;
}

Fixed version (ground truth):
private ServiceDefinition(String className,ClassLoader classLoader){
  ValidationUtil.isNotNull(className,"String_Node_Str");
  ValidationUtil.isNotNull(classLoader,"String_Node_Str");
  this.className=className;
  this.classLoader=classLoader;
}
Program: 48238
Project: 48238
Buggy source:
public static <T>Iterator<T> iterator(final Class<T> clazz,final String factoryId,final ClassLoader classLoader) throws Exception {
  final Set<ServiceDefinition> serviceDefinitions=parse(factoryId,classLoader);
  final ClassLoader hazelcastClassLoader=ServiceLoader.class.getClassLoader();
  if (hazelcastClassLoader != classLoader) {
    final Set<ServiceDefinition> systemDefinitions=parse(factoryId,hazelcastClassLoader);
    serviceDefinitions.addAll(systemDefinitions);
  }
  if (serviceDefinitions.isEmpty()) {
    Logger.getLogger(ServiceLoader.class).warning("String_Node_Str" + factoryId + "String_Node_Str");
  }
  return new Iterator<T>(){
    final Iterator<ServiceDefinition> iterator=serviceDefinitions.iterator();
    public boolean hasNext(){
      return iterator.hasNext();
    }
    public T next(){
      final ServiceDefinition definition=iterator.next();
      try {
        String className=definition.className;
        ClassLoader classLoader=definition.classLoader;
        return clazz.cast(ClassLoaderUtil.newInstance(classLoader,className));
      }
 catch (      Exception e) {
        throw new HazelcastException(e);
      }
    }
    public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}

Fixed version (ground truth):
public static <T>Iterator<T> iterator(final Class<T> clazz,String factoryId,ClassLoader classLoader) throws Exception {
  final Set<ServiceDefinition> serviceDefinitions=new HashSet<ServiceDefinition>();
  final Set<ClassLoader> classLoaders=selectClassLoaders(classLoader);
  for (  ClassLoader selectedClassLoader : classLoaders) {
    serviceDefinitions.addAll(parse(factoryId,selectedClassLoader));
  }
  if (serviceDefinitions.isEmpty()) {
    Logger.getLogger(ServiceLoader.class).warning("String_Node_Str" + factoryId + "String_Node_Str");
  }
  return new Iterator<T>(){
    final Iterator<ServiceDefinition> iterator=serviceDefinitions.iterator();
    public boolean hasNext(){
      return iterator.hasNext();
    }
    public T next(){
      final ServiceDefinition definition=iterator.next();
      try {
        String className=definition.className;
        ClassLoader classLoader=definition.classLoader;
        return clazz.cast(ClassLoaderUtil.newInstance(classLoader,className));
      }
 catch (      Exception e) {
        throw new HazelcastException(e);
      }
    }
    public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}
Program: 48239
Project: 48239
Buggy source:
public static <T>T load(Class<T> clazz,String factoryId,ClassLoader classLoader) throws Exception {
  final Iterator<T> iter=iterator(clazz,factoryId,classLoader);
  if (iter.hasNext()) {
    return iter.next();
  }
  return null;
}

Fixed version (ground truth):
public static <T>T load(Class<T> clazz,String factoryId,ClassLoader classLoader) throws Exception {
  final Iterator<T> iterator=iterator(clazz,factoryId,classLoader);
  if (iterator.hasNext()) {
    return iterator.next();
  }
  return null;
}
Program: 48240
Project: 48240
Buggy source:
@Override public int hashCode(){
  return className != null ? className.hashCode() : 0;
}

Fixed version (ground truth):
@Override public int hashCode(){
  int result=className.hashCode();
  result=31 * result + classLoader.hashCode();
  return result;
}