Program: 56979
Project: 56979
Buggy source:
@Override public void doLayout(List<? extends IGLLayoutElement> children,float w,float h){
  IGLLayoutElement hist=children.get(HIST);
  final boolean smallHeader=isSmallHeader(h);
  if (smallHeader)   hist.hide();
 else   hist.setBounds(1,hasTitle ? LABEL_HEIGHT : 0,w - 2,h - (hasTitle ? LABEL_HEIGHT : 0));
  if (config.isInteractive()) {
    IGLLayoutElement weight=children.get(DRAG_WEIGHT);
    weight.setBounds(w,hasTitle && !smallHeader ? LABEL_HEIGHT : 0,(isHovered && config.canChangeWeights()) ? 8 : 0,h - (hasTitle && !smallHeader ? LABEL_HEIGHT : 0));
{
      IGLLayoutElement buttons=children.get(BUTTONS);
      float minWidth=(buttons.asElement() instanceof ButtonBar) ? ((ButtonBar)buttons.asElement()).getMinWidth() : 0;
      boolean showButtonBar=isHovered && !isWeightDragging;
      float yb=0;
switch (config.getButtonBarPosition()) {
case AT_THE_BOTTOM:
        yb=isHovered ? (h - 2 - RenderStyle.BUTTON_WIDTH) : h;
      break;
case OVER_LABEL:
    yb=0;
  break;
case UNDER_LABEL:
yb=LABEL_HEIGHT;
break;
case ABOVE_LABEL:
yb=showButtonBar ? -RenderStyle.BUTTON_WIDTH : 0;
break;
case BELOW_HIST:
yb=isHovered ? h : h;
break;
}
float hb=showButtonBar ? RenderStyle.BUTTON_WIDTH : 0;
if ((w - 4) < minWidth) {
float missing=minWidth - (w - 4);
buttons.setBounds(-missing * 0.5f,yb,minWidth,hb);
}
 else {
buttons.setBounds(2,yb,w - 4,hb);
}
}
IGLLayoutElement uncollapse=children.get(UNCOLLAPSE);
uncollapse.setBounds((w - RenderStyle.BUTTON_WIDTH) * .5f,2,RenderStyle.BUTTON_WIDTH,isHovered ? RenderStyle.BUTTON_WIDTH : 0);
for (IGLLayoutElement r : children.subList(FIRST_CUSTOM,children.size())) r.setBounds(defaultValue(r.getSetX(),0),defaultValue(r.getSetY(),h),defaultValue(r.getSetWidth(),w),defaultValue(r.getSetHeight(),HIST_HEIGHT));
}
}

Fixed version (ground truth):
@Override public void doLayout(List<? extends IGLLayoutElement> children,float w,float h){
  IGLLayoutElement hist=children.get(HIST);
  final boolean smallHeader=isSmallHeader(h);
  if (smallHeader)   hist.hide();
 else   hist.setBounds(1,hasTitle ? LABEL_HEIGHT : 0,w - 2,h - (hasTitle ? LABEL_HEIGHT : 0));
  if (config.isInteractive()) {
    IGLLayoutElement weight=children.get(DRAG_WEIGHT);
    weight.setBounds(w,hasTitle && !smallHeader ? LABEL_HEIGHT : 0,(isHovered && config.canChangeWeights()) ? 8 : 0,h - (hasTitle && !smallHeader ? LABEL_HEIGHT : 0));
{
      IGLLayoutElement buttons=children.get(BUTTONS);
      float minWidth=(buttons.asElement() instanceof ButtonBar) ? ((ButtonBar)buttons.asElement()).getMinWidth() : 0;
      boolean showButtonBar=isHovered && !isWeightDragging;
      float yb=0;
switch (config.getButtonBarPosition()) {
case AT_THE_BOTTOM:
        yb=isHovered ? (h - 2 - RenderStyle.BUTTON_WIDTH) : h;
      break;
case OVER_LABEL:
    yb=0;
  break;
case UNDER_LABEL:
yb=LABEL_HEIGHT;
break;
case ABOVE_LABEL:
yb=showButtonBar ? -RenderStyle.BUTTON_WIDTH : 0;
break;
case BELOW_HIST:
yb=isHovered ? h : h;
break;
}
float hb=showButtonBar ? RenderStyle.BUTTON_WIDTH : 0;
if ((w - 4) < minWidth) {
float missing=minWidth - (w - 4);
buttons.setBounds(-missing * 0.5f,yb,minWidth,hb);
}
 else {
buttons.setBounds(2,yb,w - 4,hb);
}
}
{
IGLLayoutElement uncollapse=children.get(UNCOLLAPSE);
float yb=0;
switch (config.getButtonBarPosition()) {
case AT_THE_BOTTOM:
yb=isHovered ? (h - 2 - RenderStyle.BUTTON_WIDTH) : h;
break;
case OVER_LABEL:
yb=0;
break;
case UNDER_LABEL:
yb=LABEL_HEIGHT;
break;
case ABOVE_LABEL:
yb=isHovered ? -RenderStyle.BUTTON_WIDTH : 0;
break;
case BELOW_HIST:
yb=isHovered ? h : h;
break;
}
uncollapse.setBounds((w - RenderStyle.BUTTON_WIDTH) * .5f,yb,RenderStyle.BUTTON_WIDTH,isHovered ? RenderStyle.BUTTON_WIDTH : 0);
}
for (IGLLayoutElement r : children.subList(FIRST_CUSTOM,children.size())) r.setBounds(defaultValue(r.getSetX(),0),defaultValue(r.getSetY(),h),defaultValue(r.getSetWidth(),w),defaultValue(r.getSetHeight(),HIST_HEIGHT));
}
}