Program: 70215
Project: 70215
Buggy source:
protected Composite getComponent(Composite parent){
  ChartUIUtil.bindHelp(parent,ChartHelpContextIds.POPUP_LEGEND_BLOCK);
  cmpContent=new Composite(parent,SWT.NONE);
{
    GridLayout glMain=new GridLayout();
    glMain.horizontalSpacing=5;
    glMain.verticalSpacing=5;
    glMain.marginHeight=7;
    glMain.marginWidth=7;
    cmpContent.setLayout(glMain);
  }
  Group grpTxtArea=new Group(cmpContent,SWT.NONE);
{
    GridLayout layout=new GridLayout(2,false);
    layout.marginHeight=7;
    layout.marginWidth=7;
    grpTxtArea.setLayout(layout);
    grpTxtArea.setLayoutData(new GridData(GridData.FILL_BOTH));
    grpTxtArea.setText(Messages.getString("String_Node_Str"));
  }
  boolean isByCategory=getChart().getLegend().getItemType() != LegendItemType.SERIES_LITERAL;
  boolean containsYOG=ChartUtil.containsYOptionalGrouping(getChart());
  Label lblFormat=new Label(grpTxtArea,SWT.NONE);
{
    lblFormat.setText(Messages.getString("String_Node_Str"));
    lblFormat.setEnabled(isByCategory || containsYOG);
  }
  Composite cmpFormat=new Composite(grpTxtArea,SWT.BORDER);
{
    GridLayout layout=new GridLayout(2,false);
    layout.marginWidth=0;
    layout.marginHeight=0;
    layout.horizontalSpacing=0;
    cmpFormat.setLayout(layout);
    cmpFormat.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    cmpFormat.setBackground(cmpFormat.getDisplay().getSystemColor(SWT.COLOR_WHITE));
    cmpFormat.setEnabled(isByCategory || containsYOG);
  }
  fsp=new FormatSpecifierPreview(cmpFormat,SWT.NONE,false);
{
    GridData gd=new GridData();
    gd.grabExcessHorizontalSpace=true;
    gd.horizontalAlignment=SWT.CENTER;
    fsp.setLayoutData(gd);
    fsp.updatePreview(getChart().getLegend().getFormatSpecifier());
    fsp.setEnabled(isByCategory || containsYOG);
  }
  btnFormatSpecifier=new Button(cmpFormat,SWT.PUSH);
{
    GridData gd=new GridData();
    gd.widthHint=20;
    gd.heightHint=20;
    btnFormatSpecifier.setLayoutData(gd);
    btnFormatSpecifier.setToolTipText(Messages.getString("String_Node_Str"));
    btnFormatSpecifier.setImage(UIHelper.getImage("String_Node_Str"));
    btnFormatSpecifier.getImage().setBackground(btnFormatSpecifier.getBackground());
    btnFormatSpecifier.addListener(SWT.Selection,this);
    btnFormatSpecifier.setEnabled(isByCategory || containsYOG);
  }
  new Label(grpTxtArea,SWT.NONE).setText(Messages.getString("String_Node_Str"));
  fdcFont=new FontDefinitionComposite(grpTxtArea,SWT.NONE,getContext(),getLegend().getText().getFont(),getLegend().getText().getColor(),false);
  GridData gdFDCFont=new GridData(GridData.FILL_HORIZONTAL);
  gdFDCFont.grabExcessVerticalSpace=false;
  fdcFont.setLayoutData(gdFDCFont);
  fdcFont.addListener(this);
  new Label(grpTxtArea,SWT.NONE).setText(Messages.getString("String_Node_Str"));
  spnEllipsis=new Spinner(grpTxtArea,SWT.BORDER);
{
    GridData gd=new GridData(GridData.FILL_HORIZONTAL);
    spnEllipsis.setLayoutData(gd);
    spnEllipsis.setMinimum(0);
    spnEllipsis.setSelection(getLegend().getEllipsis());
    spnEllipsis.setToolTipText(Messages.getString("String_Node_Str"));
    spnEllipsis.addListener(SWT.Selection,this);
  }
  Label lblShadow=new Label(grpTxtArea,SWT.NONE);
  GridData gdLBLShadow=new GridData();
  lblShadow.setLayoutData(gdLBLShadow);
  lblShadow.setText(Messages.getString("String_Node_Str"));
  fccShadow=new FillChooserComposite(grpTxtArea,SWT.NONE,getContext(),getLegend().getClientArea().getShadowColor(),false,false);
  GridData gdFCCShadow=new GridData(GridData.FILL_HORIZONTAL);
  fccShadow.setLayoutData(gdFCCShadow);
  fccShadow.addListener(this);
  Label lblBackground=new Label(grpTxtArea,SWT.NONE);
  lblBackground.setText(Messages.getString("String_Node_Str"));
  fccBackground=new FillChooserComposite(grpTxtArea,SWT.DROP_DOWN | SWT.READ_ONLY,getContext(),getChart().getLegend().getClientArea().getBackground(),true,true);
{
    GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
    fccBackground.setLayoutData(gridData);
    fccBackground.addListener(this);
  }
  Group grpOutline=new Group(grpTxtArea,SWT.NONE);
  GridData gdGRPOutline=new GridData(GridData.FILL_HORIZONTAL);
  gdGRPOutline.horizontalSpan=2;
  grpOutline.setLayoutData(gdGRPOutline);
  grpOutline.setLayout(new FillLayout());
  grpOutline.setText(Messages.getString("String_Node_Str"));
  outlineText=new LineAttributesComposite(grpOutline,SWT.NONE,getContext(),getLegend().getClientArea().getOutline(),true,true,true);
  outlineText.addListener(this);
  outlineText.setAttributesEnabled(true);
  icText=new InsetsComposite(grpTxtArea,SWT.NONE,getLegend().getClientArea().getInsets(),getChart().getUnits(),getContext().getUIServiceProvider());
  GridData gdInsets=new GridData(GridData.FILL_HORIZONTAL);
  gdInsets.horizontalSpan=2;
  icText.setLayoutData(gdInsets);
  icText.addListener(this);
  Group grpSeparator=new Group(cmpContent,SWT.NONE);
{
    GridLayout layout=new GridLayout();
    layout.marginHeight=0;
    layout.marginWidth=5;
    grpSeparator.setLayout(layout);
    grpSeparator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    grpSeparator.setText(Messages.getString("String_Node_Str"));
  }
  lineSeparator=new LineAttributesComposite(grpSeparator,SWT.NONE,getContext(),getLegend().getSeparator(),true,true,true);
{
    lineSeparator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    lineSeparator.addListener(this);
    lineSeparator.setAttributesEnabled(true);
  }
  return cmpContent;
}

Fixed version (ground truth):
protected Composite getComponent(Composite parent){
  ChartUIUtil.bindHelp(parent,ChartHelpContextIds.POPUP_LEGEND_BLOCK);
  cmpContent=new Composite(parent,SWT.NONE);
{
    GridLayout glMain=new GridLayout();
    glMain.horizontalSpacing=5;
    glMain.verticalSpacing=5;
    glMain.marginHeight=7;
    glMain.marginWidth=7;
    cmpContent.setLayout(glMain);
  }
  Group grpTxtArea=new Group(cmpContent,SWT.NONE);
{
    GridLayout layout=new GridLayout(2,false);
    layout.marginHeight=7;
    layout.marginWidth=7;
    grpTxtArea.setLayout(layout);
    grpTxtArea.setLayoutData(new GridData(GridData.FILL_BOTH));
    grpTxtArea.setText(Messages.getString("String_Node_Str"));
  }
  Label lblFormat=new Label(grpTxtArea,SWT.NONE);
{
    lblFormat.setText(Messages.getString("String_Node_Str"));
    lblFormat.setEnabled(isByCategory || containsYOG);
  }
  Composite cmpFormat=new Composite(grpTxtArea,SWT.BORDER);
{
    GridLayout layout=new GridLayout(2,false);
    layout.marginWidth=0;
    layout.marginHeight=0;
    layout.horizontalSpacing=0;
    cmpFormat.setLayout(layout);
    cmpFormat.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    cmpFormat.setBackground(cmpFormat.getDisplay().getSystemColor(SWT.COLOR_WHITE));
    cmpFormat.setEnabled(isByCategory || containsYOG);
  }
  fsp=new FormatSpecifierPreview(cmpFormat,SWT.NONE,false);
{
    GridData gd=new GridData();
    gd.grabExcessHorizontalSpace=true;
    gd.horizontalAlignment=SWT.CENTER;
    fsp.setLayoutData(gd);
    fsp.updatePreview(getChart().getLegend().getFormatSpecifier());
    fsp.setEnabled(isByCategory || containsYOG);
  }
  btnFormatSpecifier=new Button(cmpFormat,SWT.PUSH);
{
    GridData gd=new GridData();
    gd.widthHint=20;
    gd.heightHint=20;
    btnFormatSpecifier.setLayoutData(gd);
    btnFormatSpecifier.setToolTipText(Messages.getString("String_Node_Str"));
    btnFormatSpecifier.setImage(UIHelper.getImage("String_Node_Str"));
    btnFormatSpecifier.getImage().setBackground(btnFormatSpecifier.getBackground());
    btnFormatSpecifier.addListener(SWT.Selection,this);
    btnFormatSpecifier.setEnabled(isByCategory || containsYOG);
  }
  new Label(grpTxtArea,SWT.NONE).setText(Messages.getString("String_Node_Str"));
  fdcFont=new FontDefinitionComposite(grpTxtArea,SWT.NONE,getContext(),getLegend().getText().getFont(),getLegend().getText().getColor(),false);
  GridData gdFDCFont=new GridData(GridData.FILL_HORIZONTAL);
  gdFDCFont.grabExcessVerticalSpace=false;
  fdcFont.setLayoutData(gdFDCFont);
  fdcFont.addListener(this);
  new Label(grpTxtArea,SWT.NONE).setText(Messages.getString("String_Node_Str"));
  spnEllipsis=new Spinner(grpTxtArea,SWT.BORDER);
{
    GridData gd=new GridData(GridData.FILL_HORIZONTAL);
    spnEllipsis.setLayoutData(gd);
    spnEllipsis.setMinimum(0);
    spnEllipsis.setSelection(getLegend().getEllipsis());
    spnEllipsis.setToolTipText(Messages.getString("String_Node_Str"));
    spnEllipsis.addListener(SWT.Selection,this);
  }
  Label lblShadow=new Label(grpTxtArea,SWT.NONE);
  GridData gdLBLShadow=new GridData();
  lblShadow.setLayoutData(gdLBLShadow);
  lblShadow.setText(Messages.getString("String_Node_Str"));
  fccShadow=new FillChooserComposite(grpTxtArea,SWT.NONE,getContext(),getLegend().getClientArea().getShadowColor(),false,false);
  GridData gdFCCShadow=new GridData(GridData.FILL_HORIZONTAL);
  fccShadow.setLayoutData(gdFCCShadow);
  fccShadow.addListener(this);
  Label lblBackground=new Label(grpTxtArea,SWT.NONE);
  lblBackground.setText(Messages.getString("String_Node_Str"));
  fccBackground=new FillChooserComposite(grpTxtArea,SWT.DROP_DOWN | SWT.READ_ONLY,getContext(),getChart().getLegend().getClientArea().getBackground(),true,true);
{
    GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
    fccBackground.setLayoutData(gridData);
    fccBackground.addListener(this);
  }
  Group grpOutline=new Group(grpTxtArea,SWT.NONE);
  GridData gdGRPOutline=new GridData(GridData.FILL_HORIZONTAL);
  gdGRPOutline.horizontalSpan=2;
  grpOutline.setLayoutData(gdGRPOutline);
  grpOutline.setLayout(new FillLayout());
  grpOutline.setText(Messages.getString("String_Node_Str"));
  outlineText=new LineAttributesComposite(grpOutline,SWT.NONE,getContext(),getLegend().getClientArea().getOutline(),true,true,true);
  outlineText.addListener(this);
  outlineText.setAttributesEnabled(true);
  icText=new InsetsComposite(grpTxtArea,SWT.NONE,getLegend().getClientArea().getInsets(),getChart().getUnits(),getContext().getUIServiceProvider());
  GridData gdInsets=new GridData(GridData.FILL_HORIZONTAL);
  gdInsets.horizontalSpan=2;
  icText.setLayoutData(gdInsets);
  icText.addListener(this);
  Group grpSeparator=new Group(cmpContent,SWT.NONE);
{
    GridLayout layout=new GridLayout();
    layout.marginHeight=0;
    layout.marginWidth=5;
    grpSeparator.setLayout(layout);
    grpSeparator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    grpSeparator.setText(Messages.getString("String_Node_Str"));
  }
  lineSeparator=new LineAttributesComposite(grpSeparator,SWT.NONE,getContext(),getLegend().getSeparator(),true,true,true);
{
    lineSeparator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    lineSeparator.addListener(this);
    lineSeparator.setAttributesEnabled(true);
  }
  return cmpContent;
}