Program: 92842
Project: 92842
Buggy source:
/** 
 * Creates the Sequence Diagram preference page content
 * @param parent the parent composite
 */
@Override protected Control createContents(Composite parent){
  parent.setLayout(new GridLayout());
  Composite page=new Composite(parent,SWT.NONE);
  GridLayout pageLayout=new GridLayout();
  pageLayout.numColumns=2;
  GridData pageLayoutdata=new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_VERTICAL| GridData.VERTICAL_ALIGN_FILL);
  page.setLayoutData(pageLayoutdata);
  page.setLayout(pageLayout);
  tooltip=new BooleanFieldEditor(SDViewPref.PREF_TOOLTIP,SDMessages._97,page);
  tooltip.setPreferenceStore(pref.getPreferenceStore());
  tooltip.load();
  link=new BooleanFieldEditor(SDViewPref.PREF_LINK_FONT,SDMessages._82,page);
  link.setPreferenceStore(pref.getPreferenceStore());
  link.load();
  noExternalTime=new BooleanFieldEditor(SDViewPref.PREF_EXCLUDE_EXTERNAL_TIME,SDMessages._83,page);
  noExternalTime.setPreferenceStore(pref.getPreferenceStore());
  noExternalTime.load();
  useGrad=new BooleanFieldEditor(SDViewPref.PREF_USE_GRADIENT,SDMessages._84,page);
  useGrad.setPreferenceStore(pref.getPreferenceStore());
  useGrad.load();
  Label separator=new Label(page,SWT.SEPARATOR | SWT.HORIZONTAL | SWT.SHADOW_NONE);
  GridData sepData=new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
  separator.setLayoutData(sepData);
  Composite prefPage=new Composite(page,SWT.NONE);
  GridLayout prefPageLayout=new GridLayout();
  prefPage.setLayoutData(pageLayoutdata);
  prefPageLayout.numColumns=1;
  prefPage.setLayout(prefPageLayout);
  lifelineWidth=new IntegerFieldEditor(SDViewPref.PREF_LIFELINE_WIDTH,SDMessages._80,prefPage);
  lifelineWidth.setPreferenceStore(pref.getPreferenceStore());
  lifelineWidth.setValidRange(119,500);
  lifelineWidth.load();
  new Label(prefPage,SWT.SEPARATOR | SWT.HORIZONTAL | SWT.SHADOW_NONE);
  new Label(prefPage,SWT.SEPARATOR | SWT.HORIZONTAL | SWT.SHADOW_NONE);
  classItemList=new List(prefPage,SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER);
  GridData tabItemLayoutdata=new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_VERTICAL| GridData.VERTICAL_ALIGN_FILL);
  classItemList.setLayoutData(tabItemLayoutdata);
  for (int i=0; i < SDViewPref.fontList2.length; i++) {
    classItemList.add(SDViewPref.fontList2[i]);
  }
  classItemList.setSelection(0);
  classItemList.addSelectionListener(this);
  buttonArea=new Composite(prefPage,SWT.NONE);
  GridData tabItemLayoutdata2=new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_VERTICAL | GridData.VERTICAL_ALIGN_FILL);
  buttonArea.setLayoutData(tabItemLayoutdata2);
  GridLayout buttonAreaLayout=new GridLayout();
  buttonAreaLayout.numColumns=1;
  buttonArea.setLayout(buttonAreaLayout);
  font=new FontFieldEditor(SDViewPref.fontList[0],"String_Node_Str",SDMessages._81,buttonArea);
  font.getPreviewControl().setSize(500,500);
  font.setPreferenceStore(pref.getPreferenceStore());
  font.load();
  backGroundColor=new ColorFieldEditor(SDViewPref.fontList[0] + SDViewPref.BACK_COLOR_POSTFIX,SDMessages._85,buttonArea);
  backGroundColor.setPreferenceStore(pref.getPreferenceStore());
  backGroundColor.load();
  lineColor=new ColorFieldEditor(SDViewPref.fontList[0] + SDViewPref.FORE_COLOR_POSTFIX,SDMessages._86,buttonArea);
  lineColor.setPreferenceStore(pref.getPreferenceStore());
  lineColor.load();
  textColor=new ColorFieldEditor(SDViewPref.fontList[0] + SDViewPref.TEXT_COLOR_POSTFIX,SDMessages._87,buttonArea);
  textColor.setPreferenceStore(pref.getPreferenceStore());
  textColor.load();
  swapPref(true);
  Dialog.applyDialogFont(page);
  return page;
}

Fixed version (ground truth):
/** 
 * Creates the Sequence Diagram preference page content
 * @param parent the parent composite
 */
@Override protected Control createContents(Composite parent){
  parent.setLayout(new GridLayout());
  Composite page=new Composite(parent,SWT.NONE);
  GridLayout pageLayout=new GridLayout();
  pageLayout.numColumns=2;
  GridData pageLayoutdata=new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_VERTICAL| GridData.VERTICAL_ALIGN_FILL);
  page.setLayoutData(pageLayoutdata);
  page.setLayout(pageLayout);
  tooltip=new BooleanFieldEditor(SDViewPref.PREF_TOOLTIP,SDMessages._97,page);
  tooltip.setPreferenceStore(pref.getPreferenceStore());
  tooltip.load();
  link=new BooleanFieldEditor(SDViewPref.PREF_LINK_FONT,SDMessages._82,page);
  link.setPreferenceStore(pref.getPreferenceStore());
  link.load();
  noExternalTime=new BooleanFieldEditor(SDViewPref.PREF_EXCLUDE_EXTERNAL_TIME,SDMessages._83,page);
  noExternalTime.setPreferenceStore(pref.getPreferenceStore());
  noExternalTime.load();
  useGrad=new BooleanFieldEditor(SDViewPref.PREF_USE_GRADIENT,SDMessages._84,page);
  useGrad.setPreferenceStore(pref.getPreferenceStore());
  useGrad.load();
  Label separator=new Label(page,SWT.SEPARATOR | SWT.HORIZONTAL | SWT.SHADOW_NONE);
  GridData sepData=new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
  separator.setLayoutData(sepData);
  Composite prefPage=new Composite(page,SWT.NONE);
  GridLayout prefPageLayout=new GridLayout();
  prefPage.setLayoutData(pageLayoutdata);
  prefPageLayout.numColumns=1;
  prefPage.setLayout(prefPageLayout);
  lifelineWidth=new IntegerFieldEditor(SDViewPref.PREF_LIFELINE_WIDTH,SDMessages._80,prefPage);
  lifelineWidth.setPreferenceStore(pref.getPreferenceStore());
  lifelineWidth.setValidRange(119,500);
  lifelineWidth.load();
  new Label(prefPage,SWT.SEPARATOR | SWT.HORIZONTAL | SWT.SHADOW_NONE);
  new Label(prefPage,SWT.SEPARATOR | SWT.HORIZONTAL | SWT.SHADOW_NONE);
  classItemList=new List(prefPage,SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER);
  GridData tabItemLayoutdata=new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_VERTICAL| GridData.VERTICAL_ALIGN_FILL);
  classItemList.setLayoutData(tabItemLayoutdata);
  String[] fontList2=SDViewPref.getFontList2();
  for (int i=0; i < fontList2.length; i++) {
    classItemList.add(fontList2[i]);
  }
  classItemList.setSelection(0);
  classItemList.addSelectionListener(this);
  buttonArea=new Composite(prefPage,SWT.NONE);
  GridData tabItemLayoutdata2=new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_VERTICAL | GridData.VERTICAL_ALIGN_FILL);
  buttonArea.setLayoutData(tabItemLayoutdata2);
  GridLayout buttonAreaLayout=new GridLayout();
  buttonAreaLayout.numColumns=1;
  buttonArea.setLayout(buttonAreaLayout);
  String[] fontList=SDViewPref.getFontList();
  font=new FontFieldEditor(fontList[0],"String_Node_Str",SDMessages._81,buttonArea);
  font.getPreviewControl().setSize(500,500);
  font.setPreferenceStore(pref.getPreferenceStore());
  font.load();
  backGroundColor=new ColorFieldEditor(fontList[0] + SDViewPref.BACK_COLOR_POSTFIX,SDMessages._85,buttonArea);
  backGroundColor.setPreferenceStore(pref.getPreferenceStore());
  backGroundColor.load();
  lineColor=new ColorFieldEditor(fontList[0] + SDViewPref.FORE_COLOR_POSTFIX,SDMessages._86,buttonArea);
  lineColor.setPreferenceStore(pref.getPreferenceStore());
  lineColor.load();
  textColor=new ColorFieldEditor(fontList[0] + SDViewPref.TEXT_COLOR_POSTFIX,SDMessages._87,buttonArea);
  textColor.setPreferenceStore(pref.getPreferenceStore());
  textColor.load();
  swapPref(true);
  Dialog.applyDialogFont(page);
  return page;
}