Program: 30844
Project: 30844
Buggy source:
public void renderSmartConection(int x,int y,int z,IPartRenderHelper rh,RenderBlocks renderer,int channels,ForgeDirection of){
  TileEntity te=this.tile.worldObj.getBlockTileEntity(x + of.offsetX,y + of.offsetY,z + of.offsetZ);
  IPartHost ccph=te instanceof IPartHost ? (IPartHost)te : null;
  IGridHost ghh=te instanceof IGridHost ? (IGridHost)te : null;
  boolean isGlass=false;
  AEColor myColor=getCableColor();
  if (ghh != null && ccph != null && ghh.getCableConnectionType(of.getOpposite()) == AECableType.GLASS && ccph.getPart(of.getOpposite()) == null) {
    isGlass=true;
    rh.setTexture(getGlassTexture(myColor=ccph.getColor()));
  }
 else   if (ccph == null && ghh != null && ghh.getCableConnectionType(of.getOpposite()) != AECableType.GLASS) {
    rh.setTexture(getSmartTexture(myColor));
switch (of) {
case DOWN:
      rh.setBounds(5,0,5,11,4,11);
    break;
case EAST:
  rh.setBounds(12,5,5,16,11,11);
break;
case NORTH:
rh.setBounds(5,5,0,11,11,4);
break;
case SOUTH:
rh.setBounds(5,5,12,11,11,16);
break;
case UP:
rh.setBounds(5,12,5,11,16,11);
break;
case WEST:
rh.setBounds(0,5,5,4,11,11);
break;
default :
return;
}
rh.renderBlock(x,y,z,renderer);
if (true) {
setSmartConnectionRotations(of,renderer);
Icon defa=new TaughtIcon(getChannelTex(channels,false).getIcon(),-0.2f);
Icon defb=new TaughtIcon(getChannelTex(channels,true).getIcon(),-0.2f);
if (of == ForgeDirection.EAST || of == ForgeDirection.WEST) {
AEBaseBlock blk=(AEBaseBlock)rh.getBlock();
FlipableIcon ico=blk.getRendererInstance().getTexture(ForgeDirection.EAST);
ico.setFlip(false,true);
}
Tessellator.instance.setBrightness(15 << 20 | 15 << 5);
Tessellator.instance.setColorOpaque_I(myColor.mediumVariant);
rh.setTexture(defa,defa,defa,defa,defa,defa);
renderAllFaces((AEBaseBlock)rh.getBlock(),x,y,z,renderer);
Tessellator.instance.setColorOpaque_I(myColor.whiteVariant);
rh.setTexture(defb,defb,defb,defb,defb,defb);
renderAllFaces((AEBaseBlock)rh.getBlock(),x,y,z,renderer);
renderer.uvRotateBottom=renderer.uvRotateEast=renderer.uvRotateNorth=renderer.uvRotateSouth=renderer.uvRotateTop=renderer.uvRotateWest=0;
}
rh.setTexture(getTexture(getCableColor()));
}
 else if (ghh != null && ccph != null && ghh.getCableConnectionType(of) != AECableType.GLASS && ccph.getColor() != AEColor.Transparent) rh.setTexture(getSmartTexture(myColor=ccph.getColor()));
 else rh.setTexture(getSmartTexture(getCableColor()));
switch (of) {
case DOWN:
rh.setBounds(6,0,6,10,5,10);
break;
case EAST:
rh.setBounds(11,6,6,16,10,10);
break;
case NORTH:
rh.setBounds(6,6,0,10,10,5);
break;
case SOUTH:
rh.setBounds(6,6,11,10,10,16);
break;
case UP:
rh.setBounds(6,11,6,10,16,10);
break;
case WEST:
rh.setBounds(0,6,6,5,10,10);
break;
default :
return;
}
rh.renderBlock(x,y,z,renderer);
if (!isGlass) {
setSmartConnectionRotations(of,renderer);
Icon defa=new TaughtIcon(getChannelTex(channels,false).getIcon(),-0.2f);
Icon defb=new TaughtIcon(getChannelTex(channels,true).getIcon(),-0.2f);
Tessellator.instance.setBrightness(15 << 20 | 15 << 5);
Tessellator.instance.setColorOpaque_I(myColor.mediumVariant);
rh.setTexture(defa,defa,defa,defa,defa,defa);
renderAllFaces((AEBaseBlock)rh.getBlock(),x,y,z,renderer);
Tessellator.instance.setColorOpaque_I(myColor.whiteVariant);
rh.setTexture(defb,defb,defb,defb,defb,defb);
renderAllFaces((AEBaseBlock)rh.getBlock(),x,y,z,renderer);
renderer.uvRotateBottom=renderer.uvRotateEast=renderer.uvRotateNorth=renderer.uvRotateSouth=renderer.uvRotateTop=renderer.uvRotateWest=0;
}
}

Fixed version (ground truth):
public void renderSmartConection(int x,int y,int z,IPartRenderHelper rh,RenderBlocks renderer,int channels,ForgeDirection of){
  TileEntity te=this.tile.worldObj.getBlockTileEntity(x + of.offsetX,y + of.offsetY,z + of.offsetZ);
  IPartHost ccph=te instanceof IPartHost ? (IPartHost)te : null;
  IGridHost ghh=te instanceof IGridHost ? (IGridHost)te : null;
  boolean isGlass=false;
  AEColor myColor=getCableColor();
  if (ghh != null && ccph != null && ghh.getCableConnectionType(of.getOpposite()) == AECableType.GLASS && ccph.getPart(of.getOpposite()) == null) {
    isGlass=true;
    rh.setTexture(getGlassTexture(myColor=ccph.getColor()));
  }
 else   if (ccph == null && ghh != null && ghh.getCableConnectionType(of.getOpposite()) != AECableType.GLASS) {
    rh.setTexture(getSmartTexture(myColor));
switch (of) {
case DOWN:
      rh.setBounds(5,0,5,11,4,11);
    break;
case EAST:
  rh.setBounds(12,5,5,16,11,11);
break;
case NORTH:
rh.setBounds(5,5,0,11,11,4);
break;
case SOUTH:
rh.setBounds(5,5,12,11,11,16);
break;
case UP:
rh.setBounds(5,12,5,11,16,11);
break;
case WEST:
rh.setBounds(0,5,5,4,11,11);
break;
default :
return;
}
rh.renderBlock(x,y,z,renderer);
if (true) {
setSmartConnectionRotations(of,renderer);
Icon defa=new TaughtIcon(getChannelTex(channels,false).getIcon(),-0.2f);
Icon defb=new TaughtIcon(getChannelTex(channels,true).getIcon(),-0.2f);
if (of == ForgeDirection.EAST || of == ForgeDirection.WEST) {
AEBaseBlock blk=(AEBaseBlock)rh.getBlock();
FlipableIcon ico=blk.getRendererInstance().getTexture(ForgeDirection.EAST);
ico.setFlip(false,true);
}
Tessellator.instance.setBrightness(15 << 20 | 15 << 5);
Tessellator.instance.setColorOpaque_I(myColor.mediumVariant);
rh.setTexture(defa,defa,defa,defa,defa,defa);
renderAllFaces((AEBaseBlock)rh.getBlock(),x,y,z,renderer);
Tessellator.instance.setColorOpaque_I(myColor.whiteVariant);
rh.setTexture(defb,defb,defb,defb,defb,defb);
renderAllFaces((AEBaseBlock)rh.getBlock(),x,y,z,renderer);
renderer.uvRotateBottom=renderer.uvRotateEast=renderer.uvRotateNorth=renderer.uvRotateSouth=renderer.uvRotateTop=renderer.uvRotateWest=0;
}
rh.setTexture(getTexture(getCableColor()));
}
 else if (ghh != null && ccph != null && ghh.getCableConnectionType(of) != AECableType.GLASS && ccph.getColor() != AEColor.Transparent && ccph.getPart(of.getOpposite()) == null) rh.setTexture(getSmartTexture(myColor=ccph.getColor()));
 else rh.setTexture(getSmartTexture(getCableColor()));
switch (of) {
case DOWN:
rh.setBounds(6,0,6,10,5,10);
break;
case EAST:
rh.setBounds(11,6,6,16,10,10);
break;
case NORTH:
rh.setBounds(6,6,0,10,10,5);
break;
case SOUTH:
rh.setBounds(6,6,11,10,10,16);
break;
case UP:
rh.setBounds(6,11,6,10,16,10);
break;
case WEST:
rh.setBounds(0,6,6,5,10,10);
break;
default :
return;
}
rh.renderBlock(x,y,z,renderer);
if (!isGlass) {
setSmartConnectionRotations(of,renderer);
Icon defa=new TaughtIcon(getChannelTex(channels,false).getIcon(),-0.2f);
Icon defb=new TaughtIcon(getChannelTex(channels,true).getIcon(),-0.2f);
Tessellator.instance.setBrightness(15 << 20 | 15 << 5);
Tessellator.instance.setColorOpaque_I(myColor.mediumVariant);
rh.setTexture(defa,defa,defa,defa,defa,defa);
renderAllFaces((AEBaseBlock)rh.getBlock(),x,y,z,renderer);
Tessellator.instance.setColorOpaque_I(myColor.whiteVariant);
rh.setTexture(defb,defb,defb,defb,defb,defb);
renderAllFaces((AEBaseBlock)rh.getBlock(),x,y,z,renderer);
renderer.uvRotateBottom=renderer.uvRotateEast=renderer.uvRotateNorth=renderer.uvRotateSouth=renderer.uvRotateTop=renderer.uvRotateWest=0;
}
}