CloneSet156


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
45201.000class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
145209
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
246117
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/WorkInProgressPreferencePage.java
Clone Instance
1
Line Count
45
Source Line
209
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java

        /*
         * @see PreferencePage#performDefaults()
         */
        protected void performDefaults() {
                IPreferenceStore store = getPreferenceStore();
                for (int i = 0; i < fCheckBoxes.size(); i++) {
                        Button button = (Button) fCheckBoxes.get(i);
                        String key = (String) button.getData();
                        button.setSelection(store.getDefaultBoolean(key));
                }
                for (int i = 0; i < fRadioButtons.size(); i++) {
                        Button button = (Button) fRadioButtons.get(i);
                        String[] info = (String[]) button.getData();
                        button.setSelection(info[1].equals(store.getDefaultString(info[0])));
                }
                for (int i = 0; i < fTextControls.size(); i++) {
                        Text text = (Text) fTextControls.get(i);
                        String key = (String) text.getData();
                        text.setText(store.getDefaultString(key));
                }
                super.performDefaults();
        }

        /*
         * @see IPreferencePage#performOk()
         */
        public boolean performOk() {
                IPreferenceStore store = getPreferenceStore();
                for (int i = 0; i < fCheckBoxes.size(); i++) {
                        Button button = (Button) fCheckBoxes.get(i);
                        String key = (String) button.getData();
                        store.setValue(key, button.getSelection());
                }
                for (int i = 0; i < fRadioButtons.size(); i++) {
                        Button button = (Button) fRadioButtons.get(i);
                        if (button.getSelection()) {
                                String[] info = (String[]) button.getData();
                                store.setValue(info[0], info[1]);
                        }
                }
                for (int i = 0; i < fTextControls.size(); i++) {
                        Text text = (Text) fTextControls.get(i);
                        String key = (String) text.getData();
                        store.setValue(key, text.getText());
                }

                JavaPlugin.getDefault().savePluginPreferences();
                return super.performOk();
        }


Clone Instance
2
Line Count
46
Source Line
117
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/WorkInProgressPreferencePage.java

        /*
         * @see PreferencePage#performDefaults()
         */
        protected void performDefaults() {
                IPreferenceStore store = getPreferenceStore();
                for (int i = 0; i < fCheckBoxes.size(); i++) {
                        Button button = (Button) fCheckBoxes.get(i);
                        String key = (String) button.getData();
                        button.setSelection(store.getDefaultBoolean(key));
                }
                for (int i = 0; i < fRadioButtons.size(); i++) {
                        Button button = (Button) fRadioButtons.get(i);
                        String[] info = (String[]) button.getData();
                        button.setSelection(info[1].equals(store.getDefaultString(info[0])));
                }
                for (int i = 0; i < fTextControls.size(); i++) {
                        Text text = (Text) fTextControls.get(i);
                        String key = (String) text.getData();
                        text.setText(store.getDefaultString(key));
                }

                super.performDefaults();
        }

        /*
         * @see IPreferencePage#performOk()
         */
        public boolean performOk() {
                IPreferenceStore store = getPreferenceStore();
                for (int i = 0; i < fCheckBoxes.size(); i++) {
                        Button button = (Button) fCheckBoxes.get(i);
                        String key = (String) button.getData();
                        store.setValue(key, button.getSelection());
                }
                for (int i = 0; i < fRadioButtons.size(); i++) {
                        Button button = (Button) fRadioButtons.get(i);
                        if (button.getSelection()) {
                                String[] info = (String[]) button.getData();
                                store.setValue(info[0], info[1]);
                        }
                }
                for (int i = 0; i < fTextControls.size(); i++) {
                        Text text = (Text) fTextControls.get(i);
                        String key = (String) text.getData();
                        store.setValue(key, text.getText());
                }

                JavaPlugin.getDefault().savePluginPreferences();
                return super.performOk();
        }


Clone AbstractionParameter Count: 0Parameter Bindings

/*
         * @see PreferencePage#performDefaults()
         */
/*
         * @see PreferencePage#performDefaults()
         */
protected void performDefaults() {
  IPreferenceStore store = getPreferenceStore();
  for (int i = 0; i < fCheckBoxes.size(); i++) {
    Button button = (Button) fCheckBoxes.get(i);
    String key = (String) button.getData();
    button.setSelection(store.getDefaultBoolean(key));
  }
  for (int i = 0; i < fRadioButtons.size(); i++) {
    Button button = (Button) fRadioButtons.get(i);
    String[] info = (String[]) button.getData();
    button.setSelection(info[1].equals(store.getDefaultString(info[0])));
  }
  for (int i = 0; i < fTextControls.size(); i++) {
    Text text = (Text) fTextControls.get(i);
    String key = (String) text.getData();
    text.setText(store.getDefaultString(key));
  }
  super.performDefaults();
}

/*
         * @see IPreferencePage#performOk()
         */
/*
         * @see IPreferencePage#performOk()
         */
public boolean performOk() {
  IPreferenceStore store = getPreferenceStore();
  for (int i = 0; i < fCheckBoxes.size(); i++) {
    Button button = (Button) fCheckBoxes.get(i);
    String key = (String) button.getData();
    store.setValue(key, button.getSelection());
  }
  for (int i = 0; i < fRadioButtons.size(); i++) {
    Button button = (Button) fRadioButtons.get(i);
    if (button.getSelection()) {
      String[] info = (String[]) button.getData();
      store.setValue(info[0], info[1]);
    }
  }
  for (int i = 0; i < fTextControls.size(); i++) {
    Text text = (Text) fTextControls.get(i);
    String key = (String) text.getData();
    store.setValue(key, text.getText());
  }
  JavaPlugin.getDefault().savePluginPreferences();
  return super.performOk();
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None