Program: 70831
Project: 70831
Buggy source:
@Override public void render(Renderer renderer,int flags){
  if (!isSelectable() && renderer.isSelecting()) {
    return;
  }
  FaceRenderProps rprops=(FaceRenderProps)getRenderProps();
  Rectangle2D box=myTextRenderer.getBounds(myText);
  float fTextSize=(float)(myTextSize / getFontSize());
  double t=0.75 * myTextSize;
  double vc=0.25 * myTextSize;
  double w=fTextSize * box.getWidth();
  int sw=renderer.getScreenWidth();
  int sh=renderer.getScreenHeight();
  renderPos.setZero();
switch (hAlignment) {
case CENTRE:
    renderPos.add(-w / 2,0);
  break;
case RIGHT:
renderPos.add(-w,0);
break;
default :
break;
}
switch (vAlignment) {
case CENTRE:
renderPos.add(0,-vc);
break;
case TOP:
renderPos.add(0,-t);
break;
case BOTTOM:
break;
}
double rad=Math.toRadians(myOrientation);
double ctheta=Math.cos(rad);
double stheta=Math.sin(rad);
renderPos.rotate(ctheta,stheta,renderPos);
if (myPos.x <= 0) {
renderPos.x+=myNormPos.x * sw;
}
 else {
renderPos.x+=myPos.x;
}
if (myPos.y <= 0) {
renderPos.y+=myNormPos.y * sh;
}
 else {
renderPos.y+=myPos.y;
}
myTransform.R.m00=ctheta;
myTransform.R.m10=stheta;
myTransform.R.m01=-stheta;
myTransform.R.m11=ctheta;
myTransform.p.set(renderPos.x,renderPos.y,0);
if (isSelected()) {
renderer.getSelectionColor(rgb);
}
 else {
rprops.getFaceColor(rgb);
}
boolean saved2d=renderer.is2DRendering();
if (!saved2d) {
renderer.begin2DRendering(sw,sh);
}
renderer.pushModelMatrix();
GLSupport.transformToGLMatrix(GLMatrix,myTransform);
renderer.mulModelMatrix(myTransform);
myTextRenderer.begin3DRendering();
myTextRenderer.setColor(rgb[0],rgb[1],rgb[2],(float)rprops.getAlpha());
myTextRenderer.draw3D(myText,0,0,0,fTextSize);
myTextRenderer.end3DRendering();
renderer.popModelMatrix();
if (!saved2d) {
renderer.end2DRendering();
}
}

Fixed version (ground truth):
@Override public void render(Renderer renderer,int flags){
  if (!isSelectable() && renderer.isSelecting()) {
    return;
  }
  FaceRenderProps rprops=(FaceRenderProps)getRenderProps();
  Rectangle2D box=myTextRenderer.getBounds(myText);
  float fTextSize=(float)(myTextSize / getFontSize());
  double t=0.75 * myTextSize;
  double vc=0.25 * myTextSize;
  double w=fTextSize * box.getWidth();
  int sw=renderer.getScreenWidth();
  int sh=renderer.getScreenHeight();
  renderPos.setZero();
switch (hAlignment) {
case CENTRE:
    renderPos.add(-w / 2,0);
  break;
case RIGHT:
renderPos.add(-w,0);
break;
default :
break;
}
switch (vAlignment) {
case CENTRE:
renderPos.add(0,-vc);
break;
case TOP:
renderPos.add(0,-t);
break;
case BOTTOM:
break;
}
double rad=Math.toRadians(myOrientation);
double ctheta=Math.cos(rad);
double stheta=Math.sin(rad);
renderPos.rotate(ctheta,stheta,renderPos);
if (myPos.x <= 0) {
renderPos.x+=myNormPos.x * sw;
}
 else {
renderPos.x+=myPos.x;
}
if (myPos.y <= 0) {
renderPos.y+=myNormPos.y * sh;
}
 else {
renderPos.y+=myPos.y;
}
myTransform.R.m00=ctheta;
myTransform.R.m10=stheta;
myTransform.R.m01=-stheta;
myTransform.R.m11=ctheta;
myTransform.p.set(renderPos.x,renderPos.y,0);
if (isSelected()) {
renderer.getHighlightColor(rgb);
}
 else {
rprops.getFaceColor(rgb);
}
boolean saved2d=renderer.is2DRendering();
if (!saved2d) {
renderer.begin2DRendering(sw,sh);
}
renderer.pushModelMatrix();
GLSupport.transformToGLMatrix(GLMatrix,myTransform);
renderer.mulModelMatrix(myTransform);
myTextRenderer.begin3DRendering();
myTextRenderer.setColor(rgb[0],rgb[1],rgb[2],(float)rprops.getAlpha());
myTextRenderer.draw3D(myText,0,0,0,fTextSize);
myTextRenderer.end3DRendering();
renderer.popModelMatrix();
if (!saved2d) {
renderer.end2DRendering();
}
}