Program: 50424
Project: 50424
Buggy source:
void migrateBlock(final Block blockInfo){
  Block blockReal=blocks[blockInfo.getBlockId()];
  if (!thisAddress.equals(blockInfo.getOwner())) {
    throw new RuntimeException("String_Node_Str" + blockInfo);
  }
  if (!blockInfo.isMigrating()) {
    throw new RuntimeException("String_Node_Str" + blockInfo);
  }
  if (blockInfo.getOwner().equals(blockInfo.getMigrationAddress())) {
    throw new RuntimeException("String_Node_Str" + blockInfo);
  }
  if (!node.isActive() || node.factory.restarted) {
    return;
  }
  if (concurrentMapManager.isSuperClient()) {
    return;
  }
  if (blockReal.isMigrationStarted())   return;
  blockReal.setMigrationStarted(true);
  blockReal.setOwner(blockInfo.getOwner());
  blockReal.setMigrationAddress(blockInfo.getMigrationAddress());
  logger.log(Level.FINEST,"String_Node_Str" + blockInfo);
  List<Record> lsRecordsToMigrate=new ArrayList<Record>(1000);
  Collection<CMap> cmaps=concurrentMapManager.maps.values();
  for (  final CMap cmap : cmaps) {
    if (cmap.locallyOwnedMap != null) {
      cmap.locallyOwnedMap.reset();
    }
    for (    Record rec : cmap.mapRecords.values()) {
      if (rec.isActive() && concurrentMapManager.isOwned(rec)) {
        if (rec.getKey() == null || rec.getKey().size() == 0) {
          throw new RuntimeException("String_Node_Str" + rec.getKey());
        }
        if (rec.getBlockId() == blockInfo.getBlockId()) {
          Record recordCopy=rec.copy();
          lsRecordsToMigrate.add(recordCopy);
          cmap.markAsRemoved(rec);
        }
      }
    }
  }
  logger.log(Level.FINEST,"String_Node_Str" + lsRecordsToMigrate.size() + "String_Node_Str"+ blockInfo);
  final CountDownLatch latch=new CountDownLatch(lsRecordsToMigrate.size());
  for (  final Record rec : lsRecordsToMigrate) {
    final CMap cmap=concurrentMapManager.getMap(rec.getName());
    parallelExecutorMigration.execute(new FallThroughRunnable(){
      public void doRun(){
        try {
          concurrentMapManager.migrateRecord(cmap,rec);
        }
  finally {
          latch.countDown();
        }
      }
    }
);
  }
  parallelExecutorMigration.execute(new FallThroughRunnable(){
    public void doRun(){
      try {
        logger.log(Level.FINEST,"String_Node_Str" + blockInfo + "String_Node_Str");
        latch.await(10,TimeUnit.SECONDS);
        concurrentMapManager.enqueueAndReturn(new Processable(){
          public void process(){
            blockInfo.setOwner(blockInfo.getMigrationAddress());
            blockInfo.setMigrationAddress(null);
            completeMigration(blockInfo.getBlockId());
            sendCompletionInfo(blockInfo);
          }
        }
);
      }
 catch (      InterruptedException ignored) {
      }
    }
  }
);
}

Fixed version (ground truth):
void migrateBlock(final Block blockInfo){
  Block blockReal=blocks[blockInfo.getBlockId()];
  if (!thisAddress.equals(blockInfo.getOwner())) {
    throw new RuntimeException("String_Node_Str" + blockInfo);
  }
  if (!blockInfo.isMigrating()) {
    throw new RuntimeException("String_Node_Str" + blockInfo);
  }
  if (blockInfo.getOwner().equals(blockInfo.getMigrationAddress())) {
    throw new RuntimeException("String_Node_Str" + blockInfo);
  }
  if (!node.isActive() || node.factory.restarted) {
    return;
  }
  if (concurrentMapManager.isSuperClient()) {
    return;
  }
  if (blockReal.isMigrationStarted())   return;
  blockReal.setMigrationStarted(true);
  blockReal.setOwner(blockInfo.getOwner());
  blockReal.setMigrationAddress(blockInfo.getMigrationAddress());
  logger.log(Level.FINEST,"String_Node_Str" + blockInfo);
  List<Record> lsRecordsToMigrate=new ArrayList<Record>(1000);
  Collection<CMap> cmaps=concurrentMapManager.maps.values();
  for (  final CMap cmap : cmaps) {
    if (cmap.locallyOwnedMap != null) {
      cmap.locallyOwnedMap.reset();
    }
    for (    Record rec : cmap.mapRecords.values()) {
      if (rec.isActive() && concurrentMapManager.isOwned(rec)) {
        if (rec.getKey() == null || rec.getKey().size() == 0) {
          throw new RuntimeException("String_Node_Str" + rec.getKey());
        }
        if (rec.getBlockId() == blockInfo.getBlockId()) {
          Record recordCopy=rec.copy();
          lsRecordsToMigrate.add(recordCopy);
          cmap.markAsRemoved(rec);
        }
      }
    }
  }
  logger.log(Level.FINEST,"String_Node_Str" + lsRecordsToMigrate.size() + "String_Node_Str"+ blockInfo);
  final CountDownLatch latch=new CountDownLatch(lsRecordsToMigrate.size());
  for (  final Record rec : lsRecordsToMigrate) {
    final CMap cmap=concurrentMapManager.getMap(rec.getName());
    parallelExecutorMigration.execute(new FallThroughRunnable(){
      public void doRun(){
        try {
          concurrentMapManager.migrateRecord(cmap,rec);
        }
  finally {
          latch.countDown();
        }
      }
    }
);
  }
  parallelExecutorMigration.execute(new FallThroughRunnable(){
    public void doRun(){
      try {
        logger.log(Level.FINEST,"String_Node_Str" + blockInfo + "String_Node_Str");
        latch.await(10,TimeUnit.SECONDS);
      }
 catch (      InterruptedException ignored) {
      }
 finally {
        concurrentMapManager.enqueueAndReturn(new Processable(){
          public void process(){
            blockInfo.setOwner(blockInfo.getMigrationAddress());
            blockInfo.setMigrationAddress(null);
            completeMigration(blockInfo.getBlockId());
            sendCompletionInfo(blockInfo);
          }
        }
);
      }
    }
  }
);
}