Program: 68687
Project: 68687
Buggy source:
protected void paintControl(PaintEvent e){
  e.gc.setFont(getFont());
  Color fg=isEnabled() ? getForeground() : new Color(e.gc.getDevice(),UIUtil.blend(getBackground().getRGB(),getForeground().getRGB(),70));
  try {
    e.gc.setForeground(fg);
    Color bgColor=e.gc.getBackground();
    e.gc.setBackground(e.gc.getForeground());
    Rectangle size=button.getBounds();
    if (menu != null) {
      Rectangle rect=new Rectangle(size.width - 12,0,TRIANGLE_WIDTH,size.height);
      UIUtil.drawArrow(e.gc,rect,SWT.DOWN);
    }
    e.gc.setBackground(bgColor);
    int height=e.gc.textExtent("String_Node_Str",DRAW_FLAGS).y;
    if (!isFixed && image != null) {
      int imageHeight=image.getImageData().height;
      if (height < imageHeight)       height=imageHeight;
    }
    if (defaultSize.y > size.height) {
      height=height - (defaultSize.y - size.height);
      height=e.gc.textExtent("String_Node_Str",DRAW_FLAGS).y > height ? e.gc.textExtent("String_Node_Str",DRAW_FLAGS).y : height;
    }
    int left=WIDTH_MORE + MARGIN_GAP - 1;
    if (menu == null)     left=MARGIN_GAP - 1;
    if (menu != null) {
      Color fgColor=e.gc.getForeground();
      e.gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
      e.gc.drawLine(size.width - left,(size.height - height) / 2,size.width - left,(size.height - height) / 2 + height);
      e.gc.setForeground(fgColor);
    }
    if (text != null && text.trim().length() > 0) {
      int width=e.gc.textExtent(text,DRAW_FLAGS).x;
      int fontHeight=e.gc.textExtent(text,DRAW_FLAGS).y;
      left+=(MARGIN_GAP + width);
      e.gc.drawText(text,size.width - left,(size.height - fontHeight) / 2,DRAW_FLAGS | SWT.DRAW_TRANSPARENT);
    }
    if (image != null) {
      int imageWidth=image.getImageData().width;
      int imageHeight=image.getImageData().height;
      Image imageTemp;
      if (isEnabled())       imageTemp=new Image(e.gc.getDevice(),image,SWT.IMAGE_COPY);
 else       imageTemp=new Image(e.gc.getDevice(),image,SWT.IMAGE_DISABLE);
      if (isFixed) {
        imageWidth=imageWidth > IMAGE_WIDTH ? IMAGE_WIDTH : imageWidth;
        imageHeight=imageHeight > IMAGE_HEIGHT ? IMAGE_HEIGHT : imageHeight;
      }
      left+=(MARGIN_GAP + imageWidth);
      e.gc.drawImage(imageTemp,0,0,imageTemp.getImageData().width,imageTemp.getImageData().height,size.width - left,Math.round(((float)(size.height - imageHeight) / 2)),imageWidth,imageHeight);
      imageTemp.dispose();
    }
  }
  finally {
    if (!isEnabled() && fg != null)     fg.dispose();
  }
}

Fixed version (ground truth):
protected void paintControl(PaintEvent e){
  e.gc.setFont(getFont());
  Color fg=isEnabled() ? getForeground() : new Color(e.gc.getDevice(),UIUtil.blend(getBackground().getRGB(),getForeground().getRGB(),70));
  try {
    e.gc.setForeground(fg);
    Color bgColor=e.gc.getBackground();
    e.gc.setBackground(e.gc.getForeground());
    Rectangle size=button.getBounds();
    if (menu != null) {
      Rectangle rect=new Rectangle(size.width - 12,0,TRIANGLE_WIDTH,size.height);
      UIUtil.drawArrow(e.gc,rect,SWT.DOWN);
    }
    e.gc.setBackground(bgColor);
    int height=e.gc.textExtent("String_Node_Str",DRAW_FLAGS).y;
    if (!isFixed && image != null) {
      int imageHeight=image.getImageData().height;
      if (height < imageHeight)       height=imageHeight;
    }
    if (defaultSize.y > size.height) {
      height=height - (defaultSize.y - size.height);
      height=e.gc.textExtent("String_Node_Str",DRAW_FLAGS).y > height ? e.gc.textExtent("String_Node_Str",DRAW_FLAGS).y : height;
    }
    int left=WIDTH_MORE + MARGIN_GAP - 1;
    if (menu == null)     left=MARGIN_GAP - 1;
    if (menu != null) {
      Color fgColor=e.gc.getForeground();
      e.gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
      e.gc.drawLine(size.width - left,(size.height - height) / 2,size.width - left,(size.height - height) / 2 + height);
      e.gc.setForeground(fgColor);
    }
    if (text != null && text.trim().length() > 0) {
      int width=e.gc.textExtent(text,DRAW_FLAGS).x;
      int fontHeight=e.gc.textExtent(text,DRAW_FLAGS).y;
      left+=(MARGIN_GAP + width);
      e.gc.drawText(text,(size.width - left) / 2 + MARGIN_GAP,(size.height - fontHeight) / 2,DRAW_FLAGS | SWT.DRAW_TRANSPARENT);
    }
    if (image != null) {
      int imageWidth=image.getImageData().width;
      int imageHeight=image.getImageData().height;
      Image imageTemp;
      if (isEnabled())       imageTemp=new Image(e.gc.getDevice(),image,SWT.IMAGE_COPY);
 else       imageTemp=new Image(e.gc.getDevice(),image,SWT.IMAGE_DISABLE);
      if (isFixed) {
        imageWidth=imageWidth > IMAGE_WIDTH ? IMAGE_WIDTH : imageWidth;
        imageHeight=imageHeight > IMAGE_HEIGHT ? IMAGE_HEIGHT : imageHeight;
      }
      left+=(MARGIN_GAP + imageWidth);
      e.gc.drawImage(imageTemp,0,0,imageTemp.getImageData().width,imageTemp.getImageData().height,size.width - left,Math.round(((float)(size.height - imageHeight) / 2)),imageWidth,imageHeight);
      imageTemp.dispose();
    }
  }
  finally {
    if (!isEnabled() && fg != null)     fg.dispose();
  }
}