Program: 22302
Project: 22302
Buggy source:
@Override public void safeUpdate(){
  if (lastSteam != getSteamShare() > VACUUM_STEAM_CONSUMPTION) {
    markForResync();
  }
  lastSteam=getSteamShare() > VACUUM_STEAM_CONSUMPTION;
  if (!isInitialized) {
    powered=worldObj.isBlockPowered(pos);
    EnumFacing myDir=worldObj.getBlockState(pos).getValue(BlockVacuum.FACING);
    setValidDistributionDirectionsExcluding(myDir,myDir.getOpposite());
    isInitialized=true;
  }
  if (!worldObj.isRemote) {
    if ((getSteamShare() < VACUUM_STEAM_CONSUMPTION) || powered) {
      active=false;
    }
 else {
      active=true;
      decrSteam(VACUUM_STEAM_CONSUMPTION);
    }
  }
  if (active) {
    if (worldObj.isRemote) {
      rotateTicks++;
    }
    EnumFacing dir=worldObj.getBlockState(pos).getValue(BlockVacuum.FACING);
    float[] M={pos.getX() + 0.5F,pos.getY() + 0.5F,pos.getZ() + 0.5F};
    float[] N={pos.getX() + 0.5F + range * dir.getFrontOffsetX(),pos.getY() + 0.5F + range * dir.getFrontOffsetY(),pos.getZ() + 0.5F + range * dir.getFrontOffsetZ()};
    List<Entity> entities=worldObj.getEntitiesWithinAABB(Entity.class,new AxisAlignedBB(pos.getX() - 20,pos.getY() - 20,pos.getZ() - 20,pos.getX() + 20,pos.getY() + 20,pos.getZ() + 20));
    for (int i=0; i < 200; i++) {
      float[] X={(worldObj.rand.nextFloat() * 40.0F) - 20.0F + pos.getX(),(worldObj.rand.nextFloat() * 40.0F) - 20.0F + pos.getY(),(worldObj.rand.nextFloat() * 40.0F) - 20.0F + pos.getZ()};
      if (isLyingInCone(X,M,N,THETA) && worldObj.rayTraceBlocks(new Vec3d(X[0],X[1],X[2]),new Vec3d(pos.getX() + 0.5F + dir.getFrontOffsetX(),pos.getY() + 0.5F + dir.getFrontOffsetY(),pos.getZ() + 0.5F + dir.getFrontOffsetZ())) == null) {
        Vec3d vec=new Vec3d(X[0] - M[0],X[1] - M[1],X[2] - M[2]);
        vec=vec.normalize();
        worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,X[0],X[1],X[2],-vec.xCoord * 0.5F,-vec.yCoord * 0.5F,-vec.zCoord * 0.5F);
      }
    }
    for (    Entity entity : entities) {
      float[] X={(float)entity.posX,(float)entity.posY,(float)entity.posZ};
      if (isLyingInCone(X,M,N,THETA) && worldObj.rayTraceBlocks(new Vec3d(entity.posX,entity.posY,entity.posZ),new Vec3d(pos.getX() + 0.5F + dir.getFrontOffsetX(),pos.getY() + 0.5F + dir.getFrontOffsetY(),pos.getZ() + 0.5F + dir.getFrontOffsetZ())) == null) {
        if (!(entity instanceof EntityPlayer) || !(((EntityPlayer)entity).capabilities.isFlying && ((EntityPlayer)entity).capabilities.isCreativeMode)) {
          Vec3d vec=new Vec3d(X[0] - M[0],X[1] - M[1],X[2] - M[2]);
          vec=vec.normalize();
          double y=vec.yCoord;
          double x=vec.xCoord;
          double z=vec.zCoord;
          y*=1;
          if (entity.isSneaking()) {
            x*=0.25F;
            y*=0.25F;
            z*=0.25F;
          }
          entity.motionX-=x * 0.025F;
          entity.motionY-=y * 0.05F;
          entity.motionZ-=z * 0.025F;
          entity.fallDistance=0.0F;
        }
      }
    }
    List<EntityItem> list=worldObj.getEntitiesWithinAABB(EntityItem.class,new AxisAlignedBB(pos.getX() + dir.getFrontOffsetX() * 0.25F,pos.getY() + dir.getFrontOffsetY() * 0.25F,pos.getZ() + dir.getFrontOffsetZ() * 0.25F,pos.getX() + 1.0D + dir.getFrontOffsetX() * 0.25F,pos.getY() + 1.0D + dir.getFrontOffsetY() * 0.25F,pos.getZ() + 1.0D + dir.getFrontOffsetZ() * 0.25F));
    if (list.size() > 0) {
      EntityItem item=list.get(0);
      BlockPos offsetPos=new BlockPos(pos.getX() - dir.getFrontOffsetX(),pos.getY() - dir.getFrontOffsetY(),pos.getZ() - dir.getFrontOffsetZ());
      TileEntity tile=worldObj.getTileEntity(offsetPos);
      if (tile != null && tile instanceof ISidedInventory) {
        ISidedInventory inv=(ISidedInventory)tile;
        int[] access=inv.getSlotsForFace(dir.getOpposite());
        for (        int slot : access) {
          putInInventory(item,slot,inv);
        }
      }
 else       if (tile != null && tile instanceof IInventory) {
        IInventory inv=(IInventory)tile;
        for (int i=0; i < inv.getSizeInventory(); i++) {
          putInInventory(item,i,inv);
        }
      }
    }
  }
  super.safeUpdate();
}

Fixed version (ground truth):
@Override public void safeUpdate(){
  if (lastSteam != getSteamShare() > VACUUM_STEAM_CONSUMPTION) {
    markForResync();
  }
  lastSteam=getSteamShare() > VACUUM_STEAM_CONSUMPTION;
  if (!isInitialized) {
    powered=worldObj.isBlockPowered(pos);
    EnumFacing myDir=worldObj.getBlockState(pos).getValue(BlockVacuum.FACING);
    setValidDistributionDirectionsExcluding(myDir,myDir.getOpposite());
    isInitialized=true;
  }
  if (!worldObj.isRemote) {
    if ((getSteamShare() < VACUUM_STEAM_CONSUMPTION) || powered) {
      active=false;
    }
 else {
      active=true;
      decrSteam(VACUUM_STEAM_CONSUMPTION);
    }
  }
  if (active) {
    if (worldObj.isRemote) {
      rotateTicks++;
    }
    EnumFacing dir=worldObj.getBlockState(pos).getValue(BlockVacuum.FACING);
    float[] M={pos.getX() + 0.5F,pos.getY() + 0.5F,pos.getZ() + 0.5F};
    float[] N={pos.getX() + 0.5F + range * dir.getFrontOffsetX(),pos.getY() + 0.5F + range * dir.getFrontOffsetY(),pos.getZ() + 0.5F + range * dir.getFrontOffsetZ()};
    List<Entity> entities=worldObj.getEntitiesWithinAABB(Entity.class,new AxisAlignedBB(pos.getX() - 20,pos.getY() - 20,pos.getZ() - 20,pos.getX() + 20,pos.getY() + 20,pos.getZ() + 20));
    for (int i=0; i < 200; i++) {
      float[] X={(worldObj.rand.nextFloat() * 40.0F) - 20.0F + pos.getX(),(worldObj.rand.nextFloat() * 40.0F) - 20.0F + pos.getY(),(worldObj.rand.nextFloat() * 40.0F) - 20.0F + pos.getZ()};
      if (isLyingInCone(X,M,N,THETA) && worldObj.rayTraceBlocks(new Vec3d(X[0],X[1],X[2]),new Vec3d(pos.getX() + 0.5F + dir.getFrontOffsetX(),pos.getY() + 0.5F + dir.getFrontOffsetY(),pos.getZ() + 0.5F + dir.getFrontOffsetZ())) == null) {
        Vec3d vec=new Vec3d(X[0] - M[0],X[1] - M[1],X[2] - M[2]);
        vec=vec.normalize();
        worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,X[0],X[1],X[2],-vec.xCoord * 0.5F,-vec.yCoord * 0.5F,-vec.zCoord * 0.5F);
      }
    }
    for (    Entity entity : entities) {
      float[] X={(float)entity.posX,(float)entity.posY,(float)entity.posZ};
      if (isLyingInCone(X,M,N,THETA) && worldObj.rayTraceBlocks(new Vec3d(entity.posX,entity.posY,entity.posZ),new Vec3d(pos.getX() + 0.5F + dir.getFrontOffsetX(),pos.getY() + 0.5F + dir.getFrontOffsetY(),pos.getZ() + 0.5F + dir.getFrontOffsetZ())) == null) {
        if (!(entity instanceof EntityPlayer) || !(((EntityPlayer)entity).capabilities.isFlying && ((EntityPlayer)entity).capabilities.isCreativeMode)) {
          Vec3d vec=new Vec3d(X[0] - M[0],X[1] - M[1],X[2] - M[2]);
          vec=vec.normalize();
          double y=vec.yCoord;
          double x=vec.xCoord;
          double z=vec.zCoord;
          y*=1;
          if (entity.isSneaking()) {
            x*=0.25F;
            y*=0.25F;
            z*=0.25F;
          }
          entity.motionX-=x * 0.025F;
          entity.motionY-=y * 0.05F;
          entity.motionZ-=z * 0.025F;
          entity.fallDistance=0.0F;
        }
      }
    }
    List<EntityItem> list=worldObj.getEntitiesWithinAABB(EntityItem.class,new AxisAlignedBB(pos.getX() + dir.getFrontOffsetX() * 0.25F,pos.getY() + dir.getFrontOffsetY() * 0.25F,pos.getZ() + dir.getFrontOffsetZ() * 0.25F,pos.getX() + 1.0D + dir.getFrontOffsetX() * 0.25F,pos.getY() + 1.0D + dir.getFrontOffsetY() * 0.25F,pos.getZ() + 1.0D + dir.getFrontOffsetZ() * 0.25F));
    if (!list.isEmpty()) {
      EntityItem item=list.get(0);
      BlockPos offsetPos=new BlockPos(pos.getX() - dir.getFrontOffsetX(),pos.getY() - dir.getFrontOffsetY(),pos.getZ() - dir.getFrontOffsetZ());
      TileEntity tile=worldObj.getTileEntity(offsetPos);
      if (tile instanceof ISidedInventory) {
        ISidedInventory inv=(ISidedInventory)tile;
        int[] access=inv.getSlotsForFace(dir.getOpposite());
        for (        int slot : access) {
          if (putInInventory(item,slot,inv)) {
            break;
          }
        }
      }
 else       if (tile instanceof IInventory) {
        IInventory inv=(IInventory)tile;
        for (int i=0; i < inv.getSizeInventory(); i++) {
          if (putInInventory(item,i,inv)) {
            break;
          }
        }
      }
    }
  }
  super.safeUpdate();
}