Program: 66163
Project: 66163
Buggy source:
/** 
 */
private void placeComponents(){
  FillLayout flMain=new FillLayout();
  flMain.marginHeight=0;
  flMain.marginWidth=0;
  GridLayout glAttributes=new GridLayout();
  glAttributes.horizontalSpacing=5;
  glAttributes.verticalSpacing=5;
  glAttributes.marginHeight=7;
  glAttributes.marginWidth=7;
  GridLayout glGeneral=new GridLayout();
  glGeneral.numColumns=2;
  glGeneral.horizontalSpacing=5;
  glGeneral.verticalSpacing=5;
  FillLayout flOutline=new FillLayout();
  this.setLayout(flMain);
  if (sGroupName == null || sGroupName.length() == 0) {
    grpAttributes=new Composite(this,SWT.NONE);
  }
 else {
    grpAttributes=new Group(this,SWT.NONE);
    ((Group)grpAttributes).setText(sGroupName);
  }
  grpAttributes.setLayout(glAttributes);
  cmpGeneral=new Composite(grpAttributes,SWT.NONE);
  GridData gdCMPGeneral=new GridData(GridData.FILL_HORIZONTAL);
  cmpGeneral.setLayoutData(gdCMPGeneral);
  cmpGeneral.setLayout(glGeneral);
  boolean bEnableUI=bEnabled && this.lblCurrent.isVisible();
  if (attributesContext.isVisibilityEnabled) {
    btnVisible=new TristateCheckbox(cmpGeneral,SWT.NONE);
    btnVisible.setText(Messages.getString("String_Node_Str"));
    GridData gdCBVisible=new GridData(GridData.FILL_HORIZONTAL);
    gdCBVisible.horizontalSpan=2;
    btnVisible.setLayoutData(gdCBVisible);
    btnVisible.setSelectionState(lblCurrent.isSetVisible() ? (lblCurrent.isVisible() ? TristateCheckbox.STATE_SELECTED : TristateCheckbox.STATE_UNSELECTED) : TristateCheckbox.STATE_GRAYED);
    btnVisible.addSelectionListener(this);
    if (bEnabled) {
      bEnableUI=ChartUIExtensionUtil.canEnableUI(btnVisible);
    }
  }
  if (attributesContext.isLabelEnabled) {
    lblLabel=new Label(cmpGeneral,SWT.NONE);
{
      GridData gd=new GridData();
      lblLabel.setLayoutData(gd);
      lblLabel.setText(Messages.getString("String_Node_Str"));
    }
    txtLabel=new ExternalizedTextEditorComposite(cmpGeneral,SWT.BORDER | SWT.SINGLE,-1,-1,wizardContext.getUIServiceProvider().getRegisteredKeys(),wizardContext.getUIServiceProvider(),"String_Node_Str");
{
      GridData gd=new GridData(GridData.FILL_BOTH);
      txtLabel.setLayoutData(gd);
      txtLabel.addListener(this);
    }
  }
  if (attributesContext.isPositionEnabled) {
    lblPosition=new Label(cmpGeneral,SWT.NONE);
    GridData gdLBLPosition=new GridData();
    lblPosition.setLayoutData(gdLBLPosition);
    lblPosition.setText(Messages.getString("String_Node_Str"));
    lblPosition.setEnabled(bEnableUI);
    cmbPosition=new Combo(cmpGeneral,SWT.DROP_DOWN | SWT.READ_ONLY);
    GridData gdCMBPosition=new GridData(GridData.FILL_BOTH);
    cmbPosition.setLayoutData(gdCMBPosition);
    cmbPosition.addSelectionListener(this);
    cmbPosition.setEnabled(bEnableUI);
  }
  if (attributesContext.isFontEnabled) {
    lblFont=new Label(cmpGeneral,SWT.NONE);
    GridData gdLFont=new GridData();
    lblFont.setLayoutData(gdLFont);
    lblFont.setText(Messages.getString("String_Node_Str"));
    lblFont.setEnabled(bEnableUI);
    fdcFont=new FontDefinitionComposite(cmpGeneral,SWT.NONE,wizardContext,this.fdCurrent,this.cdFont,attributesContext.isFontAlignmentEnabled);
    GridData gdFDCFont=new GridData(GridData.FILL_BOTH);
    gdFDCFont.widthHint=fdcFont.getPreferredSize().x;
    gdFDCFont.grabExcessVerticalSpace=false;
    fdcFont.setLayoutData(gdFDCFont);
    fdcFont.addListener(this);
    fdcFont.setEnabled(bEnableUI);
  }
  lblFill=new Label(cmpGeneral,SWT.NONE);
  GridData gdLFill=new GridData();
  lblFill.setLayoutData(gdLFill);
  lblFill.setText(Messages.getString("String_Node_Str"));
  lblFill.setEnabled(bEnableUI);
  int iFillOption=FillChooserComposite.DISABLE_PATTERN_FILL | FillChooserComposite.ENABLE_TRANSPARENT | FillChooserComposite.ENABLE_TRANSPARENT_SLIDER| FillChooserComposite.ENABLE_AUTO;
  fccBackground=new FillChooserComposite(cmpGeneral,SWT.NONE,iFillOption,wizardContext,fBackground);
  GridData gdFCCBackground=new GridData(GridData.FILL_BOTH);
  fccBackground.setLayoutData(gdFCCBackground);
  fccBackground.addListener(this);
  fccBackground.setEnabled(bEnableUI);
  if (attributesContext.isShadowEnabled) {
    lblShadow=new Label(cmpGeneral,SWT.NONE);
    GridData gdLBLShadow=new GridData();
    lblShadow.setLayoutData(gdLBLShadow);
    lblShadow.setText(Messages.getString("String_Node_Str"));
    lblShadow.setEnabled(bEnableUI);
    fccShadow=new FillChooserComposite(cmpGeneral,SWT.DROP_DOWN | SWT.READ_ONLY,iFillOption,wizardContext,cdShadow);
    GridData gdFCCShadow=new GridData(GridData.FILL_BOTH);
    fccShadow.setLayoutData(gdFCCShadow);
    fccShadow.addListener(this);
    fccShadow.setEnabled(bEnableUI);
  }
  grpOutline=new Group(grpAttributes,SWT.NONE);
  GridData gdGOutline=new GridData(GridData.FILL_HORIZONTAL);
  grpOutline.setLayoutData(gdGOutline);
  grpOutline.setText(Messages.getString("String_Node_Str"));
  grpOutline.setLayout(flOutline);
  grpOutline.setEnabled(bEnableUI);
  int optionalStyles=LineAttributesComposite.ENABLE_STYLES | LineAttributesComposite.ENABLE_VISIBILITY | LineAttributesComposite.ENABLE_WIDTH| LineAttributesComposite.ENABLE_COLOR| LineAttributesComposite.ENABLE_AUTO_COLOR;
  liacOutline=new LineAttributesComposite(grpOutline,SWT.NONE,optionalStyles,wizardContext,laCurrent);
  liacOutline.addListener(this);
  liacOutline.setAttributesEnabled(bEnableUI);
  if (attributesContext.isInsetsEnabled) {
    icInsets=new InsetsComposite(grpAttributes,SWT.NONE,insets,sUnits,wizardContext.getUIServiceProvider());
    GridData gdICInsets=new GridData(GridData.FILL_HORIZONTAL);
    gdICInsets.grabExcessVerticalSpace=false;
    icInsets.addListener(this);
    icInsets.setLayoutData(gdICInsets);
    icInsets.setEnabled(bEnableUI);
    if (defLabel != null) {
      icInsets.setDefaultInsetsValue(defLabel.getInsets());
    }
  }
  populateLists();
}

Fixed version (ground truth):
/** 
 */
private void placeComponents(){
  FillLayout flMain=new FillLayout();
  flMain.marginHeight=0;
  flMain.marginWidth=0;
  GridLayout glAttributes=new GridLayout();
  glAttributes.horizontalSpacing=5;
  glAttributes.verticalSpacing=5;
  glAttributes.marginHeight=7;
  glAttributes.marginWidth=7;
  GridLayout glGeneral=new GridLayout();
  glGeneral.numColumns=2;
  glGeneral.horizontalSpacing=5;
  glGeneral.verticalSpacing=5;
  FillLayout flOutline=new FillLayout();
  this.setLayout(flMain);
  if (sGroupName == null || sGroupName.length() == 0) {
    grpAttributes=new Composite(this,SWT.NONE);
  }
 else {
    grpAttributes=new Group(this,SWT.NONE);
    ((Group)grpAttributes).setText(sGroupName);
  }
  grpAttributes.setLayout(glAttributes);
  cmpGeneral=new Composite(grpAttributes,SWT.NONE);
  GridData gdCMPGeneral=new GridData(GridData.FILL_HORIZONTAL);
  cmpGeneral.setLayoutData(gdCMPGeneral);
  cmpGeneral.setLayout(glGeneral);
  boolean bEnableUI=bEnabled && !ChartUIExtensionUtil.isSetInvisible(lblCurrent);
  if (attributesContext.isVisibilityEnabled) {
    btnVisible=new TristateCheckbox(cmpGeneral,SWT.NONE);
    btnVisible.setText(Messages.getString("String_Node_Str"));
    GridData gdCBVisible=new GridData(GridData.FILL_HORIZONTAL);
    gdCBVisible.horizontalSpan=2;
    btnVisible.setLayoutData(gdCBVisible);
    btnVisible.setSelectionState(lblCurrent.isSetVisible() ? (lblCurrent.isVisible() ? TristateCheckbox.STATE_SELECTED : TristateCheckbox.STATE_UNSELECTED) : TristateCheckbox.STATE_GRAYED);
    btnVisible.addSelectionListener(this);
    if (bEnabled) {
      bEnableUI=ChartUIExtensionUtil.canEnableUI(btnVisible);
    }
  }
  if (attributesContext.isLabelEnabled) {
    lblLabel=new Label(cmpGeneral,SWT.NONE);
{
      GridData gd=new GridData();
      lblLabel.setLayoutData(gd);
      lblLabel.setText(Messages.getString("String_Node_Str"));
    }
    txtLabel=new ExternalizedTextEditorComposite(cmpGeneral,SWT.BORDER | SWT.SINGLE,-1,-1,wizardContext.getUIServiceProvider().getRegisteredKeys(),wizardContext.getUIServiceProvider(),"String_Node_Str");
{
      GridData gd=new GridData(GridData.FILL_BOTH);
      txtLabel.setLayoutData(gd);
      txtLabel.addListener(this);
    }
  }
  if (attributesContext.isPositionEnabled) {
    lblPosition=new Label(cmpGeneral,SWT.NONE);
    GridData gdLBLPosition=new GridData();
    lblPosition.setLayoutData(gdLBLPosition);
    lblPosition.setText(Messages.getString("String_Node_Str"));
    lblPosition.setEnabled(bEnableUI);
    cmbPosition=new Combo(cmpGeneral,SWT.DROP_DOWN | SWT.READ_ONLY);
    GridData gdCMBPosition=new GridData(GridData.FILL_BOTH);
    cmbPosition.setLayoutData(gdCMBPosition);
    cmbPosition.addSelectionListener(this);
    cmbPosition.setEnabled(bEnableUI);
  }
  if (attributesContext.isFontEnabled) {
    lblFont=new Label(cmpGeneral,SWT.NONE);
    GridData gdLFont=new GridData();
    lblFont.setLayoutData(gdLFont);
    lblFont.setText(Messages.getString("String_Node_Str"));
    lblFont.setEnabled(bEnableUI);
    fdcFont=new FontDefinitionComposite(cmpGeneral,SWT.NONE,wizardContext,this.fdCurrent,this.cdFont,attributesContext.isFontAlignmentEnabled);
    GridData gdFDCFont=new GridData(GridData.FILL_BOTH);
    gdFDCFont.widthHint=fdcFont.getPreferredSize().x;
    gdFDCFont.grabExcessVerticalSpace=false;
    fdcFont.setLayoutData(gdFDCFont);
    fdcFont.addListener(this);
    fdcFont.setEnabled(bEnableUI);
  }
  lblFill=new Label(cmpGeneral,SWT.NONE);
  GridData gdLFill=new GridData();
  lblFill.setLayoutData(gdLFill);
  lblFill.setText(Messages.getString("String_Node_Str"));
  lblFill.setEnabled(bEnableUI);
  int iFillOption=FillChooserComposite.DISABLE_PATTERN_FILL | FillChooserComposite.ENABLE_TRANSPARENT | FillChooserComposite.ENABLE_TRANSPARENT_SLIDER| FillChooserComposite.ENABLE_AUTO;
  fccBackground=new FillChooserComposite(cmpGeneral,SWT.NONE,iFillOption,wizardContext,fBackground);
  GridData gdFCCBackground=new GridData(GridData.FILL_BOTH);
  fccBackground.setLayoutData(gdFCCBackground);
  fccBackground.addListener(this);
  fccBackground.setEnabled(bEnableUI);
  if (attributesContext.isShadowEnabled) {
    lblShadow=new Label(cmpGeneral,SWT.NONE);
    GridData gdLBLShadow=new GridData();
    lblShadow.setLayoutData(gdLBLShadow);
    lblShadow.setText(Messages.getString("String_Node_Str"));
    lblShadow.setEnabled(bEnableUI);
    fccShadow=new FillChooserComposite(cmpGeneral,SWT.DROP_DOWN | SWT.READ_ONLY,iFillOption,wizardContext,cdShadow);
    GridData gdFCCShadow=new GridData(GridData.FILL_BOTH);
    fccShadow.setLayoutData(gdFCCShadow);
    fccShadow.addListener(this);
    fccShadow.setEnabled(bEnableUI);
  }
  grpOutline=new Group(grpAttributes,SWT.NONE);
  GridData gdGOutline=new GridData(GridData.FILL_HORIZONTAL);
  grpOutline.setLayoutData(gdGOutline);
  grpOutline.setText(Messages.getString("String_Node_Str"));
  grpOutline.setLayout(flOutline);
  grpOutline.setEnabled(bEnableUI);
  int optionalStyles=LineAttributesComposite.ENABLE_STYLES | LineAttributesComposite.ENABLE_VISIBILITY | LineAttributesComposite.ENABLE_WIDTH| LineAttributesComposite.ENABLE_COLOR| LineAttributesComposite.ENABLE_AUTO_COLOR;
  liacOutline=new LineAttributesComposite(grpOutline,SWT.NONE,optionalStyles,wizardContext,laCurrent);
  liacOutline.addListener(this);
  liacOutline.setAttributesEnabled(bEnableUI);
  if (attributesContext.isInsetsEnabled) {
    icInsets=new InsetsComposite(grpAttributes,SWT.NONE,insets,sUnits,wizardContext.getUIServiceProvider());
    GridData gdICInsets=new GridData(GridData.FILL_HORIZONTAL);
    gdICInsets.grabExcessVerticalSpace=false;
    icInsets.addListener(this);
    icInsets.setLayoutData(gdICInsets);
    icInsets.setEnabled(bEnableUI);
    if (defLabel != null) {
      icInsets.setDefaultInsetsValue(defLabel.getInsets());
    }
  }
  populateLists();
}