Program: 156747
Project: 156747
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 / 2 * 2)) ^ 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);
    }
    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 / 2 * 2)) ^ 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);
    }
    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);
      }
    }
  }
}