Program: 177485
Project: 177485
Buggy source:
public void startTickRun(int stage,long delta) throws InterruptedException {
switch (stage) {
case 0:
{
      if (!spawnQueue.isEmpty()) {
        SpoutEntity e;
        while ((e=(SpoutEntity)spawnQueue.poll()) != null) {
          this.allocate(e);
          EntitySpawnEvent event=new EntitySpawnEvent(e,e.getPosition());
          Spout.getEngine().getEventManager().callEvent(event);
          if (event.isCancelled()) {
            this.deallocate((SpoutEntity)e);
          }
        }
      }
      if (!removeQueue.isEmpty()) {
        SpoutEntity e;
        while ((e=(SpoutEntity)removeQueue.poll()) != null) {
          this.deallocate(e);
        }
      }
      float dt=delta / 1000.f;
      for (      SpoutEntity ent : entityManager) {
        try {
          ent.onTick(dt);
        }
 catch (        Exception e) {
          Spout.getEngine().getLogger().severe("String_Node_Str" + ent.toString());
          e.printStackTrace();
        }
      }
      World world=getWorld();
      int[] updates;
      Object[] sources;
synchronized (queuedPhysicsUpdates) {
        updates=queuedPhysicsUpdates.keys();
        sources=queuedPhysicsUpdates.values();
        queuedPhysicsUpdates.clear();
      }
      for (int i=0; i < updates.length; i++) {
        int key=updates[i];
        Source source=(Source)sources[i];
        int x=TByteTripleObjectHashMap.key1(key);
        int y=TByteTripleObjectHashMap.key2(key);
        int z=TByteTripleObjectHashMap.key3(key);
        Chunk chunk=chunks[x >> Chunk.CHUNK_SIZE_BITS][y >> Chunk.CHUNK_SIZE_BITS][z >> Chunk.CHUNK_SIZE_BITS].get();
        if (chunk != null) {
          BlockMaterial material=chunk.getBlockMaterial(x,y,z);
          if (material.hasPhysics()) {
            Block block=world.getBlock(x + (getX() << blockShifts),y + (getY() << blockShifts),z + (getZ() << blockShifts),source);
            material.onUpdate(block);
          }
        }
      }
      for (int i=0; i < LIGHT_PER_TICK; i++) {
        SpoutChunk toLight=lightingQueue.poll();
        if (toLight == null) {
          break;
        }
        if (toLight.isLoaded()) {
          toLight.processQueuedLighting();
        }
      }
      for (int i=0; i < POPULATE_PER_TICK; i++) {
        Chunk toPopulate=populationQueue.poll();
        if (toPopulate == null) {
          break;
        }
        if (toPopulate.isLoaded()) {
          toPopulate.populate();
        }
      }
      Chunk toUnload=unloadQueue.poll();
      if (toUnload != null) {
        toUnload.unload(true);
      }
      break;
    }
case 1:
{
    Set<SpoutEntity> resolvers=new HashSet<SpoutEntity>();
    boolean shouldResolve;
    for (    SpoutEntity ent : entityManager) {
      shouldResolve=ent.preResolve();
      if (shouldResolve) {
        resolvers.add(ent);
      }
    }
    for (    SpoutEntity ent : resolvers) {
      try {
        ent.resolve();
      }
 catch (      Exception e) {
        Spout.getEngine().getLogger().severe("String_Node_Str" + ent.toString());
        e.printStackTrace();
      }
    }
    break;
  }
default :
{
  throw new IllegalStateException("String_Node_Str");
}
}
}

Fixed version (ground truth):
public void startTickRun(int stage,long delta) throws InterruptedException {
switch (stage) {
case 0:
{
      float dt=delta / 1000.f;
      for (      SpoutEntity ent : entityManager) {
        try {
          if (ent.getRegionLive() != this) {
            System.out.println("String_Node_Str" + ent.getRegionLive() + "String_Node_Str"+ toString());
          }
          ent.onTick(dt);
        }
 catch (        Exception e) {
          Spout.getEngine().getLogger().severe("String_Node_Str" + ent.toString());
          e.printStackTrace();
        }
      }
      World world=getWorld();
      int[] updates;
      Object[] sources;
synchronized (queuedPhysicsUpdates) {
        updates=queuedPhysicsUpdates.keys();
        sources=queuedPhysicsUpdates.values();
        queuedPhysicsUpdates.clear();
      }
      for (int i=0; i < updates.length; i++) {
        int key=updates[i];
        Source source=(Source)sources[i];
        int x=TByteTripleObjectHashMap.key1(key);
        int y=TByteTripleObjectHashMap.key2(key);
        int z=TByteTripleObjectHashMap.key3(key);
        Chunk chunk=chunks[x >> Chunk.CHUNK_SIZE_BITS][y >> Chunk.CHUNK_SIZE_BITS][z >> Chunk.CHUNK_SIZE_BITS].get();
        if (chunk != null) {
          BlockMaterial material=chunk.getBlockMaterial(x,y,z);
          if (material.hasPhysics()) {
            Block block=world.getBlock(x + (getX() << blockShifts),y + (getY() << blockShifts),z + (getZ() << blockShifts),source);
            material.onUpdate(block);
          }
        }
      }
      for (int i=0; i < LIGHT_PER_TICK; i++) {
        SpoutChunk toLight=lightingQueue.poll();
        if (toLight == null) {
          break;
        }
        if (toLight.isLoaded()) {
          toLight.processQueuedLighting();
        }
      }
      for (int i=0; i < POPULATE_PER_TICK; i++) {
        Chunk toPopulate=populationQueue.poll();
        if (toPopulate == null) {
          break;
        }
        if (toPopulate.isLoaded()) {
          toPopulate.populate();
        }
      }
      Chunk toUnload=unloadQueue.poll();
      if (toUnload != null) {
        toUnload.unload(true);
      }
      break;
    }
case 1:
{
    Set<SpoutEntity> resolvers=new HashSet<SpoutEntity>();
    boolean shouldResolve;
    for (    SpoutEntity ent : entityManager) {
      shouldResolve=ent.preResolve();
      if (shouldResolve) {
        resolvers.add(ent);
      }
    }
    for (    SpoutEntity ent : resolvers) {
      try {
        ent.resolve();
      }
 catch (      Exception e) {
        Spout.getEngine().getLogger().severe("String_Node_Str" + ent.toString());
        e.printStackTrace();
      }
    }
    break;
  }
default :
{
  throw new IllegalStateException("String_Node_Str");
}
}
}