Program: 48113
Project: 48113
Buggy source:
void processPartitionRuntimeState(PartitionRuntimeState partitionState){
  lock.lock();
  try {
    if (!node.isActive() || !node.joined()) {
      if (logger.isFinestEnabled()) {
        logger.finest("String_Node_Str" + node.isActive() + "String_Node_Str"+ node.joined()+ "String_Node_Str");
      }
      return;
    }
    final Address sender=partitionState.getEndpoint();
    final Address master=node.getMasterAddress();
    if (node.isMaster()) {
      logger.warning("String_Node_Str" + sender + "String_Node_Str");
      return;
    }
 else {
      if (sender == null || !sender.equals(master)) {
        if (node.clusterService.getMember(sender) == null) {
          logger.severe("String_Node_Str" + "String_Node_Str" + sender + "String_Node_Str"+ master+ "String_Node_Str");
          return;
        }
 else {
          logger.warning("String_Node_Str" + "String_Node_Str" + sender + "String_Node_Str"+ master+ "String_Node_Str"+ "String_Node_Str");
        }
      }
    }
    final Set<Address> unknownAddresses=new HashSet<Address>();
    PartitionInfo[] state=partitionState.getPartitions();
    for (int partitionId=0; partitionId < state.length; partitionId++) {
      PartitionInfo partitionInfo=state[partitionId];
      InternalPartitionImpl currentPartition=partitions[partitionId];
      for (int index=0; index < InternalPartition.MAX_REPLICA_COUNT; index++) {
        Address address=partitionInfo.getReplicaAddress(index);
        if (address != null && getMember(address) == null) {
          if (logger.isFinestEnabled()) {
            logger.finest("String_Node_Str" + address + "String_Node_Str"+ sender+ "String_Node_Str"+ partitionId);
          }
          unknownAddresses.add(address);
        }
      }
      currentPartition.setOwner(partitionInfo.getReplicaAddress(0));
    }
    if (!unknownAddresses.isEmpty() && logger.isLoggable(Level.WARNING)) {
      StringBuilder s=new StringBuilder("String_Node_Str").append("String_Node_Str").append(sender).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
      for (      Address address : unknownAddresses) {
        s.append("String_Node_Str").append(address);
      }
      s.append("String_Node_Str");
      logger.warning(s.toString());
    }
    Collection<MigrationInfo> completedMigrations=partitionState.getCompletedMigrations();
    for (    MigrationInfo completedMigration : completedMigrations) {
      addCompletedMigration(completedMigration);
      finalizeActiveMigration(completedMigration);
    }
    if (!activeMigrations.isEmpty()) {
      final MemberImpl masterMember=getMasterMember();
      rollbackActiveMigrationsFromPreviousMaster(masterMember.getUuid());
    }
    for (int partitionId=0; partitionId < partitionCount; partitionId++) {
      InternalPartitionImpl partition=partitions[partitionId];
      Address[] replicas=state[partitionId].getReplicaAddresses();
      partition.setPartitionInfo(replicas);
    }
    stateVersion.set(partitionState.getVersion());
    initialized=true;
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
void processPartitionRuntimeState(PartitionRuntimeState partitionState){
  lock.lock();
  try {
    if (!node.isActive() || !node.joined()) {
      if (logger.isFinestEnabled()) {
        logger.finest("String_Node_Str" + node.isActive() + "String_Node_Str"+ node.joined()+ "String_Node_Str");
      }
      return;
    }
    final Address sender=partitionState.getEndpoint();
    final Address master=node.getMasterAddress();
    if (node.isMaster()) {
      logger.warning("String_Node_Str" + sender + "String_Node_Str");
      return;
    }
 else {
      if (sender == null || !sender.equals(master)) {
        if (node.clusterService.getMember(sender) == null) {
          logger.severe("String_Node_Str" + "String_Node_Str" + sender + "String_Node_Str"+ master+ "String_Node_Str");
          return;
        }
 else {
          logger.warning("String_Node_Str" + "String_Node_Str" + sender + "String_Node_Str"+ master+ "String_Node_Str"+ "String_Node_Str");
        }
      }
    }
    final Set<Address> unknownAddresses=new HashSet<Address>();
    PartitionInfo[] state=partitionState.getPartitions();
    for (int partitionId=0; partitionId < state.length; partitionId++) {
      PartitionInfo partitionInfo=state[partitionId];
      InternalPartitionImpl currentPartition=partitions[partitionId];
      for (int index=0; index < InternalPartition.MAX_REPLICA_COUNT; index++) {
        Address address=partitionInfo.getReplicaAddress(index);
        if (address != null && getMember(address) == null) {
          if (logger.isFinestEnabled()) {
            logger.finest("String_Node_Str" + address + "String_Node_Str"+ sender+ "String_Node_Str"+ partitionId);
          }
          unknownAddresses.add(address);
        }
      }
      currentPartition.setOwner(partitionInfo.getReplicaAddress(0));
    }
    if (!unknownAddresses.isEmpty() && logger.isLoggable(Level.WARNING)) {
      StringBuilder s=new StringBuilder("String_Node_Str").append("String_Node_Str").append(sender).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
      for (      Address address : unknownAddresses) {
        s.append("String_Node_Str").append(address);
      }
      s.append("String_Node_Str");
      logger.warning(s.toString());
    }
    stateVersion.set(partitionState.getVersion());
    initialized=true;
    Collection<MigrationInfo> completedMigrations=partitionState.getCompletedMigrations();
    for (    MigrationInfo completedMigration : completedMigrations) {
      addCompletedMigration(completedMigration);
      finalizeActiveMigration(completedMigration);
    }
    if (!activeMigrations.isEmpty()) {
      final MemberImpl masterMember=getMasterMember();
      rollbackActiveMigrationsFromPreviousMaster(masterMember.getUuid());
    }
    for (int partitionId=0; partitionId < partitionCount; partitionId++) {
      InternalPartitionImpl partition=partitions[partitionId];
      Address[] replicas=state[partitionId].getReplicaAddresses();
      partition.setPartitionInfo(replicas);
    }
  }
  finally {
    lock.unlock();
  }
}