Program: 79304
Project: 79304
Buggy source:
public void paintControl(PaintEvent pe){
  Font fSize=null;
  Font fCurrent=null;
  Color cFore=null;
  GC gc=pe.gc;
  Font fOld=gc.getFont();
  if (cdCurrent != null && bUseColor) {
    cFore=new Color(this.getDisplay(),cdCurrent.getRed(),cdCurrent.getGreen(),cdCurrent.getBlue());
  }
 else {
    cFore=new Color(this.getDisplay(),0,0,0);
  }
  gc.setForeground(cFore);
  if (fdCurrent != null) {
    int iStyle=(fdCurrent.isBold()) ? SWT.BOLD : SWT.NORMAL;
    iStyle|=(fdCurrent.isItalic()) ? SWT.ITALIC : iStyle;
    String sFontName=fdCurrent.getName();
    if (!bUseSize) {
      gc.setClipping(2,2,this.getSize().x - 40,26);
      fCurrent=new Font(this.getDisplay(),fdCurrent.getName(),fOld.getFontData()[0].getHeight(),iStyle);
    }
 else {
      fCurrent=new Font(this.getDisplay(),fdCurrent.getName(),(int)fdCurrent.getSize(),iStyle);
    }
    gc.setFont(fCurrent);
    int iStartX=5;
    int iStartY=3;
    if (bUseAlignment) {
      if (fdCurrent.getAlignment().getHorizontalAlignment().equals(HorizontalAlignment.LEFT_LITERAL)) {
        iStartX=5;
      }
 else       if (fdCurrent.getAlignment().getHorizontalAlignment().equals(HorizontalAlignment.CENTER_LITERAL)) {
        iStartX=this.getSize().x / 2 - (getStringWidth(gc,sFontName).x / 2);
      }
 else       if (fdCurrent.getAlignment().getHorizontalAlignment().equals(HorizontalAlignment.RIGHT_LITERAL)) {
        iStartX=this.getSize().x - getStringWidth(gc,sFontName).x;
      }
      if (fdCurrent.getAlignment().getVerticalAlignment().equals(VerticalAlignment.TOP_LITERAL)) {
        iStartY=3;
      }
 else       if (fdCurrent.getAlignment().getVerticalAlignment().equals(VerticalAlignment.CENTER_LITERAL)) {
        iStartY=(int)(this.getSize().y / 2);
        if (bUseSize) {
          iStartY-=(getStringWidth(gc,sFontName).y / 2);
        }
 else {
          iStartY-=15;
        }
      }
 else       if (fdCurrent.getAlignment().getVerticalAlignment().equals(VerticalAlignment.BOTTOM_LITERAL)) {
        iStartY=this.getSize().y;
        if (bUseSize) {
          iStartY-=(getStringWidth(gc,sFontName).y);
        }
 else {
          iStartY-=30;
        }
      }
    }
    gc.drawText(sFontName,iStartX,iStartY);
    if (fdCurrent.isUnderline()) {
      gc.drawLine(iStartX,iStartY + getStringWidth(gc,sFontName).y - gc.getFontMetrics().getDescent(),iStartX + getStringWidth(gc,sFontName).x - gc.getFontMetrics().getDescent(),iStartY + getStringWidth(gc,sFontName).y - gc.getFontMetrics().getDescent());
    }
    if (fdCurrent.isStrikethrough()) {
      gc.drawLine(iStartX,iStartY + (getStringWidth(gc,sFontName).y / 2) + 1,iStartX + getStringWidth(gc,sFontName).x,iStartY + (getStringWidth(gc,sFontName).y / 2) + 1);
    }
    if (!bUseSize) {
      gc.setClipping(1,1,this.getSize().x,this.getSize().y);
      fSize=new Font(this.getDisplay(),"String_Node_Str",10,SWT.NORMAL);
      gc.setFont(fSize);
      gc.drawText("String_Node_Str" + String.valueOf(fdCurrent.getSize()) + "String_Node_Str",this.getSize().x - 36,3);
      fSize.dispose();
    }
    fCurrent.dispose();
  }
  cFore.dispose();
  gc.setFont(fOld);
}

Fixed version (ground truth):
public void paintControl(PaintEvent pe){
  Font fSize=null;
  Font fCurrent=null;
  Color cFore=null;
  GC gc=pe.gc;
  Font fOld=gc.getFont();
  if (cdCurrent != null && bUseColor) {
    cFore=new Color(this.getDisplay(),cdCurrent.getRed(),cdCurrent.getGreen(),cdCurrent.getBlue());
  }
 else {
    cFore=new Color(this.getDisplay(),0,0,0);
  }
  gc.setForeground(cFore);
  if (fdCurrent != null) {
    int iStyle=(fdCurrent.isBold()) ? SWT.BOLD : SWT.NORMAL;
    iStyle|=(fdCurrent.isItalic()) ? SWT.ITALIC : iStyle;
    String sFontName=fdCurrent.getName();
    if (!bUseSize) {
      gc.setClipping(2,2,this.getSize().x - 40,26);
      fCurrent=new Font(this.getDisplay(),fdCurrent.getName(),fOld.getFontData()[0].getHeight(),iStyle);
    }
 else {
      fCurrent=new Font(this.getDisplay(),fdCurrent.getName(),(int)fdCurrent.getSize(),iStyle);
    }
    gc.setFont(fCurrent);
    int iStartX=5;
    int iStartY=3;
    if (bUseAlignment) {
      if (fdCurrent.getAlignment().getHorizontalAlignment().equals(HorizontalAlignment.LEFT_LITERAL)) {
        iStartX=5;
      }
 else       if (fdCurrent.getAlignment().getHorizontalAlignment().equals(HorizontalAlignment.CENTER_LITERAL)) {
        iStartX=this.getSize().x / 2 - (getStringWidth(gc,sFontName).x / 2);
      }
 else       if (fdCurrent.getAlignment().getHorizontalAlignment().equals(HorizontalAlignment.RIGHT_LITERAL)) {
        iStartX=this.getSize().x - getStringWidth(gc,sFontName).x;
      }
      if (fdCurrent.getAlignment().getVerticalAlignment().equals(VerticalAlignment.TOP_LITERAL)) {
        iStartY=3;
      }
 else       if (fdCurrent.getAlignment().getVerticalAlignment().equals(VerticalAlignment.CENTER_LITERAL)) {
        iStartY=(this.getSize().y / 2);
        if (bUseSize) {
          iStartY-=(getStringWidth(gc,sFontName).y / 2);
        }
 else {
          iStartY-=15;
        }
      }
 else       if (fdCurrent.getAlignment().getVerticalAlignment().equals(VerticalAlignment.BOTTOM_LITERAL)) {
        iStartY=this.getSize().y;
        if (bUseSize) {
          iStartY-=(getStringWidth(gc,sFontName).y);
        }
 else {
          iStartY-=30;
        }
      }
    }
    gc.drawText(sFontName,iStartX,iStartY);
    if (fdCurrent.isUnderline()) {
      gc.drawLine(iStartX,iStartY + getStringWidth(gc,sFontName).y - gc.getFontMetrics().getDescent(),iStartX + getStringWidth(gc,sFontName).x - gc.getFontMetrics().getDescent(),iStartY + getStringWidth(gc,sFontName).y - gc.getFontMetrics().getDescent());
    }
    if (fdCurrent.isStrikethrough()) {
      gc.drawLine(iStartX,iStartY + (getStringWidth(gc,sFontName).y / 2) + 1,iStartX + getStringWidth(gc,sFontName).x,iStartY + (getStringWidth(gc,sFontName).y / 2) + 1);
    }
    if (!bUseSize) {
      gc.setClipping(1,1,this.getSize().x,this.getSize().y);
      fSize=new Font(this.getDisplay(),"String_Node_Str",10,SWT.NORMAL);
      gc.setFont(fSize);
      gc.drawText("String_Node_Str" + String.valueOf(fdCurrent.getSize()) + "String_Node_Str",this.getSize().x - 36,3);
      fSize.dispose();
    }
    fCurrent.dispose();
  }
  cFore.dispose();
  gc.setFont(fOld);
}