Program: 79302
Project: 79302
Buggy source:
/** 
 */
private void createDropDownComponent(int iXLoc,int iYLoc){
  int iShellHeight=220;
  int iShellWidth=160;
  if (!bGradientEnabled) {
    iShellHeight=iShellHeight - 30;
  }
  if (!bImageEnabled) {
    iShellHeight=iShellHeight - 30;
  }
  Shell shell=new Shell(this.getShell(),SWT.NONE);
  shell.setLayout(new FillLayout());
  shell.setSize(iShellWidth,iShellHeight);
  shell.setLocation(iXLoc,iYLoc);
  cmpDropDown=new Composite(shell,SWT.NONE);
  GridLayout glDropDown=new GridLayout();
  glDropDown.marginHeight=2;
  glDropDown.marginWidth=2;
  glDropDown.horizontalSpacing=1;
  glDropDown.verticalSpacing=1;
  glDropDown.numColumns=8;
  cmpDropDown.setLayout(glDropDown);
  cmpDropDown.addKeyListener(this);
  if (colorArray == null) {
    colorArray=createColorMap(getDisplay());
  }
  ColorSelectionCanvas cnv=new ColorSelectionCanvas(cmpDropDown,SWT.BORDER,colorArray);
  GridData gdCnv=new GridData(GridData.FILL_BOTH);
  gdCnv.horizontalSpan=8;
  gdCnv.heightHint=100;
  cnv.setLayoutData(gdCnv);
  cnv.addMouseListener(this);
  if (this.fCurrent instanceof ColorDefinition) {
    cnv.setColor(new Color(this.getDisplay(),((ColorDefinition)fCurrent).getRed(),((ColorDefinition)fCurrent).getGreen(),((ColorDefinition)fCurrent).getBlue()));
  }
  btnTransparent=new Button(cmpDropDown,SWT.TOGGLE);
  GridData gdTransparent=new GridData(GridData.FILL_BOTH);
  gdTransparent.heightHint=26;
  gdTransparent.horizontalSpan=8;
  btnTransparent.setLayoutData(gdTransparent);
  btnTransparent.setText("String_Node_Str");
  btnTransparent.addSelectionListener(this);
  if (fCurrent == null) {
    btnTransparent.setSelection(true);
  }
 else {
    btnTransparent.setSelection(false);
  }
  if (this.bGradientEnabled) {
    btnGradient=new Button(cmpDropDown,SWT.NONE);
    GridData gdGradient=new GridData(GridData.FILL_BOTH);
    gdTransparent.heightHint=26;
    gdGradient.horizontalSpan=8;
    btnGradient.setLayoutData(gdGradient);
    btnGradient.setText("String_Node_Str");
    btnGradient.addSelectionListener(this);
  }
  btnCustom=new Button(cmpDropDown,SWT.NONE);
  GridData gdCustom=new GridData(GridData.FILL_BOTH);
  gdTransparent.heightHint=26;
  gdCustom.horizontalSpan=8;
  btnCustom.setLayoutData(gdCustom);
  btnCustom.setText("String_Node_Str");
  btnCustom.addSelectionListener(this);
  if (this.bImageEnabled) {
    btnImage=new Button(cmpDropDown,SWT.NONE);
    GridData gdImage=new GridData(GridData.FILL_BOTH);
    gdTransparent.heightHint=26;
    gdImage.horizontalSpan=8;
    btnImage.setLayoutData(gdImage);
    btnImage.setText("String_Node_Str");
    btnImage.addSelectionListener(this);
  }
  shell.layout();
  shell.open();
}

Fixed version (ground truth):
/** 
 */
private void createDropDownComponent(int iXLoc,int iYLoc){
  int iShellHeight=240;
  int iShellWidth=160;
  if (!bGradientEnabled) {
    iShellHeight=iShellHeight - 30;
  }
  if (!bImageEnabled) {
    iShellHeight=iShellHeight - 30;
  }
  Shell shell=new Shell(this.getShell(),SWT.NONE);
  shell.setLayout(new FillLayout());
  shell.setSize(iShellWidth,iShellHeight);
  shell.setLocation(iXLoc,iYLoc);
  cmpDropDown=new Composite(shell,SWT.NONE);
  GridLayout glDropDown=new GridLayout();
  glDropDown.marginHeight=2;
  glDropDown.marginWidth=2;
  glDropDown.horizontalSpacing=1;
  glDropDown.verticalSpacing=1;
  glDropDown.numColumns=8;
  cmpDropDown.setLayout(glDropDown);
  cmpDropDown.addKeyListener(this);
  if (colorArray == null) {
    colorArray=createColorMap(getDisplay());
  }
  ColorSelectionCanvas cnv=new ColorSelectionCanvas(cmpDropDown,SWT.BORDER,colorArray);
  GridData gdCnv=new GridData(GridData.FILL_BOTH);
  gdCnv.horizontalSpan=8;
  gdCnv.heightHint=100;
  cnv.setLayoutData(gdCnv);
  cnv.addMouseListener(this);
  if (this.fCurrent instanceof ColorDefinition) {
    cnv.setColor(new Color(this.getDisplay(),((ColorDefinition)fCurrent).getRed(),((ColorDefinition)fCurrent).getGreen(),((ColorDefinition)fCurrent).getBlue()));
  }
  GridLayout glTransparency=new GridLayout();
  glTransparency.numColumns=2;
  glTransparency.horizontalSpacing=5;
  glTransparency.verticalSpacing=3;
  glTransparency.marginHeight=0;
  glTransparency.marginWidth=0;
  Composite cmpTransparency=new Composite(cmpDropDown,SWT.NONE);
  GridData gdTransparency=new GridData(GridData.FILL_BOTH);
  gdTransparency.heightHint=40;
  gdTransparency.horizontalSpan=8;
  cmpTransparency.setLayoutData(gdTransparency);
  cmpTransparency.setLayout(glTransparency);
  Label lblTransparency=new Label(cmpTransparency,SWT.NONE);
  GridData gdLBLTransparency=new GridData(GridData.FILL_HORIZONTAL);
  gdLBLTransparency.horizontalIndent=2;
  lblTransparency.setLayoutData(gdLBLTransparency);
  lblTransparency.setText("String_Node_Str");
  lblCurrentTransparency=new Label(cmpTransparency,SWT.NONE);
  GridData gdLBLCurrentTransparency=new GridData();
  gdLBLCurrentTransparency.widthHint=40;
  lblCurrentTransparency.setLayoutData(gdLBLCurrentTransparency);
  srTransparency=new Slider(cmpTransparency,SWT.HORIZONTAL);
  GridData gdTransparent=new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
  gdTransparent.heightHint=20;
  gdTransparent.horizontalSpan=2;
  srTransparency.setLayoutData(gdTransparent);
  if (fCurrent == null) {
    srTransparency.setSelection(0);
    srTransparency.setEnabled(false);
  }
 else {
    int iValue=0;
    if (fCurrent instanceof ColorDefinition) {
      iValue=((ColorDefinition)fCurrent).getTransparency();
    }
    if (fCurrent instanceof Gradient) {
      iValue=((Gradient)fCurrent).getTransparency();
    }
    srTransparency.setValues(iValue,0,256,1,1,10);
  }
  lblCurrentTransparency.setText(String.valueOf(srTransparency.getSelection()));
  srTransparency.setToolTipText(String.valueOf(srTransparency.getSelection()));
  srTransparency.addSelectionListener(this);
  if (this.bGradientEnabled) {
    btnGradient=new Button(cmpDropDown,SWT.NONE);
    GridData gdGradient=new GridData(GridData.FILL_BOTH);
    gdTransparent.heightHint=26;
    gdGradient.horizontalSpan=8;
    btnGradient.setLayoutData(gdGradient);
    btnGradient.setText("String_Node_Str");
    btnGradient.addSelectionListener(this);
  }
  btnCustom=new Button(cmpDropDown,SWT.NONE);
  GridData gdCustom=new GridData(GridData.FILL_BOTH);
  gdTransparent.heightHint=26;
  gdCustom.horizontalSpan=8;
  btnCustom.setLayoutData(gdCustom);
  btnCustom.setText("String_Node_Str");
  btnCustom.addSelectionListener(this);
  if (this.bImageEnabled) {
    btnImage=new Button(cmpDropDown,SWT.NONE);
    GridData gdImage=new GridData(GridData.FILL_BOTH);
    gdTransparent.heightHint=26;
    gdImage.horizontalSpan=8;
    btnImage.setLayoutData(gdImage);
    btnImage.setText("String_Node_Str");
    btnImage.addSelectionListener(this);
  }
  shell.layout();
  shell.open();
}