Program: 10331
Project: 10331
Buggy source:
/** 
 * Creates an NBT list of all entities in this chunk, adding in custom entities.
 * @param chunk
 * @return
 */
public NBTTagList getEntityList(Chunk chunk){
  NBTTagList entityList=new NBTTagList();
  if (!WDLPluginChannels.canSaveEntities(chunk)) {
    return entityList;
  }
  List<Entity> entities=new ArrayList<Entity>();
  for (  ClassInheritanceMultiMap<Entity> map : chunk.getEntityLists()) {
    entities.addAll(map);
  }
  for (  Entity e : WDL.newEntities.get(chunk.getPos())) {
    e.isDead=false;
    entities.add(e);
  }
  for (  Entity entity : entities) {
    if (entity == null) {
      logger.warn("String_Node_Str" + chunk.getPos());
      continue;
    }
    if (!shouldSaveEntity(entity)) {
      continue;
    }
    for (    ModInfo<IEntityEditor> info : WDLApi.getImplementingExtensions(IEntityEditor.class)) {
      try {
        if (info.mod.shouldEdit(entity)) {
          info.mod.editEntity(entity);
        }
      }
 catch (      Exception ex) {
        throw new RuntimeException("String_Node_Str" + entity + "String_Node_Str"+ chunk.getPos()+ "String_Node_Str"+ info,ex);
      }
    }
    NBTTagCompound entityData=new NBTTagCompound();
    try {
      if (entity.writeToNBTOptional(entityData)) {
        chunk.setHasEntities(true);
        entityList.appendTag(entityData);
      }
    }
 catch (    Exception e) {
      WDLMessages.chatMessageTranslated(WDLMessageTypes.ERROR,"String_Node_Str",entity,chunk.xPosition,chunk.zPosition,e);
      logger.warn("String_Node_Str" + entityData);
      logger.warn("String_Node_Str");
      try {
        List<EntityDataManager.DataEntry<?>> objects=entity.getDataManager().getAll();
        if (objects == null) {
          logger.warn("String_Node_Str");
        }
 else {
          logger.warn(objects);
          for (          EntityDataManager.DataEntry<?> obj : objects) {
            if (obj != null) {
              logger.warn("String_Node_Str" + obj.getValue() + "String_Node_Str"+ obj.isDirty()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ obj.getKey().getId()+ "String_Node_Str"+ obj.getKey().getSerializer()+ "String_Node_Str");
            }
          }
        }
      }
 catch (      Exception e2) {
        logger.warn("String_Node_Str",e);
      }
      logger.warn("String_Node_Str");
      continue;
    }
  }
  return entityList;
}

Fixed version (ground truth):
/** 
 * Creates an NBT list of all entities in this chunk, adding in custom entities.
 * @param chunk
 * @return
 */
public NBTTagList getEntityList(Chunk chunk){
  NBTTagList entityList=new NBTTagList();
  if (!WDLPluginChannels.canSaveEntities(chunk)) {
    return entityList;
  }
  List<Entity> entities=new ArrayList<Entity>();
  for (  ClassInheritanceMultiMap<Entity> map : chunk.getEntityLists()) {
    entities.addAll(map);
  }
  for (  Entity e : WDL.newEntities.get(chunk.getPos())) {
    e.isDead=false;
    entities.add(e);
  }
  for (  Entity entity : entities) {
    if (entity == null) {
      logger.warn("String_Node_Str" + chunk.getPos());
      continue;
    }
    if (!shouldSaveEntity(entity)) {
      continue;
    }
    for (    ModInfo<IEntityEditor> info : WDLApi.getImplementingExtensions(IEntityEditor.class)) {
      try {
        if (info.mod.shouldEdit(entity)) {
          info.mod.editEntity(entity);
        }
      }
 catch (      Exception ex) {
        throw new RuntimeException("String_Node_Str" + entity + "String_Node_Str"+ chunk.getPos()+ "String_Node_Str"+ info,ex);
      }
    }
    NBTTagCompound entityData=new NBTTagCompound();
    try {
      if (entity.writeToNBTOptional(entityData)) {
        chunk.setHasEntities(true);
        entityList.appendTag(entityData);
      }
    }
 catch (    Exception e) {
      WDLMessages.chatMessageTranslated(WDLMessageTypes.ERROR,"String_Node_Str",entity,chunk.x,chunk.z,e);
      logger.warn("String_Node_Str" + entityData);
      logger.warn("String_Node_Str");
      try {
        List<EntityDataManager.DataEntry<?>> objects=entity.getDataManager().getAll();
        if (objects == null) {
          logger.warn("String_Node_Str");
        }
 else {
          logger.warn(objects);
          for (          EntityDataManager.DataEntry<?> obj : objects) {
            if (obj != null) {
              logger.warn("String_Node_Str" + obj.getValue() + "String_Node_Str"+ obj.isDirty()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ obj.getKey().getId()+ "String_Node_Str"+ obj.getKey().getSerializer()+ "String_Node_Str");
            }
          }
        }
      }
 catch (      Exception e2) {
        logger.warn("String_Node_Str",e);
      }
      logger.warn("String_Node_Str");
      continue;
    }
  }
  return entityList;
}