Program: 56729
Project: 56729
Buggy source:
@Override protected final void renderImpl(GLGraphics g,float w,float h){
  g.save();
switch (record.getLabel()) {
case LEFT:
    w-=textWidth;
  g.move(textWidth,0);
break;
case RIGHT:
w-=textWidth;
break;
default :
break;
}
switch (dimension.getLabel()) {
case LEFT:
h-=textWidth;
g.move(0,textWidth);
break;
case RIGHT:
h-=textWidth;
break;
default :
break;
}
if (record.getLabel().show()) {
final List<Integer> data=record.getData();
final ISpacingLayout spacing=record.getSpacing();
final EShowLabels label=record.getLabel();
for (int i=0; i < data.size(); ++i) {
Integer recordID=data.get(i);
float y=spacing.getPosition(i);
float fieldHeight=spacing.getSize(i);
float textHeight=Math.min(fieldHeight,MAX_TEXT_HEIGHT);
String text=getLabel(EDimension.RECORD,recordID);
if (label == EShowLabels.LEFT) g.drawText(text,-textWidth,y + (fieldHeight - textHeight) * 0.5f,textWidth - TEXT_OFFSET,textHeight,VAlign.RIGHT);
 else g.drawText(text,w + TEXT_OFFSET,y + (fieldHeight - textHeight) * 0.5f,textWidth - TEXT_OFFSET,textHeight,VAlign.LEFT);
}
}
if (dimension.getLabel().show()) {
final List<Integer> data=dimension.getData();
final ISpacingLayout spacing=dimension.getSpacing();
final EShowLabels label=dimension.getLabel();
g.save();
g.gl.glRotatef(-90,0,0,1);
for (int i=0; i < data.size(); ++i) {
Integer dimensionID=data.get(i);
String l=getLabel(EDimension.DIMENSION,dimensionID);
float x=spacing.getPosition(i);
float fieldWidth=spacing.getSize(i);
float textHeight=Math.min(fieldWidth,MAX_TEXT_HEIGHT);
if (textHeight < 5) continue;
if (label == EShowLabels.LEFT) g.drawText(l,TEXT_OFFSET,x + (fieldWidth - textHeight) * 0.5f,textWidth - TEXT_OFFSET,textHeight,VAlign.LEFT);
 else g.drawText(l,-h - textWidth,x + (fieldWidth - textHeight) * 0.5f,textWidth - TEXT_OFFSET,textHeight,VAlign.RIGHT);
}
g.restore();
}
renderAddons(g,w,h);
renderer.render(g,w,h,record.getSpacing(),dimension.getSpacing());
g.incZ();
if (blurNotSelected) {
renderBlurSelection(g,SelectionType.SELECTION,w,h);
record.render(g,SelectionType.MOUSE_OVER,w,h);
dimension.render(g,SelectionType.MOUSE_OVER,w,h);
}
 else {
record.render(g,SelectionType.SELECTION,w,h);
dimension.render(g,SelectionType.SELECTION,w,h);
record.render(g,SelectionType.MOUSE_OVER,w,h);
dimension.render(g,SelectionType.MOUSE_OVER,w,h);
}
g.lineWidth(1);
g.decZ();
g.restore();
}

Fixed version (ground truth):
@Override protected final void renderImpl(GLGraphics g,float w,float h){
  g.save();
switch (record.getLabel()) {
case LEFT:
    w-=textWidth;
  g.move(textWidth,0);
break;
case RIGHT:
w-=textWidth;
break;
default :
break;
}
switch (dimension.getLabel()) {
case LEFT:
h-=textWidth;
g.move(0,textWidth);
break;
case RIGHT:
h-=textWidth;
break;
default :
break;
}
if (record.getLabel().show()) {
final List<Integer> data=record.getData();
final ISpacingLayout spacing=record.getSpacing();
final EShowLabels label=record.getLabel();
for (int i=0; i < data.size(); ++i) {
Integer recordID=data.get(i);
float y=spacing.getPosition(i);
float fieldHeight=spacing.getSize(i);
float textHeight=Math.min(fieldHeight,MAX_TEXT_HEIGHT);
String text=getLabel(EDimension.RECORD,recordID);
if (label == EShowLabels.LEFT) g.drawText(text,-textWidth,y + (fieldHeight - textHeight) * 0.5f,textWidth - TEXT_OFFSET,textHeight,VAlign.RIGHT);
 else g.drawText(text,w + TEXT_OFFSET,y + (fieldHeight - textHeight) * 0.5f,textWidth - TEXT_OFFSET,textHeight,VAlign.LEFT);
}
}
if (dimension.getLabel().show()) {
final List<Integer> data=dimension.getData();
final ISpacingLayout spacing=dimension.getSpacing();
final EShowLabels label=dimension.getLabel();
g.save();
g.gl.glRotatef(-90,0,0,1);
for (int i=0; i < data.size(); ++i) {
Integer dimensionID=data.get(i);
String l=getLabel(EDimension.DIMENSION,dimensionID);
float x=spacing.getPosition(i);
float fieldWidth=spacing.getSize(i);
float textHeight=Math.min(fieldWidth,MAX_TEXT_HEIGHT);
if (textHeight < 5) continue;
if (label == EShowLabels.LEFT) g.drawText(l,TEXT_OFFSET,x + (fieldWidth - textHeight) * 0.5f,textWidth - TEXT_OFFSET,textHeight,VAlign.LEFT);
 else g.drawText(l,-h - textWidth,x + (fieldWidth - textHeight) * 0.5f,textWidth - TEXT_OFFSET,textHeight,VAlign.RIGHT);
}
g.restore();
}
renderAddons(g,w,h);
renderer.render(g,w,h,record.getSpacing(),dimension.getSpacing());
g.incZ();
if (blurNotSelected) {
renderBlurSelection(g,SelectionType.SELECTION,w,h);
record.renderSelectionRects(g,SelectionType.MOUSE_OVER,w,h,true);
dimension.renderSelectionRects(g,SelectionType.MOUSE_OVER,w,h,true);
}
 else {
record.renderSelectionRects(g,SelectionType.SELECTION,w,h,false);
dimension.renderSelectionRects(g,SelectionType.SELECTION,w,h,false);
record.renderSelectionRects(g,SelectionType.MOUSE_OVER,w,h,false);
dimension.renderSelectionRects(g,SelectionType.MOUSE_OVER,w,h,false);
}
g.lineWidth(1);
g.decZ();
g.restore();
}