Program: 95407
Project: 95407
Buggy source:
/** 
 * {@inheritDoc} 
 */
public Rectangle getCellBounds(final int row,final int col,final boolean restr){
  return getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable<Rectangle>(){
    public Rectangle run() throws StepExecutionException {
      TableItem ti=m_table.getItem(row);
      int column=(m_table.getColumnCount() > 0 || col > 0) ? col : 0;
      org.eclipse.swt.graphics.Rectangle r=ti.getBounds(column);
      if (!restr) {
        return SwtPointUtil.toAwtRectangle(r);
      }
      String text=CAPUtil.getWidgetText(ti,SwtToolkitConstants.WIDGET_TEXT_KEY_PREFIX + column,ti.getText(column));
      Image image=ti.getImage(column);
      if (text != null && text.length() != 0) {
        GC gc=new GC(m_table);
        int charWidth=0;
        try {
          FontMetrics fm=gc.getFontMetrics();
          charWidth=fm.getAverageCharWidth();
        }
  finally {
          gc.dispose();
        }
        r.width=text.length() * charWidth;
        if (image != null) {
          r.width+=image.getBounds().width;
        }
      }
 else       if (image != null) {
        r.width=image.getBounds().width;
      }
      if (column > 0) {
        TableColumn tc=m_table.getColumn(column);
        int alignment=tc.getAlignment();
        if (alignment == SWT.CENTER) {
          r.x+=((double)tc.getWidth() / 2) - ((double)r.width / 2);
        }
        if (alignment == SWT.RIGHT) {
          r.x+=tc.getWidth() - r.width;
        }
      }
      return new Rectangle(r.x,r.y,r.width,r.height);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public Rectangle getCellBounds(final int row,final int col,final boolean restr){
  return getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable<Rectangle>(){
    public Rectangle run() throws StepExecutionException {
      TableItem ti=m_table.getItem(row);
      int column=(m_table.getColumnCount() > 0 || col > 0) ? col : 0;
      org.eclipse.swt.graphics.Rectangle cellbound=ti.getBounds(column);
      if (!restr) {
        return SwtPointUtil.toAwtRectangle(cellbound);
      }
      org.eclipse.swt.graphics.Rectangle calculatedBounds=new org.eclipse.swt.graphics.Rectangle(cellbound.x,cellbound.y,cellbound.width,cellbound.height);
      String text=CAPUtil.getWidgetText(ti,SwtToolkitConstants.WIDGET_TEXT_KEY_PREFIX + column,ti.getText(column));
      Image image=ti.getImage(column);
      if (text != null && text.length() != 0) {
        GC gc=new GC(m_table);
        int charWidth=0;
        try {
          FontMetrics fm=gc.getFontMetrics();
          charWidth=fm.getAverageCharWidth();
        }
  finally {
          gc.dispose();
        }
        calculatedBounds.width=text.length() * charWidth;
        if (image != null) {
          calculatedBounds.width+=image.getBounds().width;
        }
      }
 else       if (image != null) {
        calculatedBounds.width=image.getBounds().width;
      }
      if (column > 0) {
        TableColumn tc=m_table.getColumn(column);
        int alignment=tc.getAlignment();
        if (alignment == SWT.CENTER) {
          calculatedBounds.x+=((double)tc.getWidth() / 2) - ((double)calculatedBounds.width / 2);
        }
        if (alignment == SWT.RIGHT) {
          calculatedBounds.x+=tc.getWidth() - calculatedBounds.width;
        }
      }
      return SwtPointUtil.toAwtRectangle(cellbound.intersection(calculatedBounds));
    }
  }
);
}