Program: 153739
Project: 153739
Buggy source:
public void e_on_event(Event event){
  if (event instanceof EEntityMove) {
    EEntityMove move_event=(EEntityMove)event;
    getLayer().move_entity(move_event.entity,move_event.getTo());
    if (move_event.entity.isPlayerEnt()) {
      WorldViewCamera.target.setLocation(move_event.entity.origin);
    }
  }
 else   if (event instanceof EEntitySpawn) {
    EEntitySpawn spawn_event=(EEntitySpawn)event;
    WorldChunk new_chunk=getLayer().get_cached_chunk(WorldChunk.get_chunk_coord(spawn_event.ent.origin));
    EEntityChangeChunk e_change_chunk=new EEntityChangeChunk(spawn_event.ent,null,new_chunk);
    e_change_chunk.post();
    Point ent_origin=spawn_event.ent.origin;
    WorldTile spawn_tile=getLayer().get_tile(ent_origin.getX(),ent_origin.getY());
    Point region_coord=WorldRegion.get_region_coord(ent_origin);
    if (spawn_tile != null) {
      spawn_tile.add_entity(spawn_event.ent);
    }
 else {
      throw new RuntimeException("String_Node_Str" + ent_origin + "String_Node_Str");
    }
    if (spawn_event.ent.light_amt > 0.0f) {
      getLayer().invalidate_light();
    }
  }
 else   if (event instanceof EEntityChangeChunk) {
    EEntityChangeChunk e_change_chunk=(EEntityChangeChunk)event;
    Entity ent=e_change_chunk.ent;
    e_change_chunk.to.add_entity(ent);
    if (ent.isPlayerEnt()) {
      getLayer().update_terrain();
      WorldCluster.locate(e_change_chunk.to.origin);
      getLayer().chunk_gc();
    }
  }
 else   if (event instanceof ETakeDamage) {
    ETakeDamage dmg_event=(ETakeDamage)event;
    if (dmg_event.dmg.type != DamageType.DMG_FIRE && dmg_event.dmg.type != DamageType.DMG_MAGIC) {
      Point dmg_origin=new Point();
      dmg_origin.setLocation(dmg_event.ent.origin);
      WorldTile tile=getLayer().get_tile(dmg_origin.getX(),dmg_origin.getY());
      if (!tile.has_ent(EntDecalBlood.class)) {
        EntDecalBlood blood=new EntDecalBlood();
        blood.spawn(dmg_origin);
      }
 else {
        EntDecalBlood blood=(EntDecalBlood)tile.getEntity(EntDecalBlood.class);
        blood.nextTile();
      }
    }
  }
}

Fixed version (ground truth):
public void e_on_event(Event event){
  if (event instanceof EEntityMove) {
    EEntityMove move_event=(EEntityMove)event;
    getLayer().move_entity(move_event.entity,move_event.getTo());
    if (move_event.entity.isPlayerEnt()) {
      WorldViewCamera.target.setLocation(move_event.entity.origin);
    }
  }
 else   if (event instanceof EEntitySpawn) {
    EEntitySpawn spawn_event=(EEntitySpawn)event;
    WorldChunk new_chunk=getLayer().get_cached_chunk(WorldChunk.get_chunk_coord(spawn_event.ent.origin));
    EEntityChangeChunk e_change_chunk=new EEntityChangeChunk(spawn_event.ent,null,new_chunk);
    e_change_chunk.post();
    Point ent_origin=spawn_event.ent.origin;
    WorldTile spawn_tile=getLayer().get_tile(ent_origin.getX(),ent_origin.getY());
    Point region_coord=WorldRegion.get_region_coord(ent_origin);
    if (spawn_tile != null) {
      spawn_tile.add_entity(spawn_event.ent);
    }
 else {
      throw new RuntimeException("String_Node_Str" + ent_origin + "String_Node_Str");
    }
    if (spawn_event.ent.light_amt > 0.0f) {
      getLayer().invalidate_light();
    }
  }
 else   if (event instanceof EEntityChangeChunk) {
    EEntityChangeChunk e_change_chunk=(EEntityChangeChunk)event;
    Entity ent=e_change_chunk.ent;
    e_change_chunk.to.add_entity(ent);
    if (ent.isPlayerEnt()) {
      getLayer().update_terrain();
      WorldCluster.locate(e_change_chunk.to.origin);
      getLayer().chunk_gc();
    }
  }
 else   if (event instanceof ETakeDamage) {
    ETakeDamage dmg_event=(ETakeDamage)event;
    if (dmg_event.dmg.type != DamageType.DMG_FIRE && dmg_event.dmg.type != DamageType.DMG_MAGIC) {
      Point dmg_origin=new Point();
      dmg_origin.setLocation(dmg_event.ent.origin);
      WorldTile tile=getLayer().get_tile(dmg_origin.getX(),dmg_origin.getY());
      if (!tile.has_ent(EntDecalBlood.class)) {
        EntDecalBlood blood=new EntDecalBlood();
        blood.setLayerId(dmg_event.ent.getLayerId());
        blood.spawn(dmg_origin);
      }
 else {
        EntDecalBlood blood=(EntDecalBlood)tile.getEntity(EntDecalBlood.class);
        blood.nextTile();
      }
    }
  }
}