Program: 66203
Project: 66203
Buggy source:
public void createControl(Composite parent){
  ChartUIUtil.bindHelp(parent,ChartHelpContextIds.SUBTASK_LEGEND);
  init();
  cmpContent=new Composite(parent,SWT.NONE);
{
    GridLayout glContent=new GridLayout(2,false);
    cmpContent.setLayout(glContent);
    GridData gd=new GridData(GridData.FILL_BOTH);
    cmpContent.setLayoutData(gd);
  }
  Group cmpBasic=new Group(cmpContent,SWT.NONE);
{
    GridLayout layout=new GridLayout(3,false);
    layout.marginWidth=10;
    layout.marginHeight=10;
    cmpBasic.setLayout(layout);
    GridData gd=new GridData(GridData.FILL_HORIZONTAL);
    cmpBasic.setLayoutData(gd);
    cmpBasic.setText(Messages.getString("String_Node_Str"));
  }
  btnVisible=new TristateCheckbox(cmpBasic,SWT.NONE);
{
    GridData gdBTNVisible=new GridData();
    gdBTNVisible.horizontalSpan=3;
    btnVisible.setLayoutData(gdBTNVisible);
    btnVisible.setText(Messages.getString("String_Node_Str"));
  }
  lblTitle=new Label(cmpBasic,SWT.NONE);
  lblTitle.setText(Messages.getString("String_Node_Str"));
  Composite titleComp=new Composite(cmpBasic,SWT.NONE);
  GridLayout gl=new GridLayout();
  gl.numColumns=2;
  gl.marginLeft=0;
  gl.marginRight=0;
  gl.marginTop=0;
  gl.marginBottom=0;
  titleComp.setLayout(gl);
  btnTitleContentAuto=new Button(titleComp,SWT.CHECK);
  btnTitleContentAuto.setSelection(getChart().getLegend().getTitle().getCaption().getValue() == null);
  btnTitleContentAuto.addSelectionListener(this);
  List<String> keys=null;
  if (getContext().getUIServiceProvider() != null) {
    keys=getContext().getUIServiceProvider().getRegisteredKeys();
  }
  txtTitle=new ExternalizedTextEditorComposite(titleComp,SWT.BORDER,-1,-1,keys,getContext().getUIServiceProvider(),getLegendTitle());
{
    GridData gd=new GridData();
    gd.widthHint=180;
    txtTitle.setLayoutData(gd);
    txtTitle.addListener(this);
  }
  btnTitleVisible=new TristateCheckbox(cmpBasic,SWT.NONE);
  btnTitleVisible.setText(Messages.getString("String_Node_Str"));
  lblLegendBehavior=new Label(cmpBasic,SWT.NONE);
{
    lblLegendBehavior.setText(Messages.getString("String_Node_Str"));
  }
  cmbLegendBehavior=new Combo(cmpBasic,SWT.DROP_DOWN | SWT.READ_ONLY);
{
    GridData gridData=new GridData();
    gridData.widthHint=180;
    cmbLegendBehavior.setLayoutData(gridData);
    cmbLegendBehavior.addSelectionListener(this);
    cmbLegendBehavior.setEnabled(getChart().getInteractivity().isEnable());
  }
  new Label(cmpBasic,SWT.NONE);
  if (isShowValueEnabled()) {
    lblShowValue=new Label(cmpBasic,SWT.NONE);
    lblShowValue.setText(Messages.getString("String_Node_Str"));
    btnShowValue=new TristateCheckbox(cmpBasic,SWT.NONE);
{
      GridData gdBTNVisible=new GridData();
      gdBTNVisible.horizontalSpan=2;
      btnShowValue.setLayoutData(gdBTNVisible);
      btnShowValue.setText(Messages.getString("String_Node_Str"));
      btnShowValue.setToolTipText(Messages.getString("String_Node_Str"));
    }
  }
  populateLists();
  initDataNListeners();
  createButtonGroup(cmpContent);
  setState(getChart().getLegend().isSetVisible() && getChart().getLegend().isVisible());
}

Fixed version (ground truth):
public void createControl(Composite parent){
  ChartUIUtil.bindHelp(parent,ChartHelpContextIds.SUBTASK_LEGEND);
  init();
  cmpContent=new Composite(parent,SWT.NONE);
{
    GridLayout glContent=new GridLayout(2,false);
    cmpContent.setLayout(glContent);
    GridData gd=new GridData(GridData.FILL_BOTH);
    cmpContent.setLayoutData(gd);
  }
  Group cmpBasic=new Group(cmpContent,SWT.NONE);
{
    GridLayout layout=new GridLayout(4,false);
    layout.marginWidth=10;
    layout.marginHeight=10;
    cmpBasic.setLayout(layout);
    GridData gd=new GridData(GridData.FILL_HORIZONTAL);
    cmpBasic.setLayoutData(gd);
    cmpBasic.setText(Messages.getString("String_Node_Str"));
  }
  btnVisible=new TristateCheckbox(cmpBasic,SWT.NONE);
{
    GridData gdBTNVisible=new GridData();
    gdBTNVisible.horizontalSpan=4;
    btnVisible.setLayoutData(gdBTNVisible);
    btnVisible.setText(Messages.getString("String_Node_Str"));
  }
  lblTitle=new Label(cmpBasic,SWT.NONE);
  lblTitle.setText(Messages.getString("String_Node_Str"));
  List<String> keys=null;
  if (getContext().getUIServiceProvider() != null) {
    keys=getContext().getUIServiceProvider().getRegisteredKeys();
  }
  txtTitle=new ExternalizedTextEditorComposite(cmpBasic,SWT.BORDER,-1,-1,keys,getContext().getUIServiceProvider(),getLegendTitle());
{
    GridData gd=new GridData();
    gd.widthHint=180;
    txtTitle.setLayoutData(gd);
    txtTitle.addListener(this);
  }
  btnTitleVisible=new TristateCheckbox(cmpBasic,SWT.NONE);
  btnTitleVisible.setText(Messages.getString("String_Node_Str"));
  btnTitleContentAuto=new Button(cmpBasic,SWT.CHECK);
  btnTitleContentAuto.setText(ChartUIExtensionUtil.getAutoMessage());
  btnTitleContentAuto.setSelection(getChart().getLegend().getTitle().getCaption().getValue() == null);
  btnTitleContentAuto.addSelectionListener(this);
  lblLegendBehavior=new Label(cmpBasic,SWT.NONE);
{
    lblLegendBehavior.setText(Messages.getString("String_Node_Str"));
  }
  cmbLegendBehavior=new Combo(cmpBasic,SWT.DROP_DOWN | SWT.READ_ONLY);
{
    GridData gridData=new GridData();
    gridData.widthHint=180;
    cmbLegendBehavior.setLayoutData(gridData);
    cmbLegendBehavior.addSelectionListener(this);
    cmbLegendBehavior.setEnabled(getChart().getInteractivity().isEnable());
  }
  new Label(cmpBasic,SWT.NONE);
  if (isShowValueEnabled()) {
    lblShowValue=new Label(cmpBasic,SWT.NONE);
    lblShowValue.setText(Messages.getString("String_Node_Str"));
    btnShowValue=new TristateCheckbox(cmpBasic,SWT.NONE);
{
      GridData gdBTNVisible=new GridData();
      gdBTNVisible.horizontalSpan=2;
      btnShowValue.setLayoutData(gdBTNVisible);
      btnShowValue.setText(Messages.getString("String_Node_Str"));
      btnShowValue.setToolTipText(Messages.getString("String_Node_Str"));
    }
  }
  populateLists();
  initDataNListeners();
  createButtonGroup(cmpContent);
  setState(getChart().getLegend().isSetVisible() && getChart().getLegend().isVisible());
}