Program: 77668
Project: 77668
Buggy source:
public void handleEvent(Event event){
switch (event.type) {
case SWT.FocusOut:
    if (isPopupControl(event.widget)) {
      Control cTmp=isPressingKey ? Display.getCurrent().getFocusControl() : Display.getCurrent().getCursorControl();
      isPressingKey=false;
      if (cTmp != null) {
        if (isPopupControl(cTmp) || cTmp == cnvSelection || cTmp == btnDown) {
          return;
        }
        if (cTmp.equals(cnvSelection) || cTmp.equals(btnDown)) {
          bJustFocusLost=true;
        }
      }
      cmpDropDown.getShell().close();
    }
  break;
case SWT.KeyDown:
if (cmpDropDown != null && !cmpDropDown.getShell().isDisposed()) {
  if (event.keyCode == SWT.ARROW_UP) {
    cmpDropDown.getShell().close();
  }
 else   if (event.keyCode == SWT.CR || event.keyCode == SWT.KEYPAD_CR) {
    this.iTransparency=srTransparency.getSelection();
    if (fCurrent instanceof ColorDefinition && bTransparencyChanged) {
      ((ColorDefinition)fCurrent).setTransparency(this.iTransparency);
    }
    this.setFill(fCurrent);
    cmpDropDown.getShell().close();
  }
}
break;
case SWT.MouseDown:
if (!bEnabled) {
return;
}
fireHandleEvent(MOUSE_CLICKED_EVENT);
if (event.widget.equals(cnvSelection)) {
if (!cnvSelection.isDisposed()) {
toggleDropDown();
}
}
 else if (event.widget instanceof ColorSelectionCanvas) {
ColorDefinition cTmp=AttributeFactory.eINSTANCE.createColorDefinition();
Color clrTmp=((ColorSelectionCanvas)event.widget).getColorAt(event.x,event.y);
cTmp.set(clrTmp.getRed(),clrTmp.getGreen(),clrTmp.getBlue());
int iTransparency=255;
if (fCurrent instanceof ColorDefinition && this.iTransparency != 0) {
iTransparency=(bTransparencyChanged) ? this.iTransparency : ((ColorDefinition)fCurrent).getTransparency();
}
cTmp.setTransparency(iTransparency);
addAdapters(cTmp);
setFill(cTmp);
fireHandleEvent(FillChooserComposite.FILL_CHANGED_EVENT);
cmpDropDown.getShell().close();
}
break;
case SWT.Traverse:
switch (event.detail) {
case SWT.TRAVERSE_TAB_NEXT:
case SWT.TRAVERSE_TAB_PREVIOUS:
isPressingKey=true;
}
break;
}
}

Fixed version (ground truth):
public void handleEvent(Event event){
switch (event.type) {
case SWT.FocusOut:
    if (isPopupControl(event.widget)) {
      Control cTmp=isPressingKey ? Display.getCurrent().getFocusControl() : Display.getCurrent().getCursorControl();
      isPressingKey=false;
      if (cTmp != null) {
        if (isPopupControl(cTmp) || SWT.getPlatform().indexOf("String_Node_Str") == 0 && (cTmp.equals(cnvSelection) || cTmp.equals(btnDown))) {
          return;
        }
        if (cTmp.equals(cnvSelection) || cTmp.equals(btnDown)) {
          bJustFocusLost=true;
        }
      }
      cmpDropDown.getShell().close();
    }
  break;
case SWT.KeyDown:
if (cmpDropDown != null && !cmpDropDown.getShell().isDisposed()) {
  if (event.keyCode == SWT.ARROW_UP) {
    cmpDropDown.getShell().close();
  }
 else   if (event.keyCode == SWT.CR || event.keyCode == SWT.KEYPAD_CR) {
    this.iTransparency=srTransparency.getSelection();
    if (fCurrent instanceof ColorDefinition && bTransparencyChanged) {
      ((ColorDefinition)fCurrent).setTransparency(this.iTransparency);
    }
    this.setFill(fCurrent);
    cmpDropDown.getShell().close();
  }
}
break;
case SWT.MouseDown:
if (!bEnabled) {
return;
}
fireHandleEvent(MOUSE_CLICKED_EVENT);
if (event.widget.equals(cnvSelection)) {
if (!cnvSelection.isDisposed()) {
toggleDropDown();
}
}
 else if (event.widget instanceof ColorSelectionCanvas) {
ColorDefinition cTmp=AttributeFactory.eINSTANCE.createColorDefinition();
Color clrTmp=((ColorSelectionCanvas)event.widget).getColorAt(event.x,event.y);
cTmp.set(clrTmp.getRed(),clrTmp.getGreen(),clrTmp.getBlue());
int iTransparency=255;
if (fCurrent instanceof ColorDefinition && this.iTransparency != 0) {
iTransparency=(bTransparencyChanged) ? this.iTransparency : ((ColorDefinition)fCurrent).getTransparency();
}
cTmp.setTransparency(iTransparency);
addAdapters(cTmp);
setFill(cTmp);
fireHandleEvent(FillChooserComposite.FILL_CHANGED_EVENT);
cmpDropDown.getShell().close();
}
break;
case SWT.Traverse:
switch (event.detail) {
case SWT.TRAVERSE_TAB_NEXT:
case SWT.TRAVERSE_TAB_PREVIOUS:
isPressingKey=true;
}
break;
}
}