Program: 129004
Project: 129004
Buggy source:
public void handleEvent(Event event){
  TableItem tableItem=(TableItem)event.item;
  if (table.isDisposed() || tableItem.isDisposed()) {
    return;
  }
  boolean selectedState=(event.detail & SWT.SELECTED) != 0;
  boolean focusedState=table.isFocusControl();
  if (selectedState || event.detail == 22) {
    GC gc=event.gc;
    Rectangle rect=event.getBounds();
    Color previousBackground=gc.getBackground();
    Color previousForeground=gc.getForeground();
    Color bgColor=null;
    Color fgColor=null;
    if (focusedState) {
      if (bgColorSelectedLine != null) {
        bgColor=bgColorSelectedLine;
      }
 else {
        bgColor=table.getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION);
      }
      if (fgColorSelectedLine != null) {
        fgColor=fgColorSelectedLine;
      }
 else {
        fgColor=table.getDisplay().getSystemColor(SWT.COLOR_BLACK);
      }
    }
 else {
      if (bgColorSelectedLineWhenUnactive != null) {
        bgColor=bgColorSelectedLineWhenUnactive;
      }
 else {
        bgColor=table.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
      }
      if (fgColorSelectedLineWhenUnactive != null) {
        fgColor=fgColorSelectedLineWhenUnactive;
      }
 else {
        fgColor=table.getDisplay().getSystemColor(SWT.COLOR_BLACK);
      }
    }
    gc.setBackground(bgColor);
    gc.setForeground(fgColor);
    gc.fillRectangle(rect);
    gc.setBackground(previousBackground);
    gc.setForeground(previousForeground);
    event.detail&=~SWT.SELECTED;
  }
 else   if (event.detail == 24 || event.detail == 28) {
    GC gc=event.gc;
    Rectangle rect=event.getBounds();
    int columnIndex=TableUtils.getColumnIndex(table,new Point(event.x,event.y));
    Color currentBackgroundColumn=tableItem.getBackground(columnIndex);
    Color parentBg=tableItem.getParent().getBackground();
    if (currentBackgroundColumn == parentBg && tableItem.getBackground() != null) {
      currentBackgroundColumn=tableItem.getBackground();
    }
    Color background=gc.getBackground();
    gc.setBackground(currentBackgroundColumn);
    gc.fillRectangle(rect);
    gc.setBackground(background);
  }
}

Fixed version (ground truth):
@Override public void handleEvent(Event event){
  TableItem tableItem=(TableItem)event.item;
  if (table.isDisposed() || tableItem.isDisposed()) {
    return;
  }
  boolean selectedState=(event.detail & SWT.SELECTED) != 0;
  boolean focusedState=table.isFocusControl();
  if (selectedState || event.detail == 22) {
    GC gc=event.gc;
    Rectangle rect=event.getBounds();
    Color previousBackground=gc.getBackground();
    Color previousForeground=gc.getForeground();
    Color bgColor=null;
    Color fgColor=null;
    if (focusedState) {
      if (bgColorSelectedLine != null) {
        bgColor=bgColorSelectedLine;
      }
 else {
        bgColor=table.getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION);
      }
      if (fgColorSelectedLine != null) {
        fgColor=fgColorSelectedLine;
      }
 else {
        fgColor=table.getDisplay().getSystemColor(SWT.COLOR_BLACK);
      }
    }
 else {
      if (bgColorSelectedLineWhenUnactive != null) {
        bgColor=bgColorSelectedLineWhenUnactive;
      }
 else {
        bgColor=table.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
      }
      if (fgColorSelectedLineWhenUnactive != null) {
        fgColor=fgColorSelectedLineWhenUnactive;
      }
 else {
        fgColor=table.getDisplay().getSystemColor(SWT.COLOR_BLACK);
      }
    }
    gc.setBackground(bgColor);
    gc.setForeground(fgColor);
    gc.fillRectangle(rect);
    gc.setBackground(previousBackground);
    gc.setForeground(previousForeground);
    event.detail&=~SWT.SELECTED;
  }
 else   if (event.detail == 24 || event.detail == 28) {
    GC gc=event.gc;
    Rectangle rect=event.getBounds();
    int columnIndex=TableUtils.getColumnIndex(table,new Point(event.x,event.y));
    Color currentBackgroundColumn=tableItem.getBackground(columnIndex);
    Color parentBg=tableItem.getParent().getBackground();
    if (currentBackgroundColumn == parentBg && tableItem.getBackground() != null) {
      currentBackgroundColumn=tableItem.getBackground();
    }
    Color background=gc.getBackground();
    gc.setBackground(currentBackgroundColumn);
    gc.fillRectangle(rect);
    gc.setBackground(background);
  }
}