Program: 156580
Project: 156580
Buggy source:
private void render(TileRefinery tile,double x,double y,double z){
  FluidStack liquid1=null, liquid2=null, liquidResult=null;
  int color1=0xFFFFFF, color2=0xFFFFFF, colorResult=0xFFFFFF;
  float anim=0;
  int angle=0;
  ModelRenderer theMagnet=magnet[0];
  if (tile != null) {
    if (tile.tanks[0].getFluid() != null) {
      liquid1=tile.tanks[0].getFluid();
      color1=tile.tanks[0].colorRenderCache;
    }
    if (tile.tanks[1].getFluid() != null) {
      liquid2=tile.tanks[1].getFluid();
      color2=tile.tanks[1].colorRenderCache;
    }
    if (tile.result.getFluid() != null) {
      liquidResult=tile.result.getFluid();
      colorResult=tile.result.colorRenderCache;
    }
    anim=tile.getAnimationStage();
    IBlockState state=tile.getWorld().getBlockState(tile.getPos());
    EnumFacing face=BuildCraftProperties.BLOCK_FACING.getValue(state);
    while (face != EnumFacing.EAST) {
      face=face.rotateY();
      angle+=90;
    }
    if (tile.animationSpeed <= 1) {
      theMagnet=magnet[0];
    }
 else     if (tile.animationSpeed <= 2.5) {
      theMagnet=magnet[1];
    }
 else     if (tile.animationSpeed <= 4.5) {
      theMagnet=magnet[2];
    }
 else {
      theMagnet=magnet[3];
    }
  }
  GL11.glPushMatrix();
  GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
  GlStateManager.enableLighting();
  GlStateManager.disableCull();
  GlStateManager.enableAlpha();
  GL11.glTranslatef((float)x + 0.5F,(float)y + 0.5F,(float)z + 0.5F);
  GL11.glScalef(0.99F,0.99F,0.99F);
  GL11.glRotatef(angle,0,1,0);
  bindTexture(TEXTURE);
  GL11.glPushMatrix();
  GL11.glTranslatef(-0.5F,-0.5F,-0.5F);
  GL11.glTranslatef(-4F * pixel,0,-4F * pixel);
  tank.render(pixel);
  GL11.glTranslatef(4F * pixel,0,4F * pixel);
  GL11.glTranslatef(-4F * pixel,0,4F * pixel);
  tank.render(pixel);
  GL11.glTranslatef(4F * pixel,0,-4F * pixel);
  GL11.glTranslatef(4F * pixel,0,0);
  tank.render(pixel);
  GL11.glTranslatef(-4F * pixel,0,0);
  GL11.glPopMatrix();
  float trans1, trans2;
  if (anim <= 100) {
    trans1=12F * pixel * anim / 100F;
    trans2=0;
  }
 else   if (anim <= 200) {
    trans1=12F * pixel - (12F * pixel * (anim - 100F) / 100F);
    trans2=12F * pixel * (anim - 100F) / 100F;
  }
 else {
    trans1=12F * pixel * (anim - 200F) / 100F;
    trans2=12F * pixel - (12F * pixel * (anim - 200F) / 100F);
  }
  GL11.glPushMatrix();
  GL11.glScalef(0.99F,0.99F,0.99F);
  GL11.glTranslatef(-0.51F,trans1 - 0.5F,-0.5F);
  theMagnet.render(pixel);
  GL11.glPopMatrix();
  GL11.glPushMatrix();
  GL11.glScalef(0.99F,0.99F,0.99F);
  GL11.glTranslatef(-0.51F,trans2 - 0.5F,12F * pixel - 0.5F);
  theMagnet.render(pixel);
  GL11.glPopMatrix();
  if (tile != null) {
    GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
    GlStateManager.enableCull();
    GlStateManager.disableLighting();
    GlStateManager.enableBlend();
    GlStateManager.blendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
    GL11.glTranslatef(-0.5F,-0.5F,-0.5F);
    GL11.glScalef(0.5F,1,0.5F);
    if (liquid1 != null && liquid1.amount > 0) {
      int[] list1=FluidRenderer.getFluidDisplayLists(liquid1,false);
      if (list1 != null) {
        bindTexture(TextureMap.locationBlocksTexture);
        RenderUtils.setGLColorFromInt(color1);
        GL11.glCallList(list1[getDisplayListIndex(tile.tanks[0])]);
      }
    }
    if (liquid2 != null && liquid2.amount > 0) {
      int[] list2=FluidRenderer.getFluidDisplayLists(liquid2,false);
      if (list2 != null) {
        GL11.glPushMatrix();
        GL11.glTranslatef(0,0,1);
        bindTexture(TextureMap.locationBlocksTexture);
        RenderUtils.setGLColorFromInt(color2);
        GL11.glCallList(list2[getDisplayListIndex(tile.tanks[1])]);
        GL11.glPopMatrix();
      }
    }
    if (liquidResult != null && liquidResult.amount > 0) {
      int[] list3=FluidRenderer.getFluidDisplayLists(liquidResult,false);
      if (list3 != null) {
        GL11.glPushMatrix();
        GL11.glTranslatef(1,0,0.5F);
        bindTexture(TextureMap.locationBlocksTexture);
        RenderUtils.setGLColorFromInt(colorResult);
        GL11.glCallList(list3[getDisplayListIndex(tile.result)]);
        GL11.glPopMatrix();
      }
    }
    GL11.glPopAttrib();
  }
  GL11.glPopAttrib();
  GL11.glPopMatrix();
  GlStateManager.enableLighting();
  GlStateManager.disableCull();
  GlStateManager.disableAlpha();
}

Fixed version (ground truth):
private void render(TileRefinery tile,double x,double y,double z){
  FluidStack liquid1=null, liquid2=null, liquidResult=null;
  int color1=0xFFFFFF, color2=0xFFFFFF, colorResult=0xFFFFFF;
  float anim=0;
  int angle=0;
  ModelRenderer theMagnet=magnet[0];
  if (tile != null) {
    if (tile.tanks[0].getFluid() != null) {
      liquid1=tile.tanks[0].getFluid();
      color1=tile.tanks[0].colorRenderCache;
    }
    if (tile.tanks[1].getFluid() != null) {
      liquid2=tile.tanks[1].getFluid();
      color2=tile.tanks[1].colorRenderCache;
    }
    if (tile.result.getFluid() != null) {
      liquidResult=tile.result.getFluid();
      colorResult=tile.result.colorRenderCache;
    }
    anim=tile.getAnimationStage();
    IBlockState state=tile.getWorld().getBlockState(tile.getPos());
    EnumFacing face=BuildCraftProperties.BLOCK_FACING.getValue(state);
    while (face != EnumFacing.EAST) {
      face=face.rotateY();
      angle+=90;
    }
    if (tile.animationSpeed <= 1) {
      theMagnet=magnet[0];
    }
 else     if (tile.animationSpeed <= 2.5) {
      theMagnet=magnet[1];
    }
 else     if (tile.animationSpeed <= 4.5) {
      theMagnet=magnet[2];
    }
 else {
      theMagnet=magnet[3];
    }
  }
  GL11.glPushMatrix();
  GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
  GlStateManager.enableLighting();
  GlStateManager.disableCull();
  GlStateManager.enableAlpha();
  GL11.glTranslatef((float)x + 0.5F,(float)y + 0.5F,(float)z + 0.5F);
  GL11.glScalef(0.99F,0.99F,0.99F);
  GL11.glRotatef(angle,0,1,0);
  bindTexture(TEXTURE);
  GL11.glPushMatrix();
  GL11.glTranslatef(-0.5F,-0.5F,-0.5F);
  GL11.glTranslatef(-4F * pixel,0,-4F * pixel);
  tank.render(pixel);
  GL11.glTranslatef(4F * pixel,0,4F * pixel);
  GL11.glTranslatef(-4F * pixel,0,4F * pixel);
  tank.render(pixel);
  GL11.glTranslatef(4F * pixel,0,-4F * pixel);
  GL11.glTranslatef(4F * pixel,0,0);
  tank.render(pixel);
  GL11.glTranslatef(-4F * pixel,0,0);
  GL11.glPopMatrix();
  float trans1, trans2;
  if (anim <= 100) {
    trans1=12F * pixel * anim / 100F;
    trans2=0;
  }
 else   if (anim <= 200) {
    trans1=12F * pixel - (12F * pixel * (anim - 100F) / 100F);
    trans2=12F * pixel * (anim - 100F) / 100F;
  }
 else {
    trans1=12F * pixel * (anim - 200F) / 100F;
    trans2=12F * pixel - (12F * pixel * (anim - 200F) / 100F);
  }
  GL11.glPushMatrix();
  GL11.glScalef(0.99F,0.99F,0.99F);
  GL11.glTranslatef(-0.51F,trans1 - 0.5F,-0.5F);
  theMagnet.render(pixel);
  GL11.glPopMatrix();
  GL11.glPushMatrix();
  GL11.glScalef(0.99F,0.99F,0.99F);
  GL11.glTranslatef(-0.51F,trans2 - 0.5F,12F * pixel - 0.5F);
  theMagnet.render(pixel);
  GL11.glPopMatrix();
  if (tile != null) {
    GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
    GlStateManager.enableCull();
    GlStateManager.disableLighting();
    GlStateManager.enableBlend();
    GlStateManager.blendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
    if (liquid1 != null && liquid1.amount > 0) {
      int[] list1=FluidRenderer.getFluidDisplayLists(liquid1,false,TANK_SIZE);
      if (list1 != null) {
        bindTexture(TextureMap.locationBlocksTexture);
        RenderUtils.setGLColorFromInt(color1);
        GL11.glPushMatrix();
        GL11.glTranslatef(-0.25f,0,-0.25f);
        GL11.glScalef(0.99f,0.99f,0.99f);
        GL11.glTranslatef(-0.25f,-0.5f,-0.25f);
        GL11.glCallList(list1[getDisplayListIndex(tile.tanks[0])]);
        GL11.glPopMatrix();
      }
    }
    if (liquid2 != null && liquid2.amount > 0) {
      int[] list2=FluidRenderer.getFluidDisplayLists(liquid2,false,TANK_SIZE);
      if (list2 != null) {
        GL11.glPushMatrix();
        GL11.glTranslatef(-0.25f,0,0.25f);
        GL11.glScalef(0.99f,0.99f,0.99f);
        GL11.glTranslatef(-0.25f,-0.5f,-0.25f);
        bindTexture(TextureMap.locationBlocksTexture);
        RenderUtils.setGLColorFromInt(color2);
        GL11.glCallList(list2[getDisplayListIndex(tile.tanks[1])]);
        GL11.glPopMatrix();
      }
    }
    if (liquidResult != null && liquidResult.amount > 0) {
      int[] list3=FluidRenderer.getFluidDisplayLists(liquidResult,false,TANK_SIZE);
      if (list3 != null) {
        GL11.glPushMatrix();
        GL11.glTranslatef(0.25f,0,0);
        GL11.glScalef(0.99f,0.99f,0.99f);
        GL11.glTranslatef(-0.25f,-0.5f,-0.25f);
        bindTexture(TextureMap.locationBlocksTexture);
        RenderUtils.setGLColorFromInt(colorResult);
        GL11.glCallList(list3[getDisplayListIndex(tile.result)]);
        GL11.glPopMatrix();
      }
    }
    GL11.glPopAttrib();
  }
  GL11.glPopAttrib();
  GL11.glPopMatrix();
  GlStateManager.enableLighting();
  GlStateManager.disableCull();
  GlStateManager.disableAlpha();
}