Program: 59437
Project: 59437
Buggy source:
@Override public void onEntityCollidedWithBlock(Entity entity){
  if (!isActive || destination == -1 || entity.worldObj.isRemote) {
    return;
  }
  if (entity.timeUntilPortal > TELEPORT_DELAY) {
    entity.timeUntilPortal=entity.getPortalCooldown() + TELEPORT_DELAY;
    return;
  }
  if (!RegistryEnderAttuned.getRegistry().hasDestination(this)) {
    if (destination != -1) {
      internalSet.set(Boolean.FALSE);
      clearDestination();
      internalSet.set(null);
    }
    return;
  }
  IEnderDestination dest=RegistryEnderAttuned.getRegistry().getDestination(this,true);
  if (dest == null) {
    return;
  }
  int teleportCost=TELEPORT_COST;
  if (dest.dimension() != dimension()) {
    teleportCost=DIMENSION_TELEPORT_COST;
  }
  if (entity instanceof EntityEnderman) {
    teleportCost*=2;
  }
  if (storage.getEnergyStored() < teleportCost) {
    return;
  }
  Class<? extends Entity> comp=Entity.class;
  if (!getAccess().isPublic()) {
    comp=EntityPlayer.class;
  }
  if (!comp.isInstance(entity)) {
    return;
  }
  l:   if (!getAccess().isPublic()) {
    o:     if (entity instanceof EntityItem) {
      String name=((EntityItem)entity).func_145800_j();
      if (name == null) {
        break o;
      }
      if (getAccess().isRestricted() && SocialRegistry.playerHasAccess(name,getOwner())) {
        break l;
      }
      GameProfile i=MinecraftServer.getServer().func_152358_ax().func_152655_a(name);
      if (getOwner().getId().equals(i.getId())) {
        break l;
      }
    }
 else     if (canPlayerAccess((EntityPlayer)entity)) {
      break l;
    }
    return;
  }
  if (entity instanceof EntityLivingBase) {
    if (entity.timeUntilPortal++ <= TELEPORT_DELAY) {
      if (!(entity instanceof EntityPlayerMP)) {
        entity.timeUntilPortal++;
      }
      World world=entity.worldObj;
      int i=entity.timeUntilPortal >= TELEPORT_DELAY ? 100 : 99;
      double x=entity.posX, z=entity.posZ, y=entity.posY;
      y+=entity.height * .75;
      int amt=entity.timeUntilPortal * 5 / PARTICLE_DELAY;
      l:       if (i == 100 || amt != ((entity.timeUntilPortal - 2) * 5 / PARTICLE_DELAY)) {
        if (i != 100 && entity.timeUntilPortal > PARTICLE_DELAY) {
          break l;
        }
        PacketCoFHBase packet=getModePacket();
        packet.addByte(i);
        if (i == 99) {
          packet.addInt(amt);
        }
        packet.addFloat((float)x);
        packet.addFloat((float)y);
        packet.addFloat((float)z);
        if (i == 100) {
          packet.addInt(entity.getEntityId());
          packet.addInt(dest.x());
          packet.addInt(dest.y());
          packet.addInt(dest.z());
          packet.addInt(dest.dimension());
        }
        TargetPoint targ=new TargetPoint(world.provider.dimensionId,xCoord,yCoord,zCoord,50);
        PacketHandler.sendToAllAround(packet,targ);
      }
      if (i == 99) {
        return;
      }
    }
    entity.timeUntilPortal=entity.getPortalCooldown() + TELEPORT_DELAY;
  }
  if (storage.extractEnergy(teleportCost,false) == teleportCost) {
    if (dest.dimension() != dimension()) {
      EntityHelper.transferEntityToDimension(entity,dest.dimension(),MinecraftServer.getServer().getConfigurationManager());
    }
    teleportEntity(entity,dest.x() + .5,dest.y() + .2,dest.z() + .5);
  }
}

Fixed version (ground truth):
@Override public void onEntityCollidedWithBlock(Entity entity){
  if (destination == -1 || entity.worldObj.isRemote) {
    return;
  }
  if (entity.timeUntilPortal > TELEPORT_DELAY) {
    entity.timeUntilPortal=entity.getPortalCooldown() + TELEPORT_DELAY;
    return;
  }
  if (!RegistryEnderAttuned.getRegistry().hasDestination(this)) {
    if (destination != -1) {
      internalSet.set(Boolean.FALSE);
      clearDestination();
      internalSet.set(null);
    }
    return;
  }
  IEnderDestination dest=RegistryEnderAttuned.getRegistry().getDestination(this,true);
  if (dest == null) {
    return;
  }
  if (dest.isNotValid()) {
    ;
  }
  int teleportCost=TELEPORT_COST;
  if (dest.dimension() != dimension()) {
    teleportCost=DIMENSION_TELEPORT_COST;
  }
  if (entity instanceof EntityEnderman) {
    teleportCost*=2;
  }
  if (storage.getEnergyStored() < teleportCost) {
    return;
  }
  Class<? extends Entity> comp=Entity.class;
  if (!getAccess().isPublic()) {
    comp=EntityPlayer.class;
  }
  if (!comp.isInstance(entity)) {
    return;
  }
  l:   if (!getAccess().isPublic()) {
    o:     if (entity instanceof EntityItem) {
      String name=((EntityItem)entity).func_145800_j();
      if (name == null) {
        break o;
      }
      if (getAccess().isRestricted() && SocialRegistry.playerHasAccess(name,getOwner())) {
        break l;
      }
      GameProfile i=MinecraftServer.getServer().func_152358_ax().func_152655_a(name);
      if (getOwner().getId().equals(i.getId())) {
        break l;
      }
    }
 else     if (canPlayerAccess((EntityPlayer)entity)) {
      break l;
    }
    return;
  }
  if (entity instanceof EntityLivingBase) {
    if (entity.timeUntilPortal++ <= TELEPORT_DELAY) {
      if (!(entity instanceof EntityPlayerMP)) {
        entity.timeUntilPortal++;
      }
      World world=entity.worldObj;
      int i=entity.timeUntilPortal >= TELEPORT_DELAY ? 100 : 99;
      double x=entity.posX, z=entity.posZ, y=entity.posY;
      y+=entity.height * .75;
      int amt=entity.timeUntilPortal * 5 / PARTICLE_DELAY;
      l:       if (i == 100 || amt != ((entity.timeUntilPortal - 2) * 5 / PARTICLE_DELAY)) {
        if (i != 100 && entity.timeUntilPortal > PARTICLE_DELAY) {
          break l;
        }
        PacketCoFHBase packet=getModePacket();
        packet.addByte(i);
        if (i == 99) {
          packet.addInt(amt);
        }
        packet.addFloat((float)x);
        packet.addFloat((float)y);
        packet.addFloat((float)z);
        if (i == 100) {
          packet.addInt(entity.getEntityId());
          packet.addInt(dest.x());
          packet.addInt(dest.y());
          packet.addInt(dest.z());
          packet.addInt(dest.dimension());
        }
        TargetPoint targ=new TargetPoint(world.provider.dimensionId,xCoord,yCoord,zCoord,50);
        PacketHandler.sendToAllAround(packet,targ);
      }
      if (i == 99) {
        return;
      }
    }
    entity.timeUntilPortal=entity.getPortalCooldown() + TELEPORT_DELAY;
  }
  if (storage.extractEnergy(teleportCost,false) == teleportCost) {
    if (dest.dimension() != dimension()) {
      EntityHelper.transferEntityToDimension(entity,dest.dimension(),MinecraftServer.getServer().getConfigurationManager());
    }
    teleportEntity(entity,dest.x() + .5,dest.y() + .2,dest.z() + .5);
  }
}