Program: 49186
Project: 49186
Buggy source:
public void run(){
  final NodeEngine nodeEngine=getNodeEngine();
  final Address masterAddress=nodeEngine.getMasterAddress();
  if (!masterAddress.equals(migrationInfo.getMaster())) {
    throw new RetryableHazelcastException("String_Node_Str" + toString());
  }
  if (!masterAddress.equals(getCallerAddress())) {
    throw new RetryableHazelcastException("String_Node_Str" + toString());
  }
  final Address from=migrationInfo.getSource();
  final Address to=migrationInfo.getDestination();
  if (to.equals(from)) {
    getLogger().log(Level.WARNING,"String_Node_Str" + toString());
    success=false;
    return;
  }
  if (from == null) {
    getLogger().log(Level.FINEST,"String_Node_Str" + toString());
  }
  if (migrationInfo.startProcessing()) {
    try {
      final Member target=nodeEngine.getClusterService().getMember(to);
      if (target == null) {
        throw new RetryableHazelcastException("String_Node_Str" + toString());
      }
      final PartitionServiceImpl partitionService=getService();
      partitionService.addActiveMigration(migrationInfo);
      final long[] replicaVersions=partitionService.getPartitionReplicaVersions(migrationInfo.getPartitionId());
      final long timeout=nodeEngine.getGroupProperties().PARTITION_MIGRATION_TIMEOUT.getLong();
      final Collection<Operation> tasks=prepareMigrationTasks();
      if (tasks.size() > 0) {
        final SerializationService serializationService=nodeEngine.getSerializationService();
        final BufferObjectDataOutput out=serializationService.createObjectDataOutput(1024 * 32);
        try {
          out.writeInt(tasks.size());
          for (          Operation task : tasks) {
            serializationService.writeObject(out,task);
          }
          final byte[] data=IOUtil.compress(out.toByteArray());
          final MigrationOperation migrationOperation=new MigrationOperation(migrationInfo,replicaVersions,data,tasks.size());
          Invocation inv=nodeEngine.getOperationService().createInvocationBuilder(PartitionServiceImpl.SERVICE_NAME,migrationOperation,to).setTryPauseMillis(1000).setReplicaIndex(getReplicaIndex()).build();
          Future future=inv.invoke();
          success=(Boolean)nodeEngine.toObject(future.get(timeout,TimeUnit.SECONDS));
        }
  finally {
          IOUtil.closeResource(out);
        }
      }
 else {
        success=true;
      }
    }
 catch (    Throwable e) {
      if (e instanceof ExecutionException) {
        e=e.getCause() != null ? e.getCause() : e;
      }
      Level level=(e instanceof MemberLeftException || e instanceof InterruptedException) || !getNodeEngine().isActive() ? Level.INFO : Level.WARNING;
      getLogger().log(level,e.getMessage(),e);
      success=false;
    }
 finally {
      migrationInfo.doneProcessing();
    }
  }
 else {
    getLogger().log(Level.WARNING,"String_Node_Str" + migrationInfo);
    success=false;
  }
}

Fixed version (ground truth):
public void run(){
  final BufferObjectDataOutput out=serializationService.createObjectDataOutput(1024 * 32);
  try {
    out.writeInt(tasks.size());
    for (    Operation task : tasks) {
      serializationService.writeObject(out,task);
    }
    final byte[] data=IOUtil.compress(out.toByteArray());
    final MigrationOperation migrationOperation=new MigrationOperation(migrationInfo,replicaVersions,data,tasks.size());
    Invocation inv=nodeEngine.getOperationService().createInvocationBuilder(PartitionServiceImpl.SERVICE_NAME,migrationOperation,to).setTryPauseMillis(1000).setReplicaIndex(getReplicaIndex()).build();
    Future future=inv.invoke();
    Boolean result=(Boolean)nodeEngine.toObject(future.get(timeout,TimeUnit.SECONDS));
    responseHandler.sendResponse(result);
  }
 catch (  Throwable e) {
    responseHandler.sendResponse(Boolean.FALSE);
    if (e instanceof ExecutionException) {
      e=e.getCause() != null ? e.getCause() : e;
    }
    Level level=(e instanceof MemberLeftException || e instanceof InterruptedException) || !getNodeEngine().isActive() ? Level.INFO : Level.WARNING;
    getLogger().log(level,e.getMessage(),e);
  }
 finally {
    IOUtil.closeResource(out);
  }
}