Program: 50569
Project: 50569
Buggy source:
void doResetRecords(){
  InitialState initialState=new InitialState();
  Collection<CMap> cmaps=maps.values();
  for (  final CMap cmap : cmaps) {
    initialState.createAndAddMapState(cmap);
  }
  sendProcessableToAll(initialState,false);
  if (isSuperClient())   return;
  cmaps=maps.values();
  for (  final CMap cmap : cmaps) {
    final Object[] records=cmap.mapRecords.values().toArray();
    cmap.reset();
    for (    Object recObj : records) {
      final Record rec=(Record)recObj;
      if (rec.isActive()) {
        if (rec.getKey() == null || rec.getKey().size() == 0) {
          throw new RuntimeException("String_Node_Str" + rec.getKey());
        }
        executeLocally(new Runnable(){
          public void run(){
            MMigrate mmigrate=new MMigrate();
            if (cmap.isMultiMap()) {
              List<Data> values=rec.getMultiValues();
              if (values == null || values.size() == 0) {
                mmigrate.migrateMulti(rec,null);
              }
 else {
                for (                Data value : values) {
                  mmigrate.migrateMulti(rec,value);
                }
              }
            }
 else {
              boolean migrated=mmigrate.migrate(rec);
              if (!migrated) {
                logger.log(Level.FINEST,"String_Node_Str" + rec.getKey());
              }
            }
          }
        }
);
      }
    }
  }
  executeLocally(new Runnable(){
    public void run(){
      MultiMigrationComplete mmc=new MultiMigrationComplete();
      mmc.call();
      logger.log(Level.FINEST,"String_Node_Str");
    }
  }
);
}

Fixed version (ground truth):
void doResetRecords(){
  if (migrating) {
    throw new RuntimeException("String_Node_Str");
  }
  migrating=true;
  InitialState initialState=new InitialState();
  Collection<CMap> cmaps=maps.values();
  for (  final CMap cmap : cmaps) {
    initialState.createAndAddMapState(cmap);
  }
  sendProcessableToAll(initialState,false);
  if (isSuperClient())   return;
  cmaps=maps.values();
  final AtomicInteger count=new AtomicInteger(0);
  for (  final CMap cmap : cmaps) {
    final Object[] records=cmap.mapRecords.values().toArray();
    cmap.reset();
    for (    Object recObj : records) {
      final Record rec=(Record)recObj;
      if (rec.isActive()) {
        if (rec.getKey() == null || rec.getKey().size() == 0) {
          throw new RuntimeException("String_Node_Str" + rec.getKey());
        }
        count.incrementAndGet();
        executeLocally(new Runnable(){
          public void run(){
            try {
              MMigrate mmigrate=new MMigrate();
              if (cmap.isMultiMap()) {
                List<Data> values=rec.getMultiValues();
                if (values == null || values.size() == 0) {
                  mmigrate.migrateMulti(rec,null);
                }
 else {
                  for (                  Data value : values) {
                    mmigrate.migrateMulti(rec,value);
                  }
                }
              }
 else {
                boolean migrated=mmigrate.migrate(rec);
                if (!migrated) {
                  logger.log(Level.FINEST,"String_Node_Str" + rec.getKey());
                }
              }
            }
  finally {
              count.decrementAndGet();
            }
          }
        }
);
      }
    }
  }
  executeLocally(new Runnable(){
    public void run(){
      while (count.get() != 0) {
        try {
          Thread.sleep(1000);
        }
 catch (        InterruptedException ignored) {
          return;
        }
      }
      MultiMigrationComplete mmc=new MultiMigrationComplete();
      mmc.call();
      logger.log(Level.FINEST,"String_Node_Str");
      migrating=false;
    }
  }
);
}