Program: 156753
Project: 156753
Buggy source:
public void renderPipe(RenderBlocks renderblocks,IBlockAccess iblockaccess,TileGenericPipe tile,int x,int y,int z){
  PipeRenderState state=tile.renderState;
  IIconProvider icons=tile.getPipeIcons();
  FakeBlock fakeBlock=FakeBlock.INSTANCE;
  int glassColor=tile.getPipeColor();
  if (icons == null) {
    return;
  }
  if (renderPass == 0 || glassColor >= 0) {
    int connectivity=state.pipeConnectionMatrix.getMask();
    float[] dim=new float[6];
    if (renderPass == 1) {
      fakeBlock.setColor(ColorUtils.getRGBColor(glassColor));
    }
    if (connectivity != 0x3f) {
      resetToCenterDimensions(dim);
      if (renderPass == 0) {
        fakeBlock.getTextureState().set(icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.UNKNOWN)));
      }
 else {
        fakeBlock.getTextureState().set(PipeIconProvider.TYPE.PipeStainedOverlay.getIcon());
      }
      fixForRenderPass(dim);
      renderTwoWayBlock(renderblocks,fakeBlock,x,y,z,dim,connectivity ^ 0x3f);
    }
    for (int dir=0; dir < 6; dir++) {
      int mask=1 << dir;
      if ((connectivity & mask) == 0) {
        continue;
      }
      resetToCenterDimensions(dim);
      dim[dir / 2]=dir % 2 == 0 ? 0 : CoreConstants.PIPE_MAX_POS;
      dim[dir / 2 + 3]=dir % 2 == 0 ? CoreConstants.PIPE_MIN_POS : 1;
      int renderMask=(3 << (dir & 0x6)) ^ 0x3f;
      fixForRenderPass(dim);
      if (renderPass == 0) {
        fakeBlock.getTextureState().set(icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.VALID_DIRECTIONS[dir])));
      }
 else {
        fakeBlock.getTextureState().set(PipeIconProvider.TYPE.PipeStainedOverlay.getIcon());
      }
      renderTwoWayBlock(renderblocks,fakeBlock,x,y,z,dim,renderMask);
      if (Minecraft.getMinecraft().gameSettings.fancyGraphics) {
        ForgeDirection side=ForgeDirection.getOrientation(dir);
        int px=x + side.offsetX;
        int py=y + side.offsetY;
        int pz=z + side.offsetZ;
        Block block=iblockaccess.getBlock(px,py,pz);
        if (!(block instanceof BlockGenericPipe) && !block.isOpaqueCube()) {
          double[] blockBB;
          if (block instanceof BlockChest) {
            blockBB=new double[]{0,0.0625F,0.0625F,0.875F,0.9375F,0.9375F};
          }
 else {
            block.setBlockBoundsBasedOnState(iblockaccess,px,py,pz);
            blockBB=new double[]{block.getBlockBoundsMinY(),block.getBlockBoundsMinX(),block.getBlockBoundsMinZ(),block.getBlockBoundsMaxY(),block.getBlockBoundsMaxX(),block.getBlockBoundsMaxZ()};
          }
          if ((dir % 2 == 1 && blockBB[dir / 2] != 0) || (dir % 2 == 0 && blockBB[dir / 2 + 3] != 1)) {
            resetToCenterDimensions(dim);
            if (dir % 2 == 1) {
              dim[dir / 2]=0;
              dim[dir / 2 + 3]=(float)blockBB[dir / 2];
            }
 else {
              dim[dir / 2]=(float)blockBB[dir / 2 + 3];
              dim[dir / 2 + 3]=1;
            }
            fixForRenderPass(dim);
            renderTwoWayBlock(renderblocks,fakeBlock,x + side.offsetX,y + side.offsetY,z + side.offsetZ,dim,renderMask);
          }
        }
      }
    }
    fakeBlock.setColor(0xFFFFFF);
  }
 else   if (renderPass == 1) {
    IIcon i=PipeIconProvider.TYPE.Transparent.getIcon();
    Tessellator.instance.addVertexWithUV(x,y,z,0,0);
    Tessellator.instance.addVertexWithUV(x,y,z,0,0);
    Tessellator.instance.addVertexWithUV(x,y,z,0,0);
    Tessellator.instance.addVertexWithUV(x,y,z,0,0);
  }
  renderblocks.setRenderBounds(0.0F,0.0F,0.0F,1.0F,1.0F,1.0F);
  pipeFacadeRenderer(renderblocks,fakeBlock,tile,state,x,y,z);
  for (  ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
    if (tile.hasPipePluggable(dir)) {
      PipePluggable p=tile.getPipePluggable(dir);
      IPipePluggableRenderer r=p.getRenderer();
      if (r != null) {
        r.renderPluggable(renderblocks,tile.getPipe(),dir,p,fakeBlock,renderPass,x,y,z);
      }
    }
  }
}

Fixed version (ground truth):
public void renderPipe(RenderBlocks renderblocks,IBlockAccess iblockaccess,TileGenericPipe tile,int x,int y,int z){
  PipeRenderState state=tile.renderState;
  IIconProvider icons=tile.getPipeIcons();
  FakeBlock fakeBlock=FakeBlock.INSTANCE;
  int glassColor=tile.getPipeColor();
  if (icons == null) {
    return;
  }
  if (renderPass == 0 || glassColor >= 0) {
    int connectivity=state.pipeConnectionMatrix.getMask();
    float[] dim=new float[6];
    if (renderPass == 1) {
      fakeBlock.setColor(ColorUtils.getRGBColor(glassColor));
    }
    if (connectivity != 0x3f) {
      resetToCenterDimensions(dim);
      if (renderPass == 0) {
        fakeBlock.getTextureState().set(icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.UNKNOWN)));
      }
 else {
        fakeBlock.getTextureState().set(PipeIconProvider.TYPE.PipeStainedOverlay.getIcon());
      }
      fixForRenderPass(dim);
      renderTwoWayBlock(renderblocks,fakeBlock,x,y,z,dim,connectivity ^ 0x3f);
    }
    for (int dir=0; dir < 6; dir++) {
      int mask=1 << dir;
      if ((connectivity & mask) == 0) {
        continue;
      }
      resetToCenterDimensions(dim);
      dim[dir / 2]=dir % 2 == 0 ? 0 : CoreConstants.PIPE_MAX_POS;
      dim[dir / 2 + 3]=dir % 2 == 0 ? CoreConstants.PIPE_MIN_POS : 1;
      int renderMask=(3 << (dir & 0x6)) ^ 0x3f;
      fixForRenderPass(dim);
      if (renderPass == 0) {
        fakeBlock.getTextureState().set(icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.VALID_DIRECTIONS[dir])));
      }
 else {
        fakeBlock.getTextureState().set(PipeIconProvider.TYPE.PipeStainedOverlay.getIcon());
      }
      renderTwoWayBlock(renderblocks,fakeBlock,x,y,z,dim,renderMask);
      if (Minecraft.getMinecraft().gameSettings.fancyGraphics) {
        ForgeDirection side=ForgeDirection.getOrientation(dir);
        int px=x + side.offsetX;
        int py=y + side.offsetY;
        int pz=z + side.offsetZ;
        Block block=iblockaccess.getBlock(px,py,pz);
        if (!(block instanceof BlockGenericPipe) && !block.isOpaqueCube()) {
          double[] blockBB;
          if (block instanceof BlockChest) {
            blockBB=new double[]{0,0.0625F,0.0625F,0.875F,0.9375F,0.9375F};
          }
 else {
            block.setBlockBoundsBasedOnState(iblockaccess,px,py,pz);
            blockBB=new double[]{block.getBlockBoundsMinY(),block.getBlockBoundsMinX(),block.getBlockBoundsMinZ(),block.getBlockBoundsMaxY(),block.getBlockBoundsMaxX(),block.getBlockBoundsMaxZ()};
          }
          if ((dir % 2 == 1 && blockBB[dir / 2] != 0) || (dir % 2 == 0 && blockBB[dir / 2 + 3] != 1)) {
            resetToCenterDimensions(dim);
            if (dir % 2 == 1) {
              dim[dir / 2]=0;
              dim[dir / 2 + 3]=(float)blockBB[dir / 2];
            }
 else {
              dim[dir / 2]=(float)blockBB[dir / 2 + 3];
              dim[dir / 2 + 3]=1;
            }
            fixForRenderPass(dim);
            renderTwoWayBlock(renderblocks,fakeBlock,x + side.offsetX,y + side.offsetY,z + side.offsetZ,dim,renderMask);
          }
        }
      }
    }
    fakeBlock.setColor(0xFFFFFF);
  }
  renderblocks.setRenderBounds(0.0F,0.0F,0.0F,1.0F,1.0F,1.0F);
  pipeFacadeRenderer(renderblocks,fakeBlock,tile,state,x,y,z);
  for (  ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
    if (tile.hasPipePluggable(dir)) {
      PipePluggable p=tile.getPipePluggable(dir);
      IPipePluggableRenderer r=p.getRenderer();
      if (r != null) {
        r.renderPluggable(renderblocks,tile.getPipe(),dir,p,fakeBlock,renderPass,x,y,z);
      }
    }
  }
}