Program: 156842
Project: 156842
Buggy source:
@Override public void onEntityUpdate(){
  if (!firstUpdateDone) {
    firstUpdate();
    firstUpdateDone=true;
  }
  if (!worldObj.isRemote && needsUpdate) {
    updateDataServer();
    needsUpdate=false;
  }
  if (worldObj.isRemote) {
    updateDataClient();
  }
  if (currentDockingStation != null) {
    motionX=0;
    motionY=0;
    motionZ=0;
    posX=currentDockingStation.x() + 0.5F + currentDockingStation.side().offsetX * 0.5F;
    posY=currentDockingStation.y() + 0.5F + currentDockingStation.side().offsetY * 0.5F;
    posZ=currentDockingStation.z() + 0.5F + currentDockingStation.side().offsetZ * 0.5F;
  }
  if (!worldObj.isRemote) {
    if (linkedDockingStation == null) {
      linkedDockingStation=RobotRegistry.getRegistry(worldObj).getStation(linkedDockingStationIndex.x,linkedDockingStationIndex.y,linkedDockingStationIndex.z,linkedDockingStationSide);
      linkedDockingStationIndex=null;
      if (linkedDockingStation.robotTaking() != this) {
        setDead();
        return;
      }
    }
    if (currentDockingStationIndex != null) {
      currentDockingStation=(DockingStation)RobotRegistry.getRegistry(worldObj).getStation(currentDockingStationIndex.x,currentDockingStationIndex.y,currentDockingStationIndex.z,currentDockingStationSide);
      currentDockingStationIndex=null;
    }
    if (linkedDockingStation != null) {
      mainAI.cycle();
      if (mjStored <= 0) {
        setDead();
      }
    }
  }
  super.onEntityUpdate();
}

Fixed version (ground truth):
@Override public void onEntityUpdate(){
  if (!firstUpdateDone) {
    firstUpdate();
    firstUpdateDone=true;
  }
  if (!worldObj.isRemote && needsUpdate) {
    updateDataServer();
    needsUpdate=false;
  }
  if (worldObj.isRemote) {
    updateDataClient();
    energyFX+=energySpendPerCycle;
    if (energyFX >= 10) {
      energyFX=0;
      ForgeDirection dir=ForgeDirection.values()[worldObj.rand.nextInt(6)];
      dir=ForgeDirection.UP;
      Minecraft.getMinecraft().effectRenderer.addEffect(new EntityRobotEnergyFX(worldObj,posX + dir.offsetX * 0.25,posY + dir.offsetY * 0.25,posZ + dir.offsetZ * 0.25,dir.offsetX * 0.05,dir.offsetY * 0.05,dir.offsetZ * 0.05,energySpendPerCycle < 1 ? 1 : energySpendPerCycle));
    }
  }
  if (currentDockingStation != null) {
    motionX=0;
    motionY=0;
    motionZ=0;
    posX=currentDockingStation.x() + 0.5F + currentDockingStation.side().offsetX * 0.5F;
    posY=currentDockingStation.y() + 0.5F + currentDockingStation.side().offsetY * 0.5F;
    posZ=currentDockingStation.z() + 0.5F + currentDockingStation.side().offsetZ * 0.5F;
  }
  if (!worldObj.isRemote) {
    if (linkedDockingStation == null) {
      linkedDockingStation=RobotRegistry.getRegistry(worldObj).getStation(linkedDockingStationIndex.x,linkedDockingStationIndex.y,linkedDockingStationIndex.z,linkedDockingStationSide);
      linkedDockingStationIndex=null;
      if (linkedDockingStation.robotTaking() != this) {
        setDead();
        return;
      }
    }
    if (currentDockingStationIndex != null) {
      currentDockingStation=(DockingStation)RobotRegistry.getRegistry(worldObj).getStation(currentDockingStationIndex.x,currentDockingStationIndex.y,currentDockingStationIndex.z,currentDockingStationSide);
      currentDockingStationIndex=null;
    }
    if (linkedDockingStation != null) {
      mainAI.cycle();
      if (energySpendPerCycle != (float)mainAI.getActiveAI().getEnergyCost()) {
        energySpendPerCycle=(float)mainAI.getActiveAI().getEnergyCost();
        needsUpdate=true;
      }
      if (mjStored <= 0) {
        setDead();
      }
    }
  }
  super.onEntityUpdate();
}