nus-yam/ex-repair huggingface dataset:
Program: 48545
Project: 48545
Buggy source:
public Map loadAll(Collection keys){
  Map map=new HashMap();
  BasicDBList dbo=new BasicDBList();
  for (  Object key : keys) {
    dbo.add(new BasicDBObject("String_Node_Str",key));
  }
  BasicDBObject dbb=new BasicDBObject("String_Node_Str",dbo);
  DBCursor cursor=coll.find(dbb);
  while (cursor.hasNext()) {
    try {
      DBObject obj=cursor.next();
      Class clazz=null;
      clazz=Class.forName(obj.get("String_Node_Str").toString());
      map.put(obj.get("String_Node_Str"),converter.toObject(clazz,obj));
    }
 catch (    ClassNotFoundException e) {
      logger.log(Level.WARNING,e.getMessage(),e);
    }
  }
  return map;
}

Fixed version (ground truth):
public Map loadAll(Collection keys){
  Map map=new HashMap();
  BasicDBList dbo=new BasicDBList();
  for (  Object key : keys) {
    dbo.add(new BasicDBObject("String_Node_Str",key));
  }
  BasicDBObject dbb=new BasicDBObject("String_Node_Str",dbo);
  DBCursor cursor=coll.find(dbb);
  while (cursor.hasNext()) {
    try {
      DBObject obj=cursor.next();
      Class clazz=Class.forName(obj.get("String_Node_Str").toString());
      map.put(obj.get("String_Node_Str"),converter.toObject(clazz,obj));
    }
 catch (    ClassNotFoundException e) {
      logger.log(Level.WARNING,e.getMessage(),e);
    }
  }
  return map;
}
Program: 48546
Project: 48546
Buggy source:
@Override public void dispatchEvent(MembershipEvent event,MembershipListener listener){
  if (event.getEventType() == MembershipEvent.MEMBER_ADDED) {
    listener.memberAdded(event);
  }
 else   if (event.getEventType() == MembershipEvent.MEMBER_REMOVED) {
    listener.memberRemoved(event);
  }
 else   if (event.getEventType() == MembershipEvent.MEMBER_ATTRIBUTE_CHANGED) {
    listener.memberAttributeChanged((MemberAttributeEvent)event);
  }
}

Fixed version (ground truth):
@Override public void dispatchEvent(MembershipEvent event,MembershipListener listener){
switch (event.getEventType()) {
case MembershipEvent.MEMBER_ADDED:
    listener.memberAdded(event);
  break;
case MembershipEvent.MEMBER_REMOVED:
listener.memberRemoved(event);
break;
case MembershipEvent.MEMBER_ATTRIBUTE_CHANGED:
listener.memberAttributeChanged((MemberAttributeEvent)event);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + event);
}
}
Program: 48547
Project: 48547
Buggy source:
@Override protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  key=in.readUTF();
  int operation=in.readByte();
switch (operation) {
case DELTA_MEMBER_PROPERTIES_OP_PUT:
    operationType=MapOperationType.PUT;
  value=in.readObject();
break;
case DELTA_MEMBER_PROPERTIES_OP_REMOVE:
operationType=MapOperationType.REMOVE;
break;
}
}

Fixed version (ground truth):
@Override protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  key=in.readUTF();
  int operation=in.readByte();
switch (operation) {
case DELTA_MEMBER_PROPERTIES_OP_PUT:
    operationType=MapOperationType.PUT;
  value=in.readObject();
break;
case DELTA_MEMBER_PROPERTIES_OP_REMOVE:
operationType=MapOperationType.REMOVE;
break;
default :
throw new IllegalStateException("String_Node_Str" + operationType);
}
}
Program: 48548
Project: 48548
Buggy source:
@Override protected void writeInternal(ObjectDataOutput out) throws IOException {
  super.writeInternal(out);
  out.writeUTF(key);
switch (operationType) {
case PUT:
    out.writeByte(DELTA_MEMBER_PROPERTIES_OP_PUT);
  out.writeObject(value);
break;
case REMOVE:
out.writeByte(DELTA_MEMBER_PROPERTIES_OP_REMOVE);
break;
}
}

Fixed version (ground truth):
@Override protected void writeInternal(ObjectDataOutput out) throws IOException {
  super.writeInternal(out);
  out.writeUTF(key);
switch (operationType) {
case PUT:
    out.writeByte(DELTA_MEMBER_PROPERTIES_OP_PUT);
  out.writeObject(value);
break;
case REMOVE:
out.writeByte(DELTA_MEMBER_PROPERTIES_OP_REMOVE);
break;
default :
throw new IllegalStateException("String_Node_Str" + operationType);
}
}
Program: 48549
Project: 48549
Buggy source:
private static <T>T lookupByPattern(Map<String,T> map,String name){
  T t=map.get(name);
  if (t == null) {
    final Set<String> tNames=map.keySet();
    for (    final String pattern : tNames) {
      if (nameMatches(name,pattern)) {
        return map.get(pattern);
      }
    }
  }
  return t;
}

Fixed version (ground truth):
private static <T>T lookupByPattern(Map<String,T> map,String name){
  T t=map.get(name);
  if (t == null) {
    for (    Map.Entry<String,T> entry : map.entrySet()) {
      String pattern=entry.getKey();
      T value=entry.getValue();
      if (nameMatches(name,pattern)) {
        return value;
      }
    }
  }
  return t;
}
Program: 48550
Project: 48550
Buggy source:
/** 
 * Returns the membership event type; #MEMBER_ADDED or #MEMBER_REMOVED
 * @return the membership event type
 */
public int getEventType(){
  return eventType;
}

Fixed version (ground truth):
/** 
 * Returns the membership event type; #MEMBER_ADDED #MEMBER_REMOVED #MEMBER_ATTRIBUTE_CHANGED
 * @return the membership event type
 */
public int getEventType(){
  return eventType;
}
Program: 48551
Project: 48551
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + member + "String_Node_Str"+ ((eventType == MEMBER_ADDED) ? "String_Node_Str" : "String_Node_Str");
}

Fixed version (ground truth):
@Override public String toString(){
  String type;
switch (eventType) {
case MEMBER_ADDED:
    type="String_Node_Str";
  break;
case MEMBER_REMOVED:
type="String_Node_Str";
break;
case MEMBER_ATTRIBUTE_CHANGED:
type="String_Node_Str";
break;
default :
throw new IllegalStateException();
}
return format("String_Node_Str",member,type);
}
Program: 48554
Project: 48554
Buggy source:
void set(HazelcastInstanceProxy proxy){
  this.hz=proxy;
synchronized (this) {
    notifyAll();
  }
}

Fixed version (ground truth):
void set(HazelcastInstanceProxy proxy){
synchronized (this) {
    this.hz=proxy;
    notifyAll();
  }
}
Program: 48555
Project: 48555
Buggy source:
public void setFailure(Throwable throwable){
  this.throwable=throwable;
synchronized (this) {
    notifyAll();
  }
}

Fixed version (ground truth):
public void setFailure(Throwable throwable){
synchronized (this) {
    this.throwable=throwable;
    notifyAll();
  }
}
Program: 48556
Project: 48556
Buggy source:
@Override public ReplicatedRecordStore createNew(String name){
  ReplicatedMapConfig replicatedMapConfig=getReplicatedMapConfig(name);
  InMemoryFormat inMemoryFormat=replicatedMapConfig.getInMemoryFormat();
  AbstractReplicatedRecordStore replicatedRecordStorage=null;
switch (inMemoryFormat) {
case OBJECT:
    replicatedRecordStorage=new ObjectReplicatedRecordStorage(name,nodeEngine,cleanerRegistrator,ReplicatedMapService.this);
  break;
case BINARY:
replicatedRecordStorage=new DataReplicatedRecordStore(name,nodeEngine,cleanerRegistrator,ReplicatedMapService.this);
break;
}
if (replicatedRecordStorage == null) {
throw new IllegalStateException("String_Node_Str");
}
return replicatedRecordStorage;
}

Fixed version (ground truth):
@Override public ReplicatedRecordStore createNew(String name){
  ReplicatedMapConfig replicatedMapConfig=getReplicatedMapConfig(name);
  InMemoryFormat inMemoryFormat=replicatedMapConfig.getInMemoryFormat();
  AbstractReplicatedRecordStore replicatedRecordStorage=null;
switch (inMemoryFormat) {
case OBJECT:
    replicatedRecordStorage=new ObjectReplicatedRecordStorage(name,nodeEngine,cleanerRegistrator,ReplicatedMapService.this);
  break;
case BINARY:
replicatedRecordStorage=new DataReplicatedRecordStore(name,nodeEngine,cleanerRegistrator,ReplicatedMapService.this);
break;
case OFFHEAP:
throw new IllegalStateException("String_Node_Str");
default :
throw new IllegalStateException("String_Node_Str" + inMemoryFormat);
}
return replicatedRecordStorage;
}
Program: 48557
Project: 48557
Buggy source:
public void init() throws IOException {
  out.write(Protocols.CLIENT_BINARY.getBytes());
  out.write(ClientTypes.JAVA.getBytes());
  out.flush();
}

Fixed version (ground truth):
public void init() throws IOException {
  out.write(stringToBytes(Protocols.CLIENT_BINARY));
  out.write(stringToBytes(ClientTypes.JAVA));
  out.flush();
}
Program: 48558
Project: 48558
Buggy source:
public static String calculateRFC2104HMAC(String data,String key) throws SignatureException {
  String result;
  try {
    SecretKeySpec signingKey=new SecretKeySpec(key.getBytes(),SIGNATURE_METHOD);
    Mac mac=Mac.getInstance(SIGNATURE_METHOD);
    mac.init(signingKey);
    byte[] rawSignature=mac.doFinal(data.getBytes());
    result=new String(encode(rawSignature));
    result=result.trim();
  }
 catch (  Exception e) {
    throw new SignatureException("String_Node_Str" + e.getMessage());
  }
  return result;
}

Fixed version (ground truth):
public static String calculateRFC2104HMAC(String data,String key) throws SignatureException {
  String result;
  try {
    SecretKeySpec signingKey=new SecretKeySpec(stringToBytes(key),SIGNATURE_METHOD);
    Mac mac=Mac.getInstance(SIGNATURE_METHOD);
    mac.init(signingKey);
    byte[] rawSignature=mac.doFinal(stringToBytes(data));
    result=bytesToString(encode(rawSignature));
    result=result.trim();
  }
 catch (  Exception e) {
    throw new SignatureException("String_Node_Str" + e.getMessage());
  }
  return result;
}
Program: 48559
Project: 48559
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + new String(response.array()) + "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + bytesToString(response.array()) + "String_Node_Str";
}
Program: 48560
Project: 48560
Buggy source:
public ErrorCommand(TextCommandType type,String message){
  super(type);
  byte[] error=ERROR;
  if (type == TextCommandType.ERROR_CLIENT) {
    error=CLIENT_ERROR;
  }
 else   if (type == TextCommandType.ERROR_SERVER) {
    error=SERVER_ERROR;
  }
  this.message=message;
  byte[] msg=(message == null) ? null : message.getBytes();
  int total=error.length;
  if (msg != null) {
    total+=msg.length;
  }
  total+=2;
  response=ByteBuffer.allocate(total);
  response.put(error);
  if (msg != null) {
    response.put(msg);
  }
  response.put(RETURN);
  response.flip();
}

Fixed version (ground truth):
public ErrorCommand(TextCommandType type,String message){
  super(type);
  byte[] error=ERROR;
  if (type == TextCommandType.ERROR_CLIENT) {
    error=CLIENT_ERROR;
  }
 else   if (type == TextCommandType.ERROR_SERVER) {
    error=SERVER_ERROR;
  }
  this.message=message;
  byte[] msg=(message == null) ? null : stringToBytes(message);
  int total=error.length;
  if (msg != null) {
    total+=msg.length;
  }
  total+=2;
  response=ByteBuffer.allocate(total);
  response.put(error);
  if (msg != null) {
    response.put(msg);
  }
  response.put(RETURN);
  response.flip();
}
Program: 48561
Project: 48561
Buggy source:
public void handle(GetCommand getCommand){
  String key=null;
  try {
    key=URLDecoder.decode(getCommand.getKey(),"String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    throw new HazelcastException(e);
  }
  String mapName=DefaultMapName;
  int index=key.indexOf(':');
  if (index != -1) {
    mapName=MapNamePreceder + key.substring(0,index);
    key=key.substring(index + 1);
  }
  Object value=textCommandService.get(mapName,key);
  MemcacheEntry entry=null;
  if (value != null) {
    if (value instanceof MemcacheEntry) {
      entry=(MemcacheEntry)value;
    }
 else     if (value instanceof byte[]) {
      entry=new MemcacheEntry(getCommand.getKey(),((byte[])value),0);
    }
 else     if (value instanceof String) {
      entry=new MemcacheEntry(getCommand.getKey(),((String)value).getBytes(),0);
    }
 else {
      try {
        entry=new MemcacheEntry(getCommand.getKey(),textCommandService.toByteArray(value),0);
      }
 catch (      Exception e) {
        logger.warning(e);
      }
    }
  }
  if (entry != null) {
    textCommandService.incrementGetHitCount();
  }
 else {
    textCommandService.incrementGetMissCount();
  }
  getCommand.setValue(entry,single);
  textCommandService.sendResponse(getCommand);
}

Fixed version (ground truth):
public void handle(GetCommand getCommand){
  String key=null;
  try {
    key=URLDecoder.decode(getCommand.getKey(),"String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    throw new HazelcastException(e);
  }
  String mapName=DefaultMapName;
  int index=key.indexOf(':');
  if (index != -1) {
    mapName=MapNamePreceder + key.substring(0,index);
    key=key.substring(index + 1);
  }
  Object value=textCommandService.get(mapName,key);
  MemcacheEntry entry=null;
  if (value != null) {
    if (value instanceof MemcacheEntry) {
      entry=(MemcacheEntry)value;
    }
 else     if (value instanceof byte[]) {
      entry=new MemcacheEntry(getCommand.getKey(),((byte[])value),0);
    }
 else     if (value instanceof String) {
      entry=new MemcacheEntry(getCommand.getKey(),stringToBytes((String)value),0);
    }
 else {
      try {
        entry=new MemcacheEntry(getCommand.getKey(),textCommandService.toByteArray(value),0);
      }
 catch (      Exception e) {
        logger.warning(e);
      }
    }
  }
  if (entry != null) {
    textCommandService.incrementGetHitCount();
  }
 else {
    textCommandService.incrementGetMissCount();
  }
  getCommand.setValue(entry,single);
  textCommandService.sendResponse(getCommand);
}
Program: 48563
Project: 48563
Buggy source:
public String toString(){
  return "String_Node_Str" + "String_Node_Str" + new String(bytes) + "String_Node_Str"+ flag+ '}';
}

Fixed version (ground truth):
public String toString(){
  return "String_Node_Str" + "String_Node_Str" + bytesToString(bytes) + "String_Node_Str"+ flag+ '}';
}
Program: 48565
Project: 48565
Buggy source:
private void putInt(byte[] name,int value){
  response.put(STAT);
  response.put(name);
  response.put(String.valueOf(value).getBytes());
  response.put(RETURN);
}

Fixed version (ground truth):
private void putInt(byte[] name,int value){
  response.put(STAT);
  response.put(name);
  response.put(stringToBytes(String.valueOf(value)));
  response.put(RETURN);
}
Program: 48566
Project: 48566
Buggy source:
private void putLong(byte[] name,long value){
  response.put(STAT);
  response.put(name);
  response.put(String.valueOf(value).getBytes());
  response.put(RETURN);
}

Fixed version (ground truth):
private void putLong(byte[] name,long value){
  response.put(STAT);
  response.put(name);
  response.put(stringToBytes(String.valueOf(value)));
  response.put(RETURN);
}
Program: 48567
Project: 48567
Buggy source:
/** 
 * HTTP/1.0 200 OK Date: Fri, 31 Dec 1999 23:59:59 GMT Content-TextCommandType: text/html Content-Length: 1354
 * @param contentType
 * @param value
 */
public void setResponse(byte[] contentType,byte[] value){
  int valueSize=(value == null) ? 0 : value.length;
  byte[] len=String.valueOf(valueSize).getBytes();
  int size=RES_200.length;
  if (contentType != null) {
    size+=CONTENT_TYPE.length;
    size+=contentType.length;
    size+=RETURN.length;
  }
  size+=CONTENT_LENGTH.length;
  size+=len.length;
  size+=RETURN.length;
  size+=RETURN.length;
  size+=valueSize;
  size+=RETURN.length;
  this.response=ByteBuffer.allocate(size);
  response.put(RES_200);
  if (contentType != null) {
    response.put(CONTENT_TYPE);
    response.put(contentType);
    response.put(RETURN);
  }
  response.put(CONTENT_LENGTH);
  response.put(len);
  response.put(RETURN);
  response.put(RETURN);
  if (value != null) {
    response.put(value);
  }
  response.put(RETURN);
  response.flip();
}

Fixed version (ground truth):
/** 
 * HTTP/1.0 200 OK Date: Fri, 31 Dec 1999 23:59:59 GMT Content-TextCommandType: text/html Content-Length: 1354
 * @param contentType
 * @param value
 */
public void setResponse(byte[] contentType,byte[] value){
  int valueSize=(value == null) ? 0 : value.length;
  byte[] len=stringToBytes(String.valueOf(valueSize));
  int size=RES_200.length;
  if (contentType != null) {
    size+=CONTENT_TYPE.length;
    size+=contentType.length;
    size+=RETURN.length;
  }
  size+=CONTENT_LENGTH.length;
  size+=len.length;
  size+=RETURN.length;
  size+=RETURN.length;
  size+=valueSize;
  size+=RETURN.length;
  this.response=ByteBuffer.allocate(size);
  response.put(RES_200);
  if (contentType != null) {
    response.put(CONTENT_TYPE);
    response.put(contentType);
    response.put(RETURN);
  }
  response.put(CONTENT_LENGTH);
  response.put(len);
  response.put(RETURN);
  response.put(RETURN);
  if (value != null) {
    response.put(value);
  }
  response.put(RETURN);
  response.flip();
}
Program: 48569
Project: 48569
Buggy source:
@Override public PortableFactory createFactory(){
  return new PortableFactory(){
    final ConstructorFunction<Integer,Portable> constructors[]=new ConstructorFunction[LENGTH];
{
      constructors[CLIENT_JOB_PROCESS_INFO_REQUEST]=new ConstructorFunction<Integer,Portable>(){
        @Override public Portable createNew(        Integer arg){
          return new ClientJobProcessInformationRequest();
        }
      }
;
      constructors[CLIENT_CANCELLATION_REQUEST]=new ConstructorFunction<Integer,Portable>(){
        @Override public Portable createNew(        Integer arg){
          return new ClientCancellationRequest();
        }
      }
;
      constructors[CLIENT_MAP_REDUCE_REQUEST]=new ConstructorFunction<Integer,Portable>(){
        @Override public Portable createNew(        Integer arg){
          return new ClientMapReduceRequest();
        }
      }
;
      constructors[TRANSFERABLE_PROCESS_INFORMATION]=new ConstructorFunction<Integer,Portable>(){
        @Override public Portable createNew(        Integer arg){
          return new TransferableJobProcessInformation();
        }
      }
;
    }
    public Portable create(    int classId){
      return (classId > 0 && classId <= constructors.length) ? constructors[classId].createNew(classId) : null;
    }
  }
;
}

Fixed version (ground truth):
@Override public PortableFactory createFactory(){
  return new PortableFactory(){
    private final ConstructorFunction<Integer,Portable> constructors[]=new ConstructorFunction[LENGTH];
{
      constructors[CLIENT_JOB_PROCESS_INFO_REQUEST]=new ConstructorFunction<Integer,Portable>(){
        @Override public Portable createNew(        Integer arg){
          return new ClientJobProcessInformationRequest();
        }
      }
;
      constructors[CLIENT_CANCELLATION_REQUEST]=new ConstructorFunction<Integer,Portable>(){
        @Override public Portable createNew(        Integer arg){
          return new ClientCancellationRequest();
        }
      }
;
      constructors[CLIENT_MAP_REDUCE_REQUEST]=new ConstructorFunction<Integer,Portable>(){
        @Override public Portable createNew(        Integer arg){
          return new ClientMapReduceRequest();
        }
      }
;
      constructors[TRANSFERABLE_PROCESS_INFORMATION]=new ConstructorFunction<Integer,Portable>(){
        @Override public Portable createNew(        Integer arg){
          return new TransferableJobProcessInformation();
        }
      }
;
    }
    public Portable create(    int classId){
      return (classId > 0 && classId <= constructors.length) ? constructors[classId].createNew(classId) : null;
    }
  }
;
}
Program: 48570
Project: 48570
Buggy source:
public boolean registerJobSupervisorCancellation(String name,String jobId,Address jobOwner){
  NodeJobTracker jobTracker=(NodeJobTracker)createDistributedObject(name);
  if (jobTracker != null) {
    if (jobTracker.registerJobSupervisorCancellation(jobId) && getLocalAddress().equals(jobOwner)) {
      for (      MemberImpl member : clusterService.getMemberList()) {
        if (!member.getAddress().equals(jobOwner)) {
          try {
            ProcessingOperation operation=new CancelJobSupervisorOperation(name,jobId,jobOwner);
            processRequest(member.getAddress(),operation,name);
          }
 catch (          Exception ignore) {
          }
        }
      }
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean registerJobSupervisorCancellation(String name,String jobId,Address jobOwner){
  NodeJobTracker jobTracker=(NodeJobTracker)createDistributedObject(name);
  if (jobTracker != null) {
    if (jobTracker.registerJobSupervisorCancellation(jobId) && getLocalAddress().equals(jobOwner)) {
      for (      MemberImpl member : clusterService.getMemberList()) {
        if (!member.getAddress().equals(jobOwner)) {
          try {
            ProcessingOperation operation=new CancelJobSupervisorOperation(name,jobId);
            processRequest(member.getAddress(),operation,name);
          }
 catch (          Exception ignore) {
          }
        }
      }
      return true;
    }
  }
  return false;
}
Program: 48571
Project: 48571
Buggy source:
public CancelJobSupervisorOperation(String name,String jobId,Address jobOwner){
  super(name,jobId);
}

Fixed version (ground truth):
public CancelJobSupervisorOperation(String name,String jobId){
  super(name,jobId);
}
Program: 48572
Project: 48572
Buggy source:
private void processReducerFinished0(ReducingFinishedNotification notification){
  String name=configuration.getName();
  String jobId=configuration.getJobId();
  int partitionId=notification.getPartitionId();
  Address reducerAddress=notification.getAddress();
  if (checkPartitionReductionCompleted(partitionId,reducerAddress)) {
    try {
      RequestPartitionResult result=mapReduceService.processRequest(jobOwner,new RequestPartitionProcessed(name,jobId,partitionId,REDUCING),name);
      if (result.getResultState() != SUCCESSFUL) {
        throw new RuntimeException("String_Node_Str" + partitionId);
      }
    }
 catch (    Throwable t) {
      MapReduceUtil.notifyRemoteException(this,t);
    }
  }
}

Fixed version (ground truth):
private void processReducerFinished0(ReducingFinishedNotification notification){
  String name=configuration.getName();
  String jobId=configuration.getJobId();
  int partitionId=notification.getPartitionId();
  Address reducerAddress=notification.getAddress();
  if (checkPartitionReductionCompleted(partitionId,reducerAddress)) {
    try {
      RequestPartitionResult result=mapReduceService.processRequest(jobOwner,new RequestPartitionProcessed(name,jobId,partitionId,REDUCING),name);
      if (result.getResultState() != SUCCESSFUL) {
        throw new RuntimeException("String_Node_Str" + partitionId);
      }
    }
 catch (    Throwable t) {
      MapReduceUtil.notifyRemoteException(this,t);
      if (t instanceof Error) {
        ExceptionUtil.sneakyThrow(t);
      }
    }
  }
}
Program: 48573
Project: 48573
Buggy source:
@Override public void run(){
  try {
    RequestPartitionResult result=mapReduceService.processRequest(supervisor.getJobOwner(),new RequestMemberIdAssignment(name,jobId),name);
    if (result.getResultState() == NO_SUPERVISOR) {
      return;
    }
 else     if (result.getResultState() == NO_MORE_PARTITIONS) {
      return;
    }
    KeyValueSource<KeyIn,ValueIn> delegate=keyValueSource;
    if (supervisor.getConfiguration().isCommunicateStats()) {
      delegate=new KeyValueSourceFacade<KeyIn,ValueIn>(keyValueSource,supervisor);
    }
    delegate.reset();
    delegate.open(nodeEngine);
    DefaultContext<KeyOut,ValueOut> context=supervisor.getOrCreateContext(MapCombineTask.this);
    processMapping(result.getPartitionId(),context,delegate);
    delegate.close();
    finalizeMapping(result.getPartitionId(),context);
  }
 catch (  Throwable t) {
    notifyRemoteException(supervisor,t);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    RequestPartitionResult result=mapReduceService.processRequest(supervisor.getJobOwner(),new RequestMemberIdAssignment(name,jobId),name);
    if (result.getResultState() == NO_SUPERVISOR) {
      return;
    }
 else     if (result.getResultState() == NO_MORE_PARTITIONS) {
      return;
    }
    KeyValueSource<KeyIn,ValueIn> delegate=keyValueSource;
    if (supervisor.getConfiguration().isCommunicateStats()) {
      delegate=new KeyValueSourceFacade<KeyIn,ValueIn>(keyValueSource,supervisor);
    }
    delegate.reset();
    delegate.open(nodeEngine);
    DefaultContext<KeyOut,ValueOut> context=supervisor.getOrCreateContext(MapCombineTask.this);
    processMapping(result.getPartitionId(),context,delegate);
    delegate.close();
    finalizeMapping(result.getPartitionId(),context);
  }
 catch (  Throwable t) {
    notifyRemoteException(supervisor,t);
    if (t instanceof Error) {
      ExceptionUtil.sneakyThrow(t);
    }
  }
}
Program: 48574
Project: 48574
Buggy source:
@Override public void run(){
  try {
    ReducerChunk<Key,Chunk> reducerChunk;
    while ((reducerChunk=reducerQueue.poll()) != null) {
      if (cancelled.get()) {
        return;
      }
      reduceChunk(reducerChunk.chunk);
      processProcessedState(reducerChunk);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    active.compareAndSet(true,false);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    ReducerChunk<Key,Chunk> reducerChunk;
    while ((reducerChunk=reducerQueue.poll()) != null) {
      if (cancelled.get()) {
        return;
      }
      reduceChunk(reducerChunk.chunk);
      processProcessedState(reducerChunk);
    }
  }
 catch (  Throwable t) {
    notifyRemoteException(supervisor,t);
    if (t instanceof Error) {
      ExceptionUtil.sneakyThrow(t);
    }
  }
 finally {
    active.compareAndSet(true,false);
  }
}
Program: 48575
Project: 48575
Buggy source:
@Override public V get(long timeout,TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
  ValidationUtil.isNotNull(unit,"String_Node_Str");
  long deadline=timeout == 0L ? -1 : Clock.currentTimeMillis() + unit.toMillis(timeout);
  for (; ; ) {
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      throw e;
    }
    if (isDone()) {
      break;
    }
    long delta=deadline - Clock.currentTimeMillis();
    if (delta <= 0L) {
      throw new TimeoutException("String_Node_Str");
    }
  }
  return getResult();
}

Fixed version (ground truth):
@Override public V get(long timeout,TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
  ValidationUtil.isNotNull(unit,"String_Node_Str");
  long deadline=timeout == 0L ? -1 : Clock.currentTimeMillis() + unit.toMillis(timeout);
  for (; ; ) {
    Thread.sleep(100);
    if (isDone()) {
      break;
    }
    long delta=deadline - Clock.currentTimeMillis();
    if (delta <= 0L) {
      throw new TimeoutException("String_Node_Str");
    }
  }
  return getResult();
}
Program: 48576
Project: 48576
Buggy source:
private void cancelRemoteOperations(Set<Address> addresses){
  String name=getConfiguration().getName();
  String jobId=getConfiguration().getJobId();
  for (  Address address : addresses) {
    try {
      CancelJobSupervisorOperation operation=new CancelJobSupervisorOperation(name,jobId,jobOwner);
      mapReduceService.processRequest(address,operation,name);
    }
 catch (    Exception ignore) {
    }
  }
}

Fixed version (ground truth):
private void cancelRemoteOperations(Set<Address> addresses){
  String name=getConfiguration().getName();
  String jobId=getConfiguration().getJobId();
  for (  Address address : addresses) {
    try {
      CancelJobSupervisorOperation operation=new CancelJobSupervisorOperation(name,jobId);
      mapReduceService.processRequest(address,operation,name);
    }
 catch (    Exception ignore) {
    }
  }
}
Program: 48577
Project: 48577
Buggy source:
public Connection newConnection(Address address,Authenticator authenticator) throws IOException ;

Fixed version (ground truth):
public Connection newConnection(Address address,Authenticator authenticator,boolean ownerConnection) throws IOException ;
Program: 48578
Project: 48578
Buggy source:
public ConnectionImpl(Address address,SocketOptions options,SerializationService serializationService) throws IOException {
  final InetSocketAddress isa=address.getInetSocketAddress();
  SocketFactory socketFactory=options.getSocketFactory();
  if (socketFactory == null) {
    socketFactory=new DefaultSocketFactory();
  }
  final Socket socket=socketFactory.createSocket();
  try {
    socket.setKeepAlive(options.isKeepAlive());
    socket.setTcpNoDelay(options.isTcpNoDelay());
    socket.setReuseAddress(options.isReuseAddress());
    if (options.getLingerSeconds() > 0) {
      socket.setSoLinger(true,options.getLingerSeconds());
    }
    if (options.getTimeout() > 0) {
      socket.setSoTimeout(options.getTimeout());
    }
    int bufferSize=options.getBufferSize() * 1024;
    if (bufferSize < 0) {
      bufferSize=BUFFER_SIZE;
    }
    socket.setSendBufferSize(bufferSize);
    socket.setReceiveBufferSize(bufferSize);
    socket.connect(isa,3000);
    this.socket=socket;
    out=serializationService.createObjectDataOutputStream(new BufferedOutputStream(socket.getOutputStream(),bufferSize));
    in=serializationService.createObjectDataInputStream(new BufferedInputStream(socket.getInputStream(),bufferSize));
  }
 catch (  IOException e) {
    socket.close();
    throw e;
  }
}

Fixed version (ground truth):
public ConnectionImpl(Address address,SocketOptions options,SerializationService serializationService,boolean ownerConnection) throws IOException {
  final InetSocketAddress isa=address.getInetSocketAddress();
  SocketFactory socketFactory=options.getSocketFactory();
  if (socketFactory == null) {
    socketFactory=new DefaultSocketFactory();
  }
  final Socket socket=socketFactory.createSocket();
  try {
    socket.setKeepAlive(options.isKeepAlive());
    socket.setTcpNoDelay(options.isTcpNoDelay());
    socket.setReuseAddress(options.isReuseAddress());
    if (options.getLingerSeconds() > 0) {
      socket.setSoLinger(true,options.getLingerSeconds());
    }
    if (options.getTimeout() > 0 && !ownerConnection) {
      socket.setSoTimeout(options.getTimeout());
    }
    int bufferSize=options.getBufferSize() * 1024;
    if (bufferSize < 0) {
      bufferSize=BUFFER_SIZE;
    }
    socket.setSendBufferSize(bufferSize);
    socket.setReceiveBufferSize(bufferSize);
    socket.connect(isa,3000);
    this.socket=socket;
    out=serializationService.createObjectDataOutputStream(new BufferedOutputStream(socket.getOutputStream(),bufferSize));
    in=serializationService.createObjectDataInputStream(new BufferedInputStream(socket.getInputStream(),bufferSize));
  }
 catch (  IOException e) {
    socket.close();
    throw e;
  }
}
Program: 48579
Project: 48579
Buggy source:
public ObjectPool<ConnectionWrapper> createNew(final Address address){
  return new QueueBasedObjectPool<ConnectionWrapper>(poolSize,new Factory<ConnectionWrapper>(){
    public ConnectionWrapper create() throws IOException {
      return new ConnectionWrapper(newConnection(address,authenticator));
    }
  }
,new Destructor<ConnectionWrapper>(){
    public void destroy(    ConnectionWrapper connection){
      connection.close();
    }
  }
);
}

Fixed version (ground truth):
public ObjectPool<ConnectionWrapper> createNew(final Address address){
  return new QueueBasedObjectPool<ConnectionWrapper>(poolSize,new Factory<ConnectionWrapper>(){
    public ConnectionWrapper create() throws IOException {
      return new ConnectionWrapper(newConnection(address,authenticator,false));
    }
  }
,new Destructor<ConnectionWrapper>(){
    public void destroy(    ConnectionWrapper connection){
      connection.close();
    }
  }
);
}
Program: 48580
Project: 48580
Buggy source:
public Connection newConnection(Address address,Authenticator authenticator) throws IOException {
  checkLive();
  final ConnectionImpl connection=new ConnectionImpl(address,socketOptions,client.getSerializationService());
  if (socketInterceptor != null) {
    socketInterceptor.onConnect(connection.getSocket());
  }
  connection.init();
  authenticator.auth(connection);
  return connection;
}

Fixed version (ground truth):
public Connection newConnection(Address address,Authenticator authenticator,boolean ownerConnection) throws IOException {
  checkLive();
  final ConnectionImpl connection=new ConnectionImpl(address,socketOptions,client.getSerializationService(),ownerConnection);
  if (socketInterceptor != null) {
    socketInterceptor.onConnect(connection.getSocket());
  }
  connection.init();
  authenticator.auth(connection);
  return connection;
}
Program: 48581
Project: 48581
Buggy source:
public ConnectionWrapper create() throws IOException {
  return new ConnectionWrapper(newConnection(address,authenticator));
}

Fixed version (ground truth):
public ConnectionWrapper create() throws IOException {
  return new ConnectionWrapper(newConnection(address,authenticator,false));
}
Program: 48582
Project: 48582
Buggy source:
private Connection connectToOne(final Collection<InetSocketAddress> socketAddresses) throws Exception {
  final int connectionAttemptLimit=getClientConfig().getConnectionAttemptLimit();
  final ManagerAuthenticator authenticator=new ManagerAuthenticator();
  int attempt=0;
  Throwable lastError=null;
  while (true) {
    final long nextTry=Clock.currentTimeMillis() + getClientConfig().getConnectionAttemptPeriod();
    for (    InetSocketAddress isa : socketAddresses) {
      Address address=new Address(isa);
      try {
        final Connection connection=getConnectionManager().firstConnection(address,authenticator);
        active=true;
        fireConnectionEvent(false);
        return connection;
      }
 catch (      IOException e) {
        active=false;
        lastError=e;
        logger.finest("String_Node_Str",e);
      }
catch (      AuthenticationException e) {
        active=false;
        lastError=e;
        logger.warning("String_Node_Str" + address,e);
      }
    }
    if (attempt++ >= connectionAttemptLimit) {
      break;
    }
    final long remainingTime=nextTry - Clock.currentTimeMillis();
    logger.warning(String.format("String_Node_Str" + "String_Node_Str",Math.max(0,remainingTime),attempt,connectionAttemptLimit));
    if (remainingTime > 0) {
      try {
        Thread.sleep(remainingTime);
      }
 catch (      InterruptedException e) {
        break;
      }
    }
  }
  throw new IllegalStateException("String_Node_Str",lastError);
}

Fixed version (ground truth):
private Connection connectToOne(final Collection<InetSocketAddress> socketAddresses) throws Exception {
  final int connectionAttemptLimit=getClientConfig().getConnectionAttemptLimit();
  final ManagerAuthenticator authenticator=new ManagerAuthenticator();
  int attempt=0;
  Throwable lastError=null;
  while (true) {
    final long nextTry=Clock.currentTimeMillis() + getClientConfig().getConnectionAttemptPeriod();
    for (    InetSocketAddress isa : socketAddresses) {
      Address address=new Address(isa);
      try {
        final Connection connection=getConnectionManager().newConnection(address,authenticator,true);
        active=true;
        fireConnectionEvent(false);
        return connection;
      }
 catch (      IOException e) {
        active=false;
        lastError=e;
        logger.finest("String_Node_Str",e);
      }
catch (      AuthenticationException e) {
        active=false;
        lastError=e;
        logger.warning("String_Node_Str" + address,e);
      }
    }
    if (attempt++ >= connectionAttemptLimit) {
      break;
    }
    final long remainingTime=nextTry - Clock.currentTimeMillis();
    logger.warning(String.format("String_Node_Str" + "String_Node_Str",Math.max(0,remainingTime),attempt,connectionAttemptLimit));
    if (remainingTime > 0) {
      try {
        Thread.sleep(remainingTime);
      }
 catch (      InterruptedException e) {
        break;
      }
    }
  }
  throw new IllegalStateException("String_Node_Str",lastError);
}
Program: 48583
Project: 48583
Buggy source:
public final void processMapping(int partitionId,KeyValueSource<KeyIn,ValueIn> keyValueSource) throws Exception {
  DefaultContext<KeyOut,ValueOut> context=supervisor.createContext(this);
  context.setPartitionId(partitionId);
  if (mapper instanceof LifecycleMapper) {
    ((LifecycleMapper)mapper).initialize(context);
  }
  mappingPhase.executeMappingPhase(keyValueSource,mapper,context);
  if (mapper instanceof LifecycleMapper) {
    ((LifecycleMapper)mapper).finalized(context);
  }
  if (cancelled.get()) {
    return;
  }
  RequestPartitionResult result=mapReduceService.processRequest(supervisor.getJobOwner(),new RequestPartitionReducing(name,jobId,partitionId),name);
  if (result.getResultState() == SUCCESSFUL) {
    if (supervisor.getConfiguration().getReducerFactory() != null) {
      Map<KeyOut,Chunk> chunkMap=context.finish();
      if (chunkMap.size() > 0) {
        sendLastChunkToAssignedReducers(partitionId,chunkMap);
      }
 else {
        result=mapReduceService.processRequest(supervisor.getJobOwner(),new RequestPartitionProcessed(name,jobId,partitionId,REDUCING),name);
        if (result.getResultState() != SUCCESSFUL) {
          throw new RuntimeException("String_Node_Str" + partitionId);
        }
      }
    }
  }
}

Fixed version (ground truth):
public final void processMapping(int partitionId,DefaultContext<KeyOut,ValueOut> context,KeyValueSource<KeyIn,ValueIn> keyValueSource) throws Exception {
  context.setPartitionId(partitionId);
  if (mapper instanceof LifecycleMapper) {
    ((LifecycleMapper)mapper).initialize(context);
  }
  mappingPhase.executeMappingPhase(keyValueSource,mapper,context);
  if (mapper instanceof LifecycleMapper) {
    ((LifecycleMapper)mapper).finalized(context);
  }
  if (cancelled.get()) {
    return;
  }
}
Program: 48584
Project: 48584
Buggy source:
@Override public void run(){
  try {
    RequestPartitionResult result=mapReduceService.processRequest(supervisor.getJobOwner(),new RequestMemberIdAssignment(name,jobId),name);
    if (result.getResultState() == NO_SUPERVISOR) {
      return;
    }
 else     if (result.getResultState() == NO_MORE_PARTITIONS) {
      return;
    }
    KeyValueSource<KeyIn,ValueIn> delegate=keyValueSource;
    if (supervisor.getConfiguration().isCommunicateStats()) {
      delegate=new KeyValueSourceFacade<KeyIn,ValueIn>(keyValueSource,supervisor);
    }
    delegate.reset();
    delegate.open(nodeEngine);
    processMapping(result.getPartitionId(),delegate);
    delegate.close();
  }
 catch (  Throwable t) {
    notifyRemoteException(supervisor,t);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    RequestPartitionResult result=mapReduceService.processRequest(supervisor.getJobOwner(),new RequestMemberIdAssignment(name,jobId),name);
    if (result.getResultState() == NO_SUPERVISOR) {
      return;
    }
 else     if (result.getResultState() == NO_MORE_PARTITIONS) {
      return;
    }
    KeyValueSource<KeyIn,ValueIn> delegate=keyValueSource;
    if (supervisor.getConfiguration().isCommunicateStats()) {
      delegate=new KeyValueSourceFacade<KeyIn,ValueIn>(keyValueSource,supervisor);
    }
    delegate.reset();
    delegate.open(nodeEngine);
    DefaultContext<KeyOut,ValueOut> context=supervisor.getOrCreateContext(MapCombineTask.this);
    processMapping(result.getPartitionId(),context,delegate);
    delegate.close();
    finalizeMapping(result.getPartitionId(),context);
  }
 catch (  Throwable t) {
    notifyRemoteException(supervisor,t);
  }
}
Program: 48585
Project: 48585
Buggy source:
@Test(timeout=60000) public void testMapperReducerChunked() throws Exception {
  TestHazelcastInstanceFactory nodeFactory=createHazelcastInstanceFactory(3);
  HazelcastInstance h1=nodeFactory.newHazelcastInstance();
  HazelcastInstance h2=nodeFactory.newHazelcastInstance();
  HazelcastInstance h3=nodeFactory.newHazelcastInstance();
  IMap<Integer,Integer> m1=h1.getMap(MAP_NAME);
  for (int i=0; i < 10000; i++) {
    m1.put(i,i);
  }
  JobTracker tracker=h1.getJobTracker("String_Node_Str");
  Job<Integer,Integer> job=tracker.newJob(KeyValueSource.fromMap(m1));
  JobCompletableFuture<Map<String,Integer>> future=job.chunkSize(10).mapper(new GroupingTestMapper()).reducer(new TestReducerFactory()).submit();
  final TrackableJob trackableJob=tracker.getTrackableJob(future.getJobId());
  final JobProcessInformation processInformation=trackableJob.getJobProcessInformation();
  Map<String,Integer> result=future.get();
  int[] expectedResults=new int[4];
  for (int i=0; i < 10000; i++) {
    int index=i % 4;
    expectedResults[index]+=i;
  }
  for (int i=0; i < 4; i++) {
    assertEquals(expectedResults[i],(int)result.get(String.valueOf(i)));
  }
  assertTrueEventually(new AssertTask(){
    @Override public void run(){
      assertEquals(10000,processInformation.getProcessedRecords());
    }
  }
);
}

Fixed version (ground truth):
@Test(timeout=60000) public void testMapperReducerChunked() throws Exception {
  TestHazelcastInstanceFactory nodeFactory=createHazelcastInstanceFactory(3);
  final HazelcastInstance h1=nodeFactory.newHazelcastInstance();
  final HazelcastInstance h2=nodeFactory.newHazelcastInstance();
  final HazelcastInstance h3=nodeFactory.newHazelcastInstance();
  assertTrueEventually(new AssertTask(){
    @Override public void run(){
      assertEquals(3,h1.getCluster().getMembers().size());
    }
  }
);
  final IMap<Integer,Integer> m1=h1.getMap(MAP_NAME);
  for (int i=0; i < 10000; i++) {
    m1.put(i,i);
  }
  JobTracker tracker=h1.getJobTracker("String_Node_Str");
  Job<Integer,Integer> job=tracker.newJob(KeyValueSource.fromMap(m1));
  JobCompletableFuture<Map<String,Integer>> future=job.chunkSize(10).mapper(new GroupingTestMapper()).reducer(new TestReducerFactory()).submit();
  final TrackableJob trackableJob=tracker.getTrackableJob(future.getJobId());
  final JobProcessInformation processInformation=trackableJob.getJobProcessInformation();
  Map<String,Integer> result=future.get();
  int[] expectedResults=new int[4];
  for (int i=0; i < 10000; i++) {
    int index=i % 4;
    expectedResults[index]+=i;
  }
  for (int i=0; i < 4; i++) {
    assertEquals(expectedResults[i],(int)result.get(String.valueOf(i)));
  }
  assertTrueEventually(new AssertTask(){
    @Override public void run(){
      if (processInformation.getProcessedRecords() < 10000) {
        System.err.println(processInformation.getProcessedRecords());
      }
      assertEquals(10000,processInformation.getProcessedRecords());
    }
  }
);
}
Program: 48586
Project: 48586
Buggy source:
@Override public void run(){
  assertEquals(10000,processInformation.getProcessedRecords());
}

Fixed version (ground truth):
@Override public void run(){
  if (processInformation.getProcessedRecords() < 10000) {
    System.err.println(processInformation.getProcessedRecords());
  }
  assertEquals(10000,processInformation.getProcessedRecords());
}
Program: 48587
Project: 48587
Buggy source:
public void run(){
  final NodeEngine nodeEngine=mapService.getNodeEngine();
  try {
    Map values=mapContainer.getStore().loadAll(keys.values());
    if (values == null || values.isEmpty()) {
      if (checkIfMapLoaded.decrementAndGet() == 0) {
        loaded.set(true);
      }
      return;
    }
    MapEntrySet entrySet=new MapEntrySet();
    for (    Data dataKey : keys.keySet()) {
      Object key=keys.get(dataKey);
      Object value=values.get(key);
      if (value != null) {
        Data dataValue=mapService.toData(value);
        entrySet.add(dataKey,dataValue);
      }
    }
    PutAllOperation operation=new PutAllOperation(name,entrySet,true);
    operation.setNodeEngine(nodeEngine);
    operation.setResponseHandler(new ResponseHandler(){
      @Override public void sendResponse(      Object obj){
        if (checkIfMapLoaded.decrementAndGet() == 0) {
          loaded.set(true);
        }
      }
      public boolean isLocal(){
        return true;
      }
    }
);
    operation.setPartitionId(partitionId);
    OperationAccessor.setCallerAddress(operation,nodeEngine.getThisAddress());
    operation.setServiceName(MapService.SERVICE_NAME);
    nodeEngine.getOperationService().executeOperation(operation);
  }
 catch (  Exception e) {
    logger.warning("String_Node_Str" + e.toString());
  }
}

Fixed version (ground truth):
public void run(){
  final NodeEngine nodeEngine=mapService.getNodeEngine();
  try {
    Map values=mapContainer.getStore().loadAll(keys.values());
    if (values == null || values.isEmpty()) {
      if (checkIfMapLoaded.decrementAndGet() == 0) {
        loaded.set(true);
      }
      return;
    }
    MapEntrySet entrySet=new MapEntrySet();
    for (    Data dataKey : keys.keySet()) {
      Object key=keys.get(dataKey);
      Object value=values.get(key);
      if (value != null) {
        Data dataValue=mapService.toData(value);
        entrySet.add(dataKey,dataValue);
      }
    }
    PutAllOperation operation=new PutAllOperation(name,entrySet,true);
    operation.setNodeEngine(nodeEngine);
    operation.setResponseHandler(new ResponseHandler(){
      @Override public void sendResponse(      Object obj){
        if (checkIfMapLoaded.decrementAndGet() == 0) {
          loaded.set(true);
        }
      }
      public boolean isLocal(){
        return true;
      }
    }
);
    operation.setPartitionId(partitionId);
    OperationAccessor.setCallerAddress(operation,nodeEngine.getThisAddress());
    operation.setCallerUuid(nodeEngine.getLocalMember().getUuid());
    operation.setServiceName(MapService.SERVICE_NAME);
    nodeEngine.getOperationService().executeOperation(operation);
  }
 catch (  Exception e) {
    logger.warning("String_Node_Str" + e.toString());
  }
}
Program: 48588
Project: 48588
Buggy source:
private void scheduleBackup(Operation op,Backup backup,int partitionId,int replicaIndex){
  final RemoteCallKey key=new RemoteCallKey(op.getCallerAddress(),op.getCallerUuid(),op.getCallId());
  if (logger.isFinestEnabled()) {
    logger.finest("String_Node_Str" + backup);
  }
  backupScheduler.schedule(500,key,new ScheduledBackup(backup,partitionId,replicaIndex));
}

Fixed version (ground truth):
private void scheduleBackup(Operation op,Backup backup,int partitionId,int replicaIndex){
  final RemoteCallKey key=new RemoteCallKey(op);
  if (logger.isFinestEnabled()) {
    logger.finest("String_Node_Str" + backup);
  }
  backupScheduler.schedule(500,key,new ScheduledBackup(backup,partitionId,replicaIndex));
}
Program: 48589
Project: 48589
Buggy source:
private RemoteCallKey(Address callerAddress,String callerUuid,long callId){
  this.callerAddress=callerAddress;
  this.callerUuid=callerUuid;
  this.callId=callId;
}

Fixed version (ground truth):
private RemoteCallKey(final Operation op){
  callerUuid=op.getCallerUuid();
  if (callerUuid == null) {
    throw new IllegalArgumentException("String_Node_Str" + op);
  }
  callerAddress=op.getCallerAddress();
  if (callerAddress == null) {
    throw new IllegalArgumentException("String_Node_Str" + op);
  }
  callId=op.getCallId();
}
Program: 48590
Project: 48590
Buggy source:
private RemoteCallKey beforeCallExecution(Operation op){
  RemoteCallKey callKey=null;
  if (op.getCallId() != 0 && op.returnsResponse()) {
    callKey=new RemoteCallKey(op.getCallerAddress(),op.getCallerUuid(),op.getCallId());
    RemoteCallKey current;
    if ((current=executingCalls.put(callKey,callKey)) != null) {
      logger.warning("String_Node_Str" + callKey + "String_Node_Str"+ current+ "String_Node_Str"+ op.getClass().getName());
    }
  }
  return callKey;
}

Fixed version (ground truth):
private RemoteCallKey beforeCallExecution(Operation op){
  RemoteCallKey callKey=null;
  if (op.getCallId() != 0 && op.returnsResponse()) {
    callKey=new RemoteCallKey(op);
    RemoteCallKey current;
    if ((current=executingCalls.put(callKey,callKey)) != null) {
      logger.warning("String_Node_Str" + callKey + "String_Node_Str"+ current+ "String_Node_Str"+ op.getClass().getName());
    }
  }
  return callKey;
}