nus-yam/ex-repair huggingface dataset:
Program: 49288
Project: 49288
Buggy source:
public ClassDefinitionBuilder addBooleanField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.BOOLEAN));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addBooleanField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.BOOLEAN));
  return this;
}
Program: 49289
Project: 49289
Buggy source:
public ClassDefinitionBuilder addFloatArrayField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.FLOAT_ARRAY));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addFloatArrayField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.FLOAT_ARRAY));
  return this;
}
Program: 49290
Project: 49290
Buggy source:
public ClassDefinitionBuilder addCharField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.CHAR));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addCharField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.CHAR));
  return this;
}
Program: 49291
Project: 49291
Buggy source:
public ClassDefinitionBuilder addLongArrayField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.LONG_ARRAY));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addLongArrayField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.LONG_ARRAY));
  return this;
}
Program: 49292
Project: 49292
Buggy source:
private void check(){
  if (done) {
    throw new HazelcastSerializationException("String_Node_Str" + cd.getClassId());
  }
}

Fixed version (ground truth):
private void check(){
  if (done) {
    throw new HazelcastSerializationException("String_Node_Str" + classId);
  }
}
Program: 49293
Project: 49293
Buggy source:
public ClassDefinitionBuilder addFloatField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.FLOAT));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addFloatField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.FLOAT));
  return this;
}
Program: 49294
Project: 49294
Buggy source:
public ClassDefinitionBuilder addByteField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.BYTE));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addByteField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.BYTE));
  return this;
}
Program: 49295
Project: 49295
Buggy source:
public ClassDefinitionBuilder addShortArrayField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.SHORT_ARRAY));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addShortArrayField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.SHORT_ARRAY));
  return this;
}
Program: 49296
Project: 49296
Buggy source:
public ClassDefinitionBuilder addDoubleArrayField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.DOUBLE_ARRAY));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addDoubleArrayField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.DOUBLE_ARRAY));
  return this;
}
Program: 49297
Project: 49297
Buggy source:
public ClassDefinitionBuilder addUTFField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.UTF));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addUTFField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.UTF));
  return this;
}
Program: 49298
Project: 49298
Buggy source:
public ClassDefinition build(){
  done=true;
  return cd;
}

Fixed version (ground truth):
public ClassDefinition build(){
  done=true;
  final ClassDefinitionImpl cd=new ClassDefinitionImpl(factoryId,classId);
  for (  FieldDefinition fd : fieldDefinitions) {
    cd.addFieldDef(fd);
  }
  for (  ClassDefinition nestedCd : nestedClassDefinitions) {
    cd.addClassDef(nestedCd);
  }
  return cd;
}
Program: 49299
Project: 49299
Buggy source:
public ClassDefinitionBuilder addIntField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.INT));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addIntField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.INT));
  return this;
}
Program: 49300
Project: 49300
Buggy source:
public ClassDefinitionBuilder addLongField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.LONG));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addLongField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.LONG));
  return this;
}
Program: 49301
Project: 49301
Buggy source:
public ClassDefinitionBuilder addIntArrayField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.INT_ARRAY));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addIntArrayField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.INT_ARRAY));
  return this;
}
Program: 49302
Project: 49302
Buggy source:
public ClassDefinitionBuilder addCharArrayField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.CHAR_ARRAY));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addCharArrayField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.CHAR_ARRAY));
  return this;
}
Program: 49303
Project: 49303
Buggy source:
public ClassDefinitionBuilder addDoubleField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.DOUBLE));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addDoubleField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.DOUBLE));
  return this;
}
Program: 49304
Project: 49304
Buggy source:
public ClassDefinitionBuilder addShortField(String fieldName){
  check();
  cd.add(new FieldDefinitionImpl(index++,fieldName,FieldType.SHORT));
  return this;
}

Fixed version (ground truth):
public ClassDefinitionBuilder addShortField(String fieldName){
  check();
  fieldDefinitions.add(new FieldDefinitionImpl(index++,fieldName,FieldType.SHORT));
  return this;
}
Program: 49305
Project: 49305
Buggy source:
public ClassDefinitionBuilder(int factoryId,int classId){
  cd=new ClassDefinitionImpl(factoryId,classId);
}

Fixed version (ground truth):
public ClassDefinitionBuilder(int factoryId,int classId){
  this.factoryId=factoryId;
  this.classId=classId;
}
Program: 49306
Project: 49306
Buggy source:
public void readData(ObjectDataInput in) throws IOException {
  factoryId=in.readInt();
  classId=in.readInt();
  version=in.readInt();
  int size=in.readInt();
  for (int i=0; i < size; i++) {
    FieldDefinitionImpl fieldDefinition=new FieldDefinitionImpl();
    fieldDefinition.readData(in);
    add(fieldDefinition);
  }
  size=in.readInt();
  for (int i=0; i < size; i++) {
    ClassDefinitionImpl classDefinition=new ClassDefinitionImpl();
    classDefinition.readData(in);
    add(classDefinition);
  }
}

Fixed version (ground truth):
public void readData(ObjectDataInput in) throws IOException {
  factoryId=in.readInt();
  classId=in.readInt();
  version=in.readInt();
  int size=in.readInt();
  for (int i=0; i < size; i++) {
    FieldDefinitionImpl fieldDefinition=new FieldDefinitionImpl();
    fieldDefinition.readData(in);
    addFieldDef(fieldDefinition);
  }
  size=in.readInt();
  for (int i=0; i < size; i++) {
    ClassDefinitionImpl classDefinition=new ClassDefinitionImpl();
    classDefinition.readData(in);
    addClassDef(classDefinition);
  }
}
Program: 49307
Project: 49307
Buggy source:
public void writePortableArray(String fieldName,Portable[] portables) throws IOException {
  if (portables == null || portables.length == 0) {
    throw new HazelcastSerializationException("String_Node_Str" + "String_Node_Str");
  }
  final Portable p=portables[0];
  final int classId=p.getClassId();
  for (int i=1; i < portables.length; i++) {
    if (portables[i].getClassId() != classId) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
  builder.addPortableArrayField(fieldName,p.getFactoryId(),classId);
  addNestedField(p,new ClassDefinitionBuilder(p.getFactoryId(),classId));
}

Fixed version (ground truth):
public void writePortableArray(String fieldName,Portable[] portables) throws IOException {
  if (portables == null || portables.length == 0) {
    throw new HazelcastSerializationException("String_Node_Str" + "String_Node_Str");
  }
  final Portable p=portables[0];
  final int classId=p.getClassId();
  for (int i=1; i < portables.length; i++) {
    if (portables[i].getClassId() != classId) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
  final ClassDefinition nestedClassDef=createNestedClassDef(p,new ClassDefinitionBuilder(p.getFactoryId(),classId));
  builder.addPortableArrayField(fieldName,nestedClassDef);
}
Program: 49308
Project: 49308
Buggy source:
private void writePortable(String fieldName,int factoryId,int classId,Portable portable) throws IOException {
  builder.addPortableField(fieldName,factoryId,classId);
  if (portable != null) {
    addNestedField(portable,new ClassDefinitionBuilder(portable.getFactoryId(),classId));
  }
 else   if (context.lookup(factoryId,classId) == null) {
    throw new HazelcastSerializationException("String_Node_Str" + "String_Node_Str");
  }
}

Fixed version (ground truth):
private void writePortable(String fieldName,int factoryId,int classId,Portable portable) throws IOException {
  final ClassDefinition nestedClassDef;
  if (portable != null) {
    nestedClassDef=createNestedClassDef(portable,new ClassDefinitionBuilder(factoryId,classId));
  }
 else {
    nestedClassDef=context.lookup(factoryId,classId);
    if (nestedClassDef == null) {
      throw new HazelcastSerializationException("String_Node_Str" + "String_Node_Str");
    }
  }
  builder.addPortableField(fieldName,nestedClassDef);
}
Program: 49309
Project: 49309
Buggy source:
public IdentifiedDataSerializable create(int typeId){
switch (typeId) {
case GET_ALL_PARTITIONS:
    return new GetAllPartitionsRequest();
case GET_PARTITION:
  return new GetPartitionRequest();
case ADD_LISTENER:
return new AddMembershipListenerRequest();
}
return null;
}

Fixed version (ground truth):
public IdentifiedDataSerializable create(int typeId){
switch (typeId) {
case GET_PARTITIONS:
    return new GetPartitionsRequest();
case PARTITIONS:
  return new PartitionsResponse();
case ADD_LISTENER:
return new AddMigrationListenerRequest();
}
return null;
}
Program: 49310
Project: 49310
Buggy source:
public DataSerializableFactory createFactory(){
  return new DataSerializableFactory(){
    public IdentifiedDataSerializable create(    int typeId){
switch (typeId) {
case GET_ALL_PARTITIONS:
        return new GetAllPartitionsRequest();
case GET_PARTITION:
      return new GetPartitionRequest();
case ADD_LISTENER:
    return new AddMembershipListenerRequest();
}
return null;
}
}
;
}

Fixed version (ground truth):
public DataSerializableFactory createFactory(){
  return new DataSerializableFactory(){
    public IdentifiedDataSerializable create(    int typeId){
switch (typeId) {
case GET_PARTITIONS:
        return new GetPartitionsRequest();
case PARTITIONS:
      return new PartitionsResponse();
case ADD_LISTENER:
    return new AddMigrationListenerRequest();
}
return null;
}
}
;
}
Program: 49311
Project: 49311
Buggy source:
public boolean containsKey(String name,Object key){
  this.keyObject=key;
  this.nearCache=mapCaches.get(name);
  Data dataKey=toData(key);
  if (nearCache != null) {
    if (nearCache.containsKey(key)) {
      return true;
    }
  }
  final CMap cMap=maps.get(name);
  if (cMap != null) {
    Record record=cMap.getOwnedRecord(dataKey);
    if (record != null && record.isActive() && record.isValid() && record.hasValueData()) {
      if (cMap.isReadBackupData()) {
        return true;
      }
 else {
        PartitionServiceImpl.PartitionProxy partition=partitionServiceImpl.getPartition(record.getBlockId());
        if (partition != null && !partitionManager.isOwnedPartitionMigrating(partition.getPartitionId()) && partition.getOwner() != null && partition.getOwner().localMember()) {
          return true;
        }
      }
    }
  }
  return booleanCall(CONCURRENT_MAP_CONTAINS_KEY,name,dataKey,null,0,-1);
}

Fixed version (ground truth):
public boolean containsKey(String name,Object key){
  this.keyObject=key;
  this.nearCache=mapCaches.get(name);
  Data dataKey=toData(key);
  if (nearCache != null) {
    if (nearCache.containsKey(key)) {
      return true;
    }
  }
  final CMap cMap=maps.get(name);
  if (cMap != null) {
    Record record=cMap.getOwnedRecord(dataKey);
    if (record != null && record.isActive() && record.isValid() && record.hasValueData()) {
      if (cMap.isReadBackupData()) {
        record.setLastAccessed();
        return true;
      }
 else {
        PartitionServiceImpl.PartitionProxy partition=partitionServiceImpl.getPartition(record.getBlockId());
        if (partition != null && !partitionManager.isOwnedPartitionMigrating(partition.getPartitionId()) && partition.getOwner() != null && partition.getOwner().localMember()) {
          record.setLastAccessed();
          return true;
        }
      }
    }
  }
  return booleanCall(CONCURRENT_MAP_CONTAINS_KEY,name,dataKey,null,0,-1);
}
Program: 49312
Project: 49312
Buggy source:
public void run(){
  final Connection conn=packet.getConn();
  try {
    final ClientEndpoint endpoint=getEndpoint(conn);
    currentEndpoint.set(endpoint);
    final Data data=packet.getData();
    final ClientRequest request=(ClientRequest)serializationService.toObject(data);
    if (endpoint.isAuthenticated() || request instanceof ClientAuthenticationRequest) {
      request.setConnection(conn);
      request.setService(nodeEngine.getService(request.getServiceName()));
      request.setClientEngine(ClientEngineImpl.this);
      final Object result=request.process();
      final Data resultData=result != null ? serializationService.toData(result) : new Data();
      sendResponse(conn,resultData);
    }
 else {
      String message="String_Node_Str" + conn + "String_Node_Str";
      logger.log(Level.SEVERE,message);
      sendResponse(conn,new GenericError(message,0));
      removeEndpoint(conn);
    }
  }
 catch (  Throwable e) {
    logger.log(Level.SEVERE,e.getMessage(),e);
  }
 finally {
    currentEndpoint.set(null);
  }
}

Fixed version (ground truth):
public void run(){
  final Connection conn=packet.getConn();
  try {
    final ClientEndpoint endpoint=getEndpoint(conn);
    currentEndpoint.set(endpoint);
    final Data data=packet.getData();
    final ClientRequest request=(ClientRequest)serializationService.toObject(data);
    if (endpoint.isAuthenticated() || request instanceof ClientAuthenticationRequest) {
      request.setConnection(conn);
      request.setService(nodeEngine.getService(request.getServiceName()));
      request.setClientEngine(ClientEngineImpl.this);
      final Object result=request.process();
      final Data resultData=result != null ? serializationService.toData(result) : new Data();
      sendResponse(conn,resultData);
    }
 else {
      String message="String_Node_Str" + conn + "String_Node_Str";
      logger.log(Level.SEVERE,message);
      sendResponse(conn,new GenericError(message,0));
      removeEndpoint(conn);
    }
  }
 catch (  Throwable e) {
    logger.log(Level.SEVERE,e.getMessage(),e);
    StringWriter w=new StringWriter();
    e.printStackTrace(new PrintWriter(w));
    sendResponse(conn,new GenericError(w.toString(),0));
  }
 finally {
    currentEndpoint.set(null);
  }
}
Program: 49313
Project: 49313
Buggy source:
public Object invoke() throws InterruptedException, ExecutionException, TimeoutException {
  op.setCallerUuid(uuid);
  final InvocationBuilder builder;
  if (target == null) {
    builder=nodeEngine.getOperationService().createInvocationBuilder(serviceName,op,partitionId).setReplicaIndex(replicaIndex);
  }
 else {
    builder=nodeEngine.getOperationService().createInvocationBuilder(serviceName,op,target);
  }
  builder.setTryCount(50).setCallTimeout(30 * 1000);
  Invocation inv=builder.build();
  Future f=inv.invoke();
  return f.get(60,TimeUnit.SECONDS);
}

Fixed version (ground truth):
public Object invoke() throws InterruptedException, ExecutionException, TimeoutException {
  op.setCallerUuid(uuid);
  final InvocationBuilder builder;
  if (target == null) {
    builder=nodeEngine.getOperationService().createInvocationBuilder(serviceName,op,partitionId).setReplicaIndex(replicaIndex);
  }
 else {
    builder=nodeEngine.getOperationService().createInvocationBuilder(serviceName,op,target);
  }
  builder.setTryCount(100).setCallTimeout(20 * 1000);
  Invocation inv=builder.build();
  Future f=inv.invoke();
  return f.get(30,TimeUnit.SECONDS);
}
Program: 49314
Project: 49314
Buggy source:
public int size(){
  return (data == null) ? 6 : data.totalSize() + 6;
}

Fixed version (ground truth):
public int size(){
  return (data != null ? data.totalSize() : 0) + 6;
}
Program: 49315
Project: 49315
Buggy source:
public boolean write(DataAdapter writer,ByteBuffer socketBuffer) throws Exception {
  System.err.println("String_Node_Str" + writer.getData());
  return writer.writeTo(socketBuffer);
}

Fixed version (ground truth):
public boolean write(DataAdapter writer,ByteBuffer socketBuffer) throws Exception {
  return writer.writeTo(socketBuffer);
}
Program: 49316
Project: 49316
Buggy source:
/** 
 * Calculates the size of the binary after the Data is serialized. WARNING: Should be in sync with   {@link #writeData(com.hazelcast.nio.ObjectDataOutput)}
 */
public int totalSize(){
  int total=0;
  total+=4;
  if (classDefinition != null) {
    total+=4;
    total+=4;
    total+=4;
    total+=4;
    total+=4;
    final byte[] binary=((BinaryClassDefinition)classDefinition).getBinary();
    total+=binary != null ? binary.length : 0;
  }
 else {
    total+=4;
  }
  total+=4;
  total+=bufferSize();
  total+=4;
  return total;
}

Fixed version (ground truth):
/** 
 * Calculates the size of the binary after the Data is serialized. WARNING: Should be in sync with   {@link #writeData(com.hazelcast.nio.ObjectDataOutput)}
 */
public int totalSize(){
  int total=0;
  total+=4;
  if (classDefinition != null) {
    total+=4;
    total+=4;
    total+=4;
    total+=4;
    final byte[] binary=((BinaryClassDefinition)classDefinition).getBinary();
    total+=binary != null ? binary.length : 0;
  }
 else {
    total+=4;
  }
  total+=4;
  total+=bufferSize();
  total+=4;
  return total;
}
Program: 49317
Project: 49317
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + type + "String_Node_Str"+ "String_Node_Str"+ getPartitionHash()+ "String_Node_Str"+ bufferSize();
}

Fixed version (ground truth):
@Override public String toString(){
  final StringBuilder sb=new StringBuilder("String_Node_Str");
  sb.append("String_Node_Str").append(type);
  sb.append("String_Node_Str").append(getPartitionHash());
  sb.append("String_Node_Str").append(bufferSize());
  sb.append("String_Node_Str").append(totalSize());
  sb.append('}');
  return sb.toString();
}
Program: 49319
Project: 49319
Buggy source:
ClassDefinition createClassDefinition(byte[] compressedBinary) throws IOException {
  final ContextAwareDataOutput out=pop();
  final byte[] binary;
  try {
    decompress(compressedBinary,out);
    binary=out.toByteArray();
  }
  finally {
    push(out);
  }
  final ClassDefinitionImpl cd=new ClassDefinitionImpl();
  cd.readData(new ContextAwareDataInput(binary,SerializationServiceImpl.this));
  cd.setBinary(binary);
  final ClassDefinitionImpl currentCD=versionedDefinitions.putIfAbsent(combineToLong(cd.classId,serializationContext.getVersion()),cd);
  if (currentCD == null) {
    serializationContext.registerNestedDefinitions(cd);
    return cd;
  }
 else {
    return currentCD;
  }
}

Fixed version (ground truth):
ClassDefinition createClassDefinition(byte[] compressedBinary) throws IOException {
  final ContextAwareDataOutput out=pop();
  final byte[] binary;
  try {
    decompress(compressedBinary,out);
    binary=out.toByteArray();
  }
  finally {
    push(out);
  }
  final ClassDefinitionImpl cd=new ClassDefinitionImpl();
  cd.readData(new ContextAwareDataInput(binary,SerializationServiceImpl.this));
  cd.setBinary(compressedBinary);
  final ClassDefinitionImpl currentCD=versionedDefinitions.putIfAbsent(combineToLong(cd.classId,serializationContext.getVersion()),cd);
  if (currentCD == null) {
    serializationContext.registerNestedDefinitions(cd);
    return cd;
  }
 else {
    return currentCD;
  }
}
Program: 49320
Project: 49320
Buggy source:
public void init(final NodeEngine nodeEngine,Properties properties){
  int partitionCount=nodeEngine.getPartitionService().getPartitionCount();
  for (int i=0; i < partitionCount; i++) {
    partitionContainers[i]=new CollectionPartitionContainer(this,i);
  }
  final SharedLockService lockService=nodeEngine.getSharedService(SharedLockService.SERVICE_NAME);
  if (lockService != null) {
    lockService.registerLockStoreConstructor(SERVICE_NAME,new ConcurrencyUtil.ConstructorFunction<ObjectNamespace,LockStoreInfo>(){
      public LockStoreInfo createNew(      final ObjectNamespace key){
        CollectionProxyId id=(CollectionProxyId)key.getObjectId();
        final MultiMapConfig multiMapConfig=nodeEngine.getConfig().getMultiMapConfig(id.getName());
        return new LockStoreInfo(){
          public ObjectNamespace getObjectNamespace(){
            return key;
          }
          public int getBackupCount(){
            return multiMapConfig.getSyncBackupCount();
          }
          public int getAsyncBackupCount(){
            return multiMapConfig.getAsyncBackupCount();
          }
        }
;
      }
    }
);
  }
}

Fixed version (ground truth):
public void init(final NodeEngine nodeEngine,Properties properties){
  int partitionCount=nodeEngine.getPartitionService().getPartitionCount();
  for (int i=0; i < partitionCount; i++) {
    partitionContainers[i]=new CollectionPartitionContainer(this,i);
  }
  final SharedLockService lockService=nodeEngine.getSharedService(SharedLockService.SERVICE_NAME);
  if (lockService != null) {
    lockService.registerLockStoreConstructor(SERVICE_NAME,new ConstructorFunction<ObjectNamespace,LockStoreInfo>(){
      public LockStoreInfo createNew(      final ObjectNamespace key){
        CollectionProxyId id=(CollectionProxyId)key.getObjectId();
        final MultiMapConfig multiMapConfig=nodeEngine.getConfig().getMultiMapConfig(id.getName());
        return new LockStoreInfo(){
          public ObjectNamespace getObjectNamespace(){
            return key;
          }
          public int getBackupCount(){
            return multiMapConfig.getSyncBackupCount();
          }
          public int getAsyncBackupCount(){
            return multiMapConfig.getAsyncBackupCount();
          }
        }
;
      }
    }
);
  }
}
Program: 49321
Project: 49321
Buggy source:
public void init(NodeEngine nodeEngine,Properties properties){
  registerLockStoreConstructor(SERVICE_NAME,new ConcurrencyUtil.ConstructorFunction<ObjectNamespace,LockStoreInfo>(){
    public LockStoreInfo createNew(    ObjectNamespace key){
      return new LockStoreInfo(){
        public ObjectNamespace getObjectNamespace(){
          return new InternalLockNamespace();
        }
        public int getBackupCount(){
          return 1;
        }
        public int getAsyncBackupCount(){
          return 0;
        }
      }
;
    }
  }
);
}

Fixed version (ground truth):
public void init(NodeEngine nodeEngine,Properties properties){
  registerLockStoreConstructor(SERVICE_NAME,new ConstructorFunction<ObjectNamespace,LockStoreInfo>(){
    public LockStoreInfo createNew(    ObjectNamespace key){
      return new LockStoreInfo(){
        public ObjectNamespace getObjectNamespace(){
          return new InternalLockNamespace();
        }
        public int getBackupCount(){
          return 1;
        }
        public int getAsyncBackupCount(){
          return 0;
        }
      }
;
    }
  }
);
}
Program: 49322
Project: 49322
Buggy source:
public void registerLockStoreConstructor(String serviceName,ConcurrencyUtil.ConstructorFunction<ObjectNamespace,LockStoreInfo> constructorFunction){
  if (constructors.putIfAbsent(serviceName,constructorFunction) != null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void registerLockStoreConstructor(String serviceName,ConstructorFunction<ObjectNamespace,LockStoreInfo> constructorFunction){
  if (constructors.putIfAbsent(serviceName,constructorFunction) != null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
}
Program: 49323
Project: 49323
Buggy source:
void registerLockStoreConstructor(String serviceName,ConcurrencyUtil.ConstructorFunction<ObjectNamespace,LockStoreInfo> constructorFunction);

Fixed version (ground truth):
void registerLockStoreConstructor(String serviceName,ConstructorFunction<ObjectNamespace,LockStoreInfo> constructorFunction);
Program: 49329
Project: 49329
Buggy source:
public final Future invoke(){
  if (invokeCount > 0) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (nodeEngine.operationService.isOperationThread() && (op instanceof PartitionAwareOperation) && !OperationAccessor.isMigrationOperation(op)) {
    throw new IllegalThreadStateException(Thread.currentThread() + "String_Node_Str" + op);
  }
  try {
    OperationAccessor.setCallTimeout(op,callTimeout);
    OperationAccessor.setCallerAddress(op,nodeEngine.getThisAddress());
    op.setNodeEngine(nodeEngine).setServiceName(serviceName).setPartitionId(partitionId).setReplicaIndex(replicaIndex);
    if (op.getCallerUuid() == null) {
      final ThreadContext threadContext=ThreadContext.get();
      if (threadContext != null) {
        op.setCallerUuid(threadContext.getCallerUuid());
      }
    }
    if (op.getCallerUuid() == null) {
      op.setCallerUuid(nodeEngine.getLocalMember().getUuid());
    }
    doInvoke();
  }
 catch (  Exception e) {
    if (e instanceof RetryableException) {
      notify(e);
    }
 else {
      throw ExceptionUtil.rethrow(e);
    }
  }
  return new InvocationFuture();
}

Fixed version (ground truth):
public final Future invoke(){
  if (invokeCount > 0) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (op.getCallId() != 0) {
    throw new IllegalStateException("String_Node_Str" + op + "String_Node_Str");
  }
  if (nodeEngine.operationService.isOperationThread() && (op instanceof PartitionAwareOperation) && !OperationAccessor.isMigrationOperation(op)) {
    throw new IllegalThreadStateException(Thread.currentThread() + "String_Node_Str" + op);
  }
  try {
    OperationAccessor.setCallTimeout(op,callTimeout);
    OperationAccessor.setCallerAddress(op,nodeEngine.getThisAddress());
    op.setNodeEngine(nodeEngine).setServiceName(serviceName).setPartitionId(partitionId).setReplicaIndex(replicaIndex);
    if (op.getCallerUuid() == null) {
      final ThreadContext threadContext=ThreadContext.get();
      if (threadContext != null) {
        op.setCallerUuid(threadContext.getCallerUuid());
      }
    }
    if (op.getCallerUuid() == null) {
      op.setCallerUuid(nodeEngine.getLocalMember().getUuid());
    }
    doInvoke();
  }
 catch (  Exception e) {
    if (e instanceof RetryableException) {
      notify(e);
    }
 else {
      throw ExceptionUtil.rethrow(e);
    }
  }
  return new InvocationFuture();
}
Program: 49330
Project: 49330
Buggy source:
@Test(timeout=20000) public void testLockEviction() throws Exception {
  final String mapName="String_Node_Str";
  final StaticNodeFactory nodeFactory=new StaticNodeFactory(2);
  final Config config=new Config();
  config.getMapConfig(mapName).setBackupCount(0);
  final HazelcastInstance instance1=nodeFactory.newHazelcastInstance(config);
  final HazelcastInstance instance2=nodeFactory.newHazelcastInstance(config);
  final AtomicInteger counter=new AtomicInteger(0);
  Thread.sleep(7000);
  final IMap map=instance1.getMap(mapName);
  long st=Clock.currentTimeMillis();
  map.lock(1,3,TimeUnit.SECONDS);
  if (!map.isLocked(1))   System.out.println("String_Node_Str");
  System.out.println(Clock.currentTimeMillis() - st);
}

Fixed version (ground truth):
public void testLockEviction() throws Exception {
  final String mapName="String_Node_Str";
  final StaticNodeFactory nodeFactory=new StaticNodeFactory(2);
  final Config config=new Config();
  config.getMapConfig(mapName).setBackupCount(1);
  final HazelcastInstance instance1=nodeFactory.newHazelcastInstance(config);
  final HazelcastInstance instance2=nodeFactory.newHazelcastInstance(config);
  final AtomicInteger counter=new AtomicInteger(0);
  final IMap map=instance1.getMap(mapName);
  map.put(1,1);
  long st=Clock.currentTimeMillis();
  map.lock(1,3,TimeUnit.SECONDS);
  Assert.assertEquals(true,map.isLocked(1));
  Thread t=new Thread(new Runnable(){
    public void run(){
      map.lock(1);
      counter.incrementAndGet();
    }
  }
);
  t.start();
  Thread.sleep(2000);
  Assert.assertEquals(0,counter.get());
  Thread.sleep(2000);
  Assert.assertEquals(1,counter.get());
}
Program: 49332
Project: 49332
Buggy source:
public void run() throws Exception {
  CollectionWrapper wrapper=getCollectionWrapper();
  if (wrapper == null || wrapper.getVersion() == version) {
    notify=false;
    return;
  }
  for (  Operation op : opList) {
    op.setNodeEngine(getNodeEngine()).setServiceName(getServiceName()).setPartitionId(getPartitionId());
    op.beforeRun();
    op.run();
    op.afterRun();
  }
  getOrCreateContainer().unlock(dataKey,getCallerUuid(),threadId);
}

Fixed version (ground truth):
public void run() throws Exception {
  CollectionWrapper wrapper=getCollectionWrapper();
  if (wrapper == null || wrapper.getVersion() != version) {
    notify=false;
    return;
  }
  wrapper.incrementAndGetVersion();
  for (  Operation op : opList) {
    op.setNodeEngine(getNodeEngine()).setServiceName(getServiceName()).setPartitionId(getPartitionId());
    op.beforeRun();
    op.run();
    op.afterRun();
  }
  getOrCreateContainer().unlock(dataKey,getCallerUuid(),threadId);
}
Program: 49333
Project: 49333
Buggy source:
public Operation prepareMigrationOperation(MigrationServiceEvent event){
  int replicaIndex=event.getReplicaIndex();
  CollectionPartitionContainer partitionContainer=partitionContainers[event.getPartitionId()];
  Map<CollectionProxyId,Map> map=new HashMap<CollectionProxyId,Map>(partitionContainer.containerMap.size());
  return new CollectionMigrationOperation(map);
}

Fixed version (ground truth):
public Operation prepareMigrationOperation(MigrationServiceEvent event){
  int replicaIndex=event.getReplicaIndex();
  CollectionPartitionContainer partitionContainer=partitionContainers[event.getPartitionId()];
  Map<CollectionProxyId,Map> map=new HashMap<CollectionProxyId,Map>(partitionContainer.containerMap.size());
  for (  Map.Entry<CollectionProxyId,CollectionContainer> entry : partitionContainer.containerMap.entrySet()) {
    CollectionProxyId proxyId=entry.getKey();
    CollectionContainer container=entry.getValue();
    if (container.config.getTotalBackupCount() < replicaIndex) {
      continue;
    }
    map.put(proxyId,container.collections);
  }
  if (map.isEmpty()) {
    return null;
  }
  return new CollectionMigrationOperation(map);
}
Program: 49334
Project: 49334
Buggy source:
@Override public void run(){
  try {
    if (isActive() && !completelyShutdown) {
      completelyShutdown=true;
      if (groupProperties.SHUTDOWNHOOK_ENABLED.getBoolean()) {
        shutdown(false,true);
      }
    }
 else {
      logger.log(Level.FINEST,"String_Node_Str");
    }
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,e.getMessage(),e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    if (isActive() && !completelyShutdown) {
      completelyShutdown=true;
      if (groupProperties.SHUTDOWNHOOK_ENABLED.getBoolean()) {
        shutdown(true,true);
      }
    }
 else {
      logger.log(Level.FINEST,"String_Node_Str");
    }
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,e.getMessage(),e);
  }
}
Program: 49335
Project: 49335
Buggy source:
public MigrationInfo(int partitionId,int replicaIndex,MigrationType migrationType,Address from,Address to,int copyBackReplicaIndex){
  this.partitionId=partitionId;
  this.from=from;
  this.to=to;
  this.replicaIndex=replicaIndex;
  this.copyBackReplicaIndex=copyBackReplicaIndex;
  this.migrationType=migrationType;
}

Fixed version (ground truth):
public MigrationInfo(int partitionId,int replicaIndex,MigrationType migrationType,Address from,Address to){
  this.partitionId=partitionId;
  this.from=from;
  this.to=to;
  this.replicaIndex=replicaIndex;
  this.migrationType=migrationType;
}
Program: 49336
Project: 49336
Buggy source:
public void readData(ObjectDataInput in) throws IOException {
  partitionId=in.readInt();
  replicaIndex=in.readInt();
  copyBackReplicaIndex=in.readInt();
  migrationType=MigrationType.readFrom(in);
  boolean hasFrom=in.readBoolean();
  if (hasFrom) {
    from=new Address();
    from.readData(in);
  }
  to=new Address();
  to.readData(in);
}

Fixed version (ground truth):
public void readData(ObjectDataInput in) throws IOException {
  partitionId=in.readInt();
  replicaIndex=in.readInt();
  copyBackReplicaIndex=in.readInt();
  migrationType=MigrationType.readFrom(in);
  boolean hasFrom=in.readBoolean();
  if (hasFrom) {
    from=new Address();
    from.readData(in);
  }
  to=new Address();
  to.readData(in);
  master=new Address();
  master.readData(in);
}
Program: 49337
Project: 49337
Buggy source:
public void writeData(ObjectDataOutput out) throws IOException {
  out.writeInt(partitionId);
  out.writeInt(replicaIndex);
  out.writeInt(copyBackReplicaIndex);
  MigrationType.writeTo(migrationType,out);
  boolean hasFrom=from != null;
  out.writeBoolean(hasFrom);
  if (hasFrom) {
    from.writeData(out);
  }
  to.writeData(out);
}

Fixed version (ground truth):
public void writeData(ObjectDataOutput out) throws IOException {
  out.writeInt(partitionId);
  out.writeInt(replicaIndex);
  out.writeInt(copyBackReplicaIndex);
  MigrationType.writeTo(migrationType,out);
  boolean hasFrom=from != null;
  out.writeBoolean(hasFrom);
  if (hasFrom) {
    from.writeData(out);
  }
  to.writeData(out);
  master.writeData(out);
}
Program: 49338
Project: 49338
Buggy source:
@Override public String toString(){
  final StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  sb.append("String_Node_Str").append(copyBackReplicaIndex);
  sb.append("String_Node_Str").append(partitionId);
  sb.append("String_Node_Str").append(from);
  sb.append("String_Node_Str").append(to);
  sb.append("String_Node_Str").append(replicaIndex);
  sb.append("String_Node_Str").append(migrationType);
  sb.append('}');
  return sb.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  final StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  sb.append("String_Node_Str").append(copyBackReplicaIndex);
  sb.append("String_Node_Str").append(partitionId);
  sb.append("String_Node_Str").append(from);
  sb.append("String_Node_Str").append(to);
  sb.append("String_Node_Str").append(replicaIndex);
  sb.append("String_Node_Str").append(migrationType);
  sb.append("String_Node_Str").append(master);
  sb.append('}');
  return sb.toString();
}
Program: 49339
Project: 49339
Buggy source:
public void run(){
  NodeEngine nodeEngine=getNodeEngine();
  SerializationService serializationService=nodeEngine.getSerializationService();
  ObjectDataInput in=null;
  try {
    final byte[] taskData=IOUtil.decompress(zippedTaskData);
    in=serializationService.createObjectDataInput(taskData);
    int size=in.readInt();
    tasks=new ArrayList<Operation>(size);
    for (int i=0; i < size; i++) {
      Operation task=(Operation)serializationService.readObject(in);
      tasks.add(task);
    }
    if (taskCount != tasks.size()) {
      getLogger().log(Level.SEVERE,"String_Node_Str" + "String_Node_Str" + size + "String_Node_Str"+ tasks.size()+ "String_Node_Str"+ migrationInfo.getFromAddress()+ "String_Node_Str"+ getPartitionId()+ "String_Node_Str"+ getReplicaIndex());
    }
    success=runMigrationTasks();
  }
 catch (  Throwable e) {
    Level level=Level.WARNING;
    if (e instanceof IllegalStateException) {
      level=Level.FINEST;
    }
    getLogger().log(level,e.getMessage(),e);
    success=false;
  }
 finally {
    IOUtil.closeResource(in);
  }
}

Fixed version (ground truth):
public void run(){
  NodeEngine nodeEngine=getNodeEngine();
  SerializationService serializationService=nodeEngine.getSerializationService();
  ObjectDataInput in=null;
  if (migrationInfo.startProcessing()) {
    try {
      final byte[] taskData=IOUtil.decompress(zippedTaskData);
      in=serializationService.createObjectDataInput(taskData);
      int size=in.readInt();
      tasks=new ArrayList<Operation>(size);
      for (int i=0; i < size; i++) {
        Operation task=(Operation)serializationService.readObject(in);
        tasks.add(task);
      }
      if (taskCount != tasks.size()) {
        getLogger().log(Level.SEVERE,"String_Node_Str" + "String_Node_Str" + size + "String_Node_Str"+ tasks.size()+ "String_Node_Str"+ migrationInfo.getFromAddress()+ "String_Node_Str"+ getPartitionId()+ "String_Node_Str"+ getReplicaIndex());
      }
      success=runMigrationTasks();
    }
 catch (    Throwable e) {
      Level level=Level.WARNING;
      if (e instanceof IllegalStateException) {
        level=Level.FINEST;
      }
      getLogger().log(level,e.getMessage(),e);
      success=false;
    }
 finally {
      migrationInfo.doneProcessing();
      IOUtil.closeResource(in);
    }
  }
 else {
    getLogger().log(Level.WARNING,"String_Node_Str" + migrationInfo);
    success=false;
  }
}
Program: 49340
Project: 49340
Buggy source:
public SimpleMapTest(final int threadCount,final int entryCount,final int valueSize,final int getPercentage,final int putPercentage,final boolean load){
  this.threadCount=threadCount;
  this.entryCount=entryCount;
  this.valueSize=valueSize;
  this.getPercentage=getPercentage;
  this.putPercentage=putPercentage;
  this.load=load;
  Config cfg=new XmlConfigBuilder().build();
  cfg.getMapConfig("String_Node_Str").setRecordType(MapConfig.RecordType.DATA);
  cfg.getSerializationConfig().setPortableFactory(new PortableFactory(){
    public Portable create(    int classId){
      return new PortableByteArray();
    }
  }
);
  instance=Hazelcast.newHazelcastInstance(cfg);
  logger=instance.getLoggingService().getLogger("String_Node_Str");
}

Fixed version (ground truth):
public SimpleMapTest(final int threadCount,final int entryCount,final int valueSize,final int getPercentage,final int putPercentage,final boolean load){
  this.threadCount=threadCount;
  this.entryCount=entryCount;
  this.valueSize=valueSize;
  this.getPercentage=getPercentage;
  this.putPercentage=putPercentage;
  this.load=load;
  Config cfg=new XmlConfigBuilder().build();
  cfg.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
  cfg.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true);
  cfg.getNetworkConfig().getJoin().getTcpIpConfig().addMember("String_Node_Str");
  cfg.getSerializationConfig().setPortableFactory(new PortableFactory(){
    public Portable create(    int classId){
      return new PortableByteArray();
    }
  }
);
  instance=Hazelcast.newHazelcastInstance(cfg);
  logger=instance.getLoggingService().getLogger("String_Node_Str");
}
Program: 49341
Project: 49341
Buggy source:
public void afterRun(){
  mapService.afterPut(name,dataValue);
  int eventType=dataOldValue == null ? EntryEvent.TYPE_ADDED : EntryEvent.TYPE_UPDATED;
  mapService.publishEvent(getCallerAddress(),name,eventType,dataKey,dataOldValue,dataValue);
  invalidateNearCaches();
  if (mapContainer.getMapConfig().isStatisticsEnabled()) {
    mapContainer.getMapOperationCounter().incrementPuts(Clock.currentTimeMillis() - getStartTime());
  }
}

Fixed version (ground truth):
public void afterRun(){
  mapService.interceptAfterPut(name,dataValue);
  int eventType=dataOldValue == null ? EntryEvent.TYPE_ADDED : EntryEvent.TYPE_UPDATED;
  mapService.publishEvent(getCallerAddress(),name,eventType,dataKey,dataOldValue,dataValue);
  invalidateNearCaches();
  if (mapContainer.getMapConfig().isStatisticsEnabled()) {
    mapContainer.getMapOperationCounter().incrementPuts(Clock.currentTimeMillis() - getStartTime());
  }
}
Program: 49342
Project: 49342
Buggy source:
public void afterRun(){
  mapService.afterRemove(name,dataValue);
  int eventType=EntryEvent.TYPE_REMOVED;
  mapService.publishEvent(getCallerAddress(),name,eventType,dataKey,dataOldValue,null);
  invalidateNearCaches();
  if (mapContainer.getMapConfig().isStatisticsEnabled()) {
    mapContainer.getMapOperationCounter().incrementRemoves(Clock.currentTimeMillis() - getStartTime());
  }
}

Fixed version (ground truth):
public void afterRun(){
  mapService.interceptAfterRemove(name,dataValue);
  int eventType=EntryEvent.TYPE_REMOVED;
  mapService.publishEvent(getCallerAddress(),name,eventType,dataKey,dataOldValue,null);
  invalidateNearCaches();
  if (mapContainer.getMapConfig().isStatisticsEnabled()) {
    mapContainer.getMapOperationCounter().incrementRemoves(Clock.currentTimeMillis() - getStartTime());
  }
}
Program: 49343
Project: 49343
Buggy source:
public void run(){
  mapService=(MapService)getService();
  RecordStore recordStore=mapService.getRecordStore(getPartitionId(),name);
  Map.Entry<Data,Object> mapEntry=recordStore.getMapEntryObject(dataKey);
  NodeEngine nodeEngine=mapService.getNodeEngine();
  entry=new AbstractMap.SimpleEntry<Object,Object>(nodeEngine.toObject(dataKey),mapEntry.getValue());
  entryProcessor.processBackup(entry);
  recordStore.put(new AbstractMap.SimpleImmutableEntry<Data,Object>(dataKey,entry.getValue()));
}

Fixed version (ground truth):
public void run(){
  mapService=(MapService)getService();
  RecordStore recordStore=mapService.getRecordStore(getPartitionId(),name);
  Map.Entry<Data,Object> mapEntry=recordStore.getMapEntryObject(dataKey);
  NodeEngine nodeEngine=mapService.getNodeEngine();
  entry=new AbstractMap.SimpleEntry<Object,Object>(mapService.toObject(dataKey),mapEntry.getValue());
  entryProcessor.processBackup(entry);
  recordStore.put(new AbstractMap.SimpleImmutableEntry<Data,Object>(dataKey,entry.getValue()));
}
Program: 49344
Project: 49344
Buggy source:
public void run(){
  Map.Entry<Data,Object> mapEntry=recordStore.getMapEntryObject(dataKey);
  NodeEngine nodeEngine=mapService.getNodeEngine();
  entry=new AbstractMap.SimpleEntry(nodeEngine.toObject(dataKey),nodeEngine.toObject(mapEntry.getValue()));
  response=nodeEngine.toData(entryProcessor.process(entry));
  recordStore.put(new AbstractMap.SimpleImmutableEntry<Data,Object>(dataKey,entry.getValue()));
}

Fixed version (ground truth):
public void run(){
  Map.Entry<Data,Object> mapEntry=recordStore.getMapEntryObject(dataKey);
  NodeEngine nodeEngine=mapService.getNodeEngine();
  entry=new AbstractMap.SimpleEntry(mapService.toObject(dataKey),mapService.toObject(mapEntry.getValue()));
  response=mapService.toData(entryProcessor.process(entry));
  recordStore.put(new AbstractMap.SimpleImmutableEntry<Data,Object>(dataKey,entry.getValue()));
}
Program: 49345
Project: 49345
Buggy source:
public void afterRun(){
  mapService.afterRemove(name,dataValue);
  int eventType=EntryEvent.TYPE_EVICTED;
  mapService.publishEvent(getCallerAddress(),name,eventType,dataKey,dataValue,null);
  invalidateNearCaches();
}

Fixed version (ground truth):
public void afterRun(){
  mapService.interceptAfterRemove(name,dataValue);
  int eventType=EntryEvent.TYPE_EVICTED;
  mapService.publishEvent(getCallerAddress(),name,eventType,dataKey,dataValue,null);
  invalidateNearCaches();
}
Program: 49346
Project: 49346
Buggy source:
public void run(){
  MapService mapService=(MapService)getService();
  RecordStore recordStore=mapService.getRecordStore(getPartitionId(),name);
  Record record=recordStore.getRecords().get(dataKey);
  result=new SimpleEntryView(record.getKey(),getNodeEngine().toData(record.getValue()),record);
}

Fixed version (ground truth):
public void run(){
  MapService mapService=(MapService)getService();
  RecordStore recordStore=mapService.getRecordStore(getPartitionId(),name);
  Record record=recordStore.getRecords().get(dataKey);
  result=new SimpleEntryView(record.getKey(),mapService.toData(record.getValue()),record);
}
Program: 49347
Project: 49347
Buggy source:
public void afterRun(){
  mapService.afterGet(name,result);
  if (mapContainer.getMapConfig().isStatisticsEnabled()) {
    mapContainer.getMapOperationCounter().incrementGets(Clock.currentTimeMillis() - getStartTime());
  }
}

Fixed version (ground truth):
public void afterRun(){
  mapService.interceptAfterGet(name,result);
  if (mapContainer.getMapConfig().isStatisticsEnabled()) {
    mapContainer.getMapOperationCounter().incrementGets(Clock.currentTimeMillis() - getStartTime());
  }
}
Program: 49348
Project: 49348
Buggy source:
public Object toObject(Object data){
  if (data == null)   return null;
  if (data instanceof Data)   return nodeEngine.toObject(data);
 else   return data;
}

Fixed version (ground truth):
public Object toObject(Object data){
  if (data == null)   return null;
  if (data instanceof Data) {
    return nodeEngine.toObject(data);
  }
 else {
    return data;
  }
}
Program: 49349
Project: 49349
Buggy source:
public Data toData(Object object){
  if (object == null)   return null;
  if (object instanceof Data)   return (Data)object;
 else   return nodeEngine.toData(object);
}

Fixed version (ground truth):
public Data toData(Object object){
  if (object == null)   return null;
  if (object instanceof Data) {
    return (Data)object;
  }
 else {
    return nodeEngine.toData(object);
  }
}
Program: 49350
Project: 49350
Buggy source:
public void delete(Object k){
  final NodeEngine nodeEngine=getNodeEngine();
  final Data key=nodeEngine.toData(k);
  deleteInternal(key);
}

Fixed version (ground truth):
public void delete(Object k){
  final NodeEngine nodeEngine=getNodeEngine();
  final Data key=getService().toData(k);
  deleteInternal(key);
}
Program: 49351
Project: 49351
Buggy source:
public boolean remove(final Object k,final Object v){
  final NodeEngine nodeEngine=getNodeEngine();
  Data key=nodeEngine.toData(k);
  Data value=nodeEngine.toData(v);
  return removeInternal(key,value);
}

Fixed version (ground truth):
public boolean remove(final Object k,final Object v){
  Data key=getService().toData(k);
  Data value=getService().toData(v);
  return removeInternal(key,value);
}
Program: 49352
Project: 49352
Buggy source:
public boolean containsValue(final Object value){
  final NodeEngine nodeEngine=getNodeEngine();
  Data v=nodeEngine.toData(value);
  return containsValueInternal(v);
}

Fixed version (ground truth):
public boolean containsValue(final Object value){
  final NodeEngine nodeEngine=getNodeEngine();
  Data v=getService().toData(value);
  return containsValueInternal(v);
}
Program: 49353
Project: 49353
Buggy source:
public Data get(Object k){
  final NodeEngine nodeEngine=getNodeEngine();
  Data key=nodeEngine.toData(k);
  return getInternal(key);
}

Fixed version (ground truth):
public Data get(Object k){
  Data key=getService().toData(k);
  return getInternal(key);
}
Program: 49354
Project: 49354
Buggy source:
@Override public EntryView<Data,Data> getEntryView(Data key){
  return getEntryViewInternal(getNodeEngine().toData(key));
}

Fixed version (ground truth):
@Override public EntryView<Data,Data> getEntryView(Data key){
  return getEntryViewInternal(getService().toData(key));
}