Program: 17464
Project: 17464
Buggy source:
private Control createAppearancePage(Composite parent){
  Composite appearanceComposite=new Composite(parent,0);
  GridLayout layout=new GridLayout();
  layout.numColumns=2;
  appearanceComposite.setLayout(layout);
  String label="String_Node_Str";
  addTextField(appearanceComposite,label,EditorPreferenceConstants.P_PRINT_MARGIN_SIZE,3,0,true);
  label="String_Node_Str";
  addTextField(appearanceComposite,label,EditorPreferenceConstants.P_TAB_WIDTH,3,0,true);
  label="String_Node_Str";
  addTextField(appearanceComposite,label,EditorPreferenceConstants.P_INSIGHT_DELAY,4,0,true);
  label="String_Node_Str";
  addTextField(appearanceComposite,label,EditorPreferenceConstants.P_MAX_UNDO_STEPS,4,0,true);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_INSERT_SPACES_FOR_TABS,0);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_RTRIM_ON_SAVE,0);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_BRACKET_MATCHING_ENABLED,0);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_SHOW_OVERVIEW_RULER,0);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_SHOW_LINE_NUMBERS,0);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_HIGHLIGHT_CURRENT_LINE,0);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_SHOW_PRINT_MARGIN,0);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_WARN_READ_ONLY_FILES,0);
  label="String_Node_Str";
  Button master=addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_SHOW_PRINT_MARGIN,0);
  label="String_Node_Str";
  Button slave=addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_USE_WIDE_CARET,0);
  createDependency(master,EditorPreferenceConstants.P_ENABLE_CUSTOM_CARETS,slave);
  Label l=new Label(appearanceComposite,16384);
  GridData gd=new GridData(256);
  gd.horizontalSpan=2;
  gd.heightHint=convertHeightInCharsToPixels(1) / 2;
  l.setLayoutData(gd);
  l=new Label(appearanceComposite,16384);
  l.setText("String_Node_Str");
  gd=new GridData(256);
  gd.horizontalSpan=2;
  l.setLayoutData(gd);
  Composite editorComposite=new Composite(appearanceComposite,0);
  layout=new GridLayout();
  layout.numColumns=2;
  layout.marginHeight=0;
  layout.marginWidth=0;
  editorComposite.setLayout(layout);
  gd=new GridData(1296);
  gd.horizontalSpan=2;
  editorComposite.setLayoutData(gd);
  fAppearanceColorList=new List(editorComposite,2564);
  gd=new GridData(770);
  gd.heightHint=convertHeightInCharsToPixels(6);
  fAppearanceColorList.setLayoutData(gd);
  Composite stylesComposite=new Composite(editorComposite,0);
  layout=new GridLayout();
  layout.marginHeight=0;
  layout.marginWidth=0;
  layout.numColumns=2;
  stylesComposite.setLayout(layout);
  stylesComposite.setLayoutData(new GridData(1808));
  l=new Label(stylesComposite,16384);
  l.setText("String_Node_Str");
  gd=new GridData();
  gd.horizontalAlignment=1;
  l.setLayoutData(gd);
  fAppearanceColorEditor=new ColorEditor(stylesComposite);
  Button foregroundColorButton=fAppearanceColorEditor.getButton();
  gd=new GridData(768);
  gd.horizontalAlignment=1;
  foregroundColorButton.setLayoutData(gd);
  SelectionListener colorDefaultSelectionListener=new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      boolean systemDefault=fAppearanceColorDefault.getSelection();
      fAppearanceColorEditor.getButton().setEnabled(!systemDefault);
      int i=fAppearanceColorList.getSelectionIndex();
      String key=fAppearanceColorListModel[i][2];
      if (key != null)       fOverlayStore.setValue(key,systemDefault);
    }
    public void widgetDefaultSelected(    SelectionEvent selectionevent){
    }
  }
;
  fAppearanceColorDefault=new Button(stylesComposite,32);
  fAppearanceColorDefault.setText("String_Node_Str");
  gd=new GridData(768);
  gd.horizontalAlignment=1;
  gd.horizontalSpan=2;
  fAppearanceColorDefault.setLayoutData(gd);
  fAppearanceColorDefault.setVisible(false);
  fAppearanceColorDefault.addSelectionListener(colorDefaultSelectionListener);
  fAppearanceColorList.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent selectionevent){
    }
    public void widgetSelected(    SelectionEvent e){
      handleAppearanceColorListSelection();
    }
  }
);
  foregroundColorButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent selectionevent){
    }
    public void widgetSelected(    SelectionEvent e){
      int i=fAppearanceColorList.getSelectionIndex();
      String key=fAppearanceColorListModel[i][1];
      PreferenceConverter.setValue(fOverlayStore,key,fAppearanceColorEditor.getColorValue());
    }
  }
);
  return appearanceComposite;
}

Fixed version (ground truth):
private Control createAppearancePage(Composite parent){
  Composite appearanceComposite=new Composite(parent,0);
  GridLayout layout=new GridLayout();
  layout.numColumns=2;
  appearanceComposite.setLayout(layout);
  String label="String_Node_Str";
  addTextField(appearanceComposite,label,EditorPreferenceConstants.P_PRINT_MARGIN_SIZE,3,0,true);
  label="String_Node_Str";
  addTextField(appearanceComposite,label,EditorPreferenceConstants.P_TAB_WIDTH,3,0,true);
  label="String_Node_Str";
  addTextField(appearanceComposite,label,EditorPreferenceConstants.P_INSIGHT_DELAY,4,0,true);
  label="String_Node_Str";
  addTextField(appearanceComposite,label,EditorPreferenceConstants.P_MAX_UNDO_STEPS,4,0,true);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_INSERT_SPACES_FOR_TABS,0);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_RTRIM_ON_SAVE,0);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_SHOW_OVERVIEW_RULER,0);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_SHOW_LINE_NUMBERS,0);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_HIGHLIGHT_CURRENT_LINE,0);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_SHOW_PRINT_MARGIN,0);
  label="String_Node_Str";
  addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_WARN_READ_ONLY_FILES,0);
  label="String_Node_Str";
  Button master=addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_SHOW_PRINT_MARGIN,0);
  label="String_Node_Str";
  Button slave=addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_USE_WIDE_CARET,0);
  createDependency(master,EditorPreferenceConstants.P_ENABLE_CUSTOM_CARETS,slave);
  label="String_Node_Str";
  Button bracketMatchingBox=addCheckBox(appearanceComposite,label,EditorPreferenceConstants.P_BRACKET_MATCHING_ENABLED,0);
  String items[]=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  CCombo bracketStyleCombo=addComboList(appearanceComposite,"String_Node_Str",EditorPreferenceConstants.P_BRACKET_MATCHING_STYLE,items);
  createDependency(bracketMatchingBox,EditorPreferenceConstants.P_BRACKET_MATCHING_ENABLED,bracketStyleCombo);
  Label l=new Label(appearanceComposite,16384);
  GridData gd=new GridData(256);
  gd.horizontalSpan=2;
  gd.heightHint=convertHeightInCharsToPixels(1) / 2;
  l.setLayoutData(gd);
  l=new Label(appearanceComposite,16384);
  l.setText("String_Node_Str");
  gd=new GridData(256);
  gd.horizontalSpan=2;
  l.setLayoutData(gd);
  Composite editorComposite=new Composite(appearanceComposite,0);
  layout=new GridLayout();
  layout.numColumns=2;
  layout.marginHeight=0;
  layout.marginWidth=0;
  editorComposite.setLayout(layout);
  gd=new GridData(1296);
  gd.horizontalSpan=2;
  editorComposite.setLayoutData(gd);
  fAppearanceColorList=new List(editorComposite,2564);
  gd=new GridData(770);
  gd.heightHint=convertHeightInCharsToPixels(6);
  fAppearanceColorList.setLayoutData(gd);
  Composite stylesComposite=new Composite(editorComposite,0);
  layout=new GridLayout();
  layout.marginHeight=0;
  layout.marginWidth=0;
  layout.numColumns=2;
  stylesComposite.setLayout(layout);
  stylesComposite.setLayoutData(new GridData(1808));
  l=new Label(stylesComposite,16384);
  l.setText("String_Node_Str");
  gd=new GridData();
  gd.horizontalAlignment=1;
  l.setLayoutData(gd);
  fAppearanceColorEditor=new ColorEditor(stylesComposite);
  Button foregroundColorButton=fAppearanceColorEditor.getButton();
  gd=new GridData(768);
  gd.horizontalAlignment=1;
  foregroundColorButton.setLayoutData(gd);
  SelectionListener colorDefaultSelectionListener=new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      boolean systemDefault=fAppearanceColorDefault.getSelection();
      fAppearanceColorEditor.getButton().setEnabled(!systemDefault);
      int i=fAppearanceColorList.getSelectionIndex();
      String key=fAppearanceColorListModel[i][2];
      if (key != null)       fOverlayStore.setValue(key,systemDefault);
    }
    public void widgetDefaultSelected(    SelectionEvent selectionevent){
    }
  }
;
  fAppearanceColorDefault=new Button(stylesComposite,32);
  fAppearanceColorDefault.setText("String_Node_Str");
  gd=new GridData(768);
  gd.horizontalAlignment=1;
  gd.horizontalSpan=2;
  fAppearanceColorDefault.setLayoutData(gd);
  fAppearanceColorDefault.setVisible(false);
  fAppearanceColorDefault.addSelectionListener(colorDefaultSelectionListener);
  fAppearanceColorList.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent selectionevent){
    }
    public void widgetSelected(    SelectionEvent e){
      handleAppearanceColorListSelection();
    }
  }
);
  foregroundColorButton.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent selectionevent){
    }
    public void widgetSelected(    SelectionEvent e){
      int i=fAppearanceColorList.getSelectionIndex();
      String key=fAppearanceColorListModel[i][1];
      PreferenceConverter.setValue(fOverlayStore,key,fAppearanceColorEditor.getColorValue());
    }
  }
);
  return appearanceComposite;
}