Program: 30803
Project: 30803
Buggy source:
public void drawSlot(Slot s){
  if (s instanceof SlotME) {
    RenderItem pIR=itemRender;
    itemRender=aeri;
    try {
      this.zLevel=100.0F;
      itemRender.zLevel=100.0F;
      if (!isPowered()) {
        GL11.glDisable(GL11.GL_LIGHTING);
        super.drawRect(s.xDisplayPosition,s.yDisplayPosition,16 + s.xDisplayPosition,16 + s.yDisplayPosition,0x66111111);
        GL11.glEnable(GL11.GL_LIGHTING);
      }
      this.zLevel=0.0F;
      itemRender.zLevel=0.0F;
      if (s instanceof SlotME)       aeri.aestack=((SlotME)s).getAEStack();
 else       aeri.aestack=null;
      safeDrawSlot(s);
    }
 catch (    Exception err) {
      AELog.warning("String_Node_Str" + err.toString());
      if (Platform.isDrawing(Tessellator.instance))       Tessellator.instance.draw();
    }
    itemRender=pIR;
    return;
  }
 else {
    try {
      ItemStack is=s.getStack();
      if (s instanceof AppEngSlot && (((AppEngSlot)s).renderIconWithItem() || is == null) && (((AppEngSlot)s).isEnabled())) {
        AppEngSlot aes=(AppEngSlot)s;
        if (aes.getIcon() >= 0) {
          bindTexture("String_Node_Str");
          GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
          Tessellator tessellator=Tessellator.instance;
          try {
            int uv_y=(int)Math.floor(aes.getIcon() / 16);
            int uv_x=aes.getIcon() - uv_y * 16;
            GL11.glEnable(GL11.GL_BLEND);
            GL11.glDisable(GL11.GL_LIGHTING);
            GL11.glEnable(GL11.GL_TEXTURE_2D);
            GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
            GL11.glColor4f(1.0f,1.0f,1.0f,1.0f);
            float par1=aes.xDisplayPosition;
            float par2=aes.yDisplayPosition;
            float par3=uv_x * 16;
            float par4=uv_y * 16;
            float par5=16;
            float par6=16;
            float f=0.00390625F;
            float f1=0.00390625F;
            tessellator.startDrawingQuads();
            tessellator.setColorRGBA_F(1.0f,1.0f,1.0f,aes.getOpacityOfIcon());
            tessellator.addVertexWithUV((double)(par1 + 0),(double)(par2 + par6),(double)this.zLevel,(double)((float)(par3 + 0) * f),(double)((float)(par4 + par6) * f1));
            tessellator.addVertexWithUV((double)(par1 + par5),(double)(par2 + par6),(double)this.zLevel,(double)((float)(par3 + par5) * f),(double)((float)(par4 + par6) * f1));
            tessellator.addVertexWithUV((double)(par1 + par5),(double)(par2 + 0),(double)this.zLevel,(double)((float)(par3 + par5) * f),(double)((float)(par4 + 0) * f1));
            tessellator.addVertexWithUV((double)(par1 + 0),(double)(par2 + 0),(double)this.zLevel,(double)((float)(par3 + 0) * f),(double)((float)(par4 + 0) * f1));
            tessellator.setColorRGBA_F(1.0f,1.0f,1.0f,1.0f);
            tessellator.draw();
          }
 catch (          Exception err) {
            if (Platform.isDrawing(tessellator))             tessellator.draw();
          }
          GL11.glPopAttrib();
        }
      }
      if (is != null && s instanceof AppEngSlot) {
        if (((AppEngSlot)s).isValid == hasCalculatedValidness.NotAvailable) {
          boolean isValid=s.isItemValid(is) || s instanceof SlotOutput || s instanceof AppEngCraftingSlot|| s instanceof SlotDisabled|| s instanceof SlotInaccessable|| s instanceof SlotFake;
          if (isValid && s instanceof SlotRestrictedInput) {
            try {
              isValid=((SlotRestrictedInput)s).isValid(is,this.mc.theWorld);
            }
 catch (            Exception err) {
              AELog.error(err);
            }
          }
          ((AppEngSlot)s).isValid=isValid ? hasCalculatedValidness.Valid : hasCalculatedValidness.Invalid;
        }
        if (((AppEngSlot)s).isValid == hasCalculatedValidness.Invalid) {
          this.zLevel=100.0F;
          itemRender.zLevel=100.0F;
          GL11.glDisable(GL11.GL_LIGHTING);
          super.drawRect(s.xDisplayPosition,s.yDisplayPosition,16 + s.xDisplayPosition,16 + s.yDisplayPosition,0x66ff6666);
          GL11.glEnable(GL11.GL_LIGHTING);
          this.zLevel=0.0F;
          itemRender.zLevel=0.0F;
        }
      }
      if (s instanceof AppEngSlot) {
        ((AppEngSlot)s).isDisplay=true;
        safeDrawSlot(s);
      }
 else       safeDrawSlot(s);
      return;
    }
 catch (    Exception err) {
      AELog.warning("String_Node_Str" + err.toString());
    }
  }
  safeDrawSlot(s);
}

Fixed version (ground truth):
public void drawSlot(Slot s){
  if (s instanceof SlotME) {
    RenderItem pIR=itemRender;
    itemRender=aeri;
    try {
      this.zLevel=100.0F;
      itemRender.zLevel=100.0F;
      if (!isPowered()) {
        GL11.glDisable(GL11.GL_LIGHTING);
        super.drawRect(s.xDisplayPosition,s.yDisplayPosition,16 + s.xDisplayPosition,16 + s.yDisplayPosition,0x66111111);
        GL11.glEnable(GL11.GL_LIGHTING);
      }
      this.zLevel=0.0F;
      itemRender.zLevel=0.0F;
      if (s instanceof SlotME)       aeri.aestack=((SlotME)s).getAEStack();
 else       aeri.aestack=null;
      safeDrawSlot(s);
    }
 catch (    Exception err) {
      AELog.warning("String_Node_Str" + err.toString());
      if (Platform.isDrawing(Tessellator.instance))       Tessellator.instance.draw();
    }
    itemRender=pIR;
    return;
  }
 else {
    try {
      ItemStack is=s.getStack();
      if (s instanceof AppEngSlot && (((AppEngSlot)s).renderIconWithItem() || is == null) && (((AppEngSlot)s).isEnabled())) {
        AppEngSlot aes=(AppEngSlot)s;
        if (aes.getIcon() >= 0) {
          bindTexture("String_Node_Str");
          GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
          Tessellator tessellator=Tessellator.instance;
          try {
            int uv_y=(int)Math.floor(aes.getIcon() / 16);
            int uv_x=aes.getIcon() - uv_y * 16;
            GL11.glEnable(GL11.GL_BLEND);
            GL11.glDisable(GL11.GL_LIGHTING);
            GL11.glEnable(GL11.GL_TEXTURE_2D);
            GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
            GL11.glColor4f(1.0f,1.0f,1.0f,1.0f);
            float par1=aes.xDisplayPosition;
            float par2=aes.yDisplayPosition;
            float par3=uv_x * 16;
            float par4=uv_y * 16;
            float par5=16;
            float par6=16;
            float f=0.00390625F;
            float f1=0.00390625F;
            tessellator.startDrawingQuads();
            tessellator.setColorRGBA_F(1.0f,1.0f,1.0f,aes.getOpacityOfIcon());
            tessellator.addVertexWithUV((double)(par1 + 0),(double)(par2 + par6),(double)this.zLevel,(double)((float)(par3 + 0) * f),(double)((float)(par4 + par6) * f1));
            tessellator.addVertexWithUV((double)(par1 + par5),(double)(par2 + par6),(double)this.zLevel,(double)((float)(par3 + par5) * f),(double)((float)(par4 + par6) * f1));
            tessellator.addVertexWithUV((double)(par1 + par5),(double)(par2 + 0),(double)this.zLevel,(double)((float)(par3 + par5) * f),(double)((float)(par4 + 0) * f1));
            tessellator.addVertexWithUV((double)(par1 + 0),(double)(par2 + 0),(double)this.zLevel,(double)((float)(par3 + 0) * f),(double)((float)(par4 + 0) * f1));
            tessellator.setColorRGBA_F(1.0f,1.0f,1.0f,1.0f);
            tessellator.draw();
          }
 catch (          Exception err) {
            if (Platform.isDrawing(tessellator))             tessellator.draw();
          }
          GL11.glPopAttrib();
        }
      }
      if (is != null && s instanceof AppEngSlot) {
        if (((AppEngSlot)s).isValid == hasCalculatedValidness.NotAvailable) {
          boolean isValid=s.isItemValid(is) || s instanceof SlotOutput || s instanceof AppEngCraftingSlot|| s instanceof SlotDisabled|| s instanceof SlotInaccessable|| s instanceof SlotFake|| s.inventory instanceof UpgradeInventory;
          if (isValid && s instanceof SlotRestrictedInput) {
            try {
              isValid=((SlotRestrictedInput)s).isValid(is,this.mc.theWorld);
            }
 catch (            Exception err) {
              AELog.error(err);
            }
          }
          ((AppEngSlot)s).isValid=isValid ? hasCalculatedValidness.Valid : hasCalculatedValidness.Invalid;
        }
        if (((AppEngSlot)s).isValid == hasCalculatedValidness.Invalid) {
          this.zLevel=100.0F;
          itemRender.zLevel=100.0F;
          GL11.glDisable(GL11.GL_LIGHTING);
          super.drawRect(s.xDisplayPosition,s.yDisplayPosition,16 + s.xDisplayPosition,16 + s.yDisplayPosition,0x66ff6666);
          GL11.glEnable(GL11.GL_LIGHTING);
          this.zLevel=0.0F;
          itemRender.zLevel=0.0F;
        }
      }
      if (s instanceof AppEngSlot) {
        ((AppEngSlot)s).isDisplay=true;
        safeDrawSlot(s);
      }
 else       safeDrawSlot(s);
      return;
    }
 catch (    Exception err) {
      AELog.warning("String_Node_Str" + err.toString());
    }
  }
  safeDrawSlot(s);
}