CloneSet144


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
78260.985statement_sequence[27]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
178644
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorColoringConfigurationBlock.java
280483
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PropertiesFileEditorPreferencePage.java
Clone Instance
1
Line Count
78
Source Line
644
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorColoringConfigurationBlock.java

                fItalicCheckBox.setLayoutData(gd);

                fStrikethroughCheckBox = new Button(stylesComposite, SWT.CHECK);
                fStrikethroughCheckBox.setText(PreferencesMessages.JavaEditorPreferencePage_strikethrough);
                gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
                gd.horizontalIndent = 20;
                gd.horizontalSpan = 2;
                fStrikethroughCheckBox.setLayoutData(gd);

                fUnderlineCheckBox = new Button(stylesComposite, SWT.CHECK);
                fUnderlineCheckBox.setText(PreferencesMessages.JavaEditorPreferencePage_underline);
                gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
                gd.horizontalIndent = 20;
                gd.horizontalSpan = 2;
                fUnderlineCheckBox.setLayoutData(gd);

                label = new Label(colorComposite, SWT.LEFT);
                label.setText(PreferencesMessages.JavaEditorPreferencePage_preview);
                label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

                Control previewer = createPreviewer(colorComposite);
                gd = new GridData(GridData.FILL_BOTH);
                gd.widthHint = convertWidthInCharsToPixels(20);
                gd.heightHint = convertHeightInCharsToPixels(5);
                previewer.setLayoutData(gd);

                fListViewer.addSelectionChangedListener(new ISelectionChangedListener() {
                        public void selectionChanged(SelectionChangedEvent event) {
                                handleSyntaxColorListSelection();
                        }
                                                        } );

                foregroundColorButton.addSelectionListener(new SelectionListener() {
                        public void widgetDefaultSelected(SelectionEvent e) {
                                // do nothing
                        }

                        public void widgetSelected(SelectionEvent e) {
                                HighlightingColorListItem item = getHighlightingColorListItem();
                                PreferenceConverter.setValue(getPreferenceStore(), item.getColorKey(), fSyntaxForegroundColorEditor.getColorValue());
                        }
                                                           } );
                fBoldCheckBox.addSelectionListener(new SelectionListener() {
                        public void widgetDefaultSelected(SelectionEvent e) {
                                // do nothing
                        }

                        public void widgetSelected(SelectionEvent e) {
                                HighlightingColorListItem item = getHighlightingColorListItem();
                                getPreferenceStore().setValue(item.getBoldKey(), fBoldCheckBox.getSelection());
                        }
                                                   } );
                fItalicCheckBox.addSelectionListener(new SelectionListener() {
                        public void widgetDefaultSelected(SelectionEvent e) {
                                // do nothing
                        }

                        public void widgetSelected(SelectionEvent e) {
                                HighlightingColorListItem item = getHighlightingColorListItem();
                                getPreferenceStore().setValue(item.getItalicKey(), fItalicCheckBox.getSelection());
                        }
                                                     } );
                fStrikethroughCheckBox.addSelectionListener(new SelectionListener() {
                        public void widgetDefaultSelected(SelectionEvent e) {
                                // do nothing
                        }

                        public void widgetSelected(SelectionEvent e) {
                                HighlightingColorListItem item = getHighlightingColorListItem();
                                getPreferenceStore().setValue(item.getStrikethroughKey(), fStrikethroughCheckBox.getSelection());
                        }
                                                            } );
                fUnderlineCheckBox.addSelectionListener(new SelectionListener() {
                        public void widgetDefaultSelected(SelectionEvent e) {
                                // do nothing
                        }

                        public void widgetSelected(SelectionEvent e) {
                                HighlightingColorListItem item = getHighlightingColorListItem();
                                getPreferenceStore().setValue(item.getUnderlineKey(), fUnderlineCheckBox.getSelection());
                        }
                                                        } );


Clone Instance
2
Line Count
80
Source Line
483
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PropertiesFileEditorPreferencePage.java

                fItalicCheckBox.setLayoutData(gd);

                fStrikethroughCheckBox = new Button(stylesComposite, SWT.CHECK);
                fStrikethroughCheckBox.setText(PreferencesMessages.PropertiesFileEditorPreferencePage_strikethrough);
                gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
                gd.horizontalIndent = 20;
                gd.horizontalSpan = 2;
                fStrikethroughCheckBox.setLayoutData(gd);

                fUnderlineCheckBox = new Button(stylesComposite, SWT.CHECK);
                fUnderlineCheckBox.setText(PreferencesMessages.PropertiesFileEditorPreferencePage_underline);
                gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
                gd.horizontalIndent = 20;
                gd.horizontalSpan = 2;
                fUnderlineCheckBox.setLayoutData(gd);

                label = new Label(parent, SWT.LEFT);
                label.setText(PreferencesMessages.PropertiesFileEditorPreferencePage_preview);
                label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

                Control previewer = createPreviewer(parent);
                gd = new GridData(GridData.FILL_BOTH);
                gd.widthHint = convertWidthInCharsToPixels(20);
                gd.heightHint = convertHeightInCharsToPixels(5);
                previewer.setLayoutData(gd);


                fHighlightingColorListViewer.addSelectionChangedListener(new ISelectionChangedListener() {
                        public void selectionChanged(SelectionChangedEvent event) {
                                handleSyntaxColorListSelection();
                        }
                                                                         } );

                foregroundColorButton.addSelectionListener(new SelectionListener() {
                        public void widgetDefaultSelected(SelectionEvent e) {
                                // do nothing
                        }

                        public void widgetSelected(SelectionEvent e) {
                                HighlightingColorListItem item = getHighlightingColorListItem();
                                PreferenceConverter.setValue(fOverlayStore, item.getColorKey(), fSyntaxForegroundColorEditor.getColorValue());
                        }
                                                           } );
                fBoldCheckBox.addSelectionListener(new SelectionListener() {
                        public void widgetDefaultSelected(SelectionEvent e) {
                                // do nothing
                        }

                        public void widgetSelected(SelectionEvent e) {
                                HighlightingColorListItem item = getHighlightingColorListItem();
                                fOverlayStore.setValue(item.getBoldKey(), fBoldCheckBox.getSelection());
                        }
                                                   } );
                fItalicCheckBox.addSelectionListener(new SelectionListener() {
                        public void widgetDefaultSelected(SelectionEvent e) {
                                // do nothing
                        }

                        public void widgetSelected(SelectionEvent e) {
                                HighlightingColorListItem item = getHighlightingColorListItem();
                                fOverlayStore.setValue(item.getItalicKey(), fItalicCheckBox.getSelection());
                        }
                                                     } );
                fStrikethroughCheckBox.addSelectionListener(new SelectionListener() {
                        public void widgetDefaultSelected(SelectionEvent e) {
                                // do nothing
                        }

                        public void widgetSelected(SelectionEvent e) {
                                HighlightingColorListItem item = getHighlightingColorListItem();
                                fOverlayStore.setValue(item.getStrikethroughKey(), fStrikethroughCheckBox.getSelection());
                        }
                                                            } );
                fUnderlineCheckBox.addSelectionListener(new SelectionListener() {
                        public void widgetDefaultSelected(SelectionEvent e) {
                                // do nothing
                        }

                        public void widgetSelected(SelectionEvent e) {
                                HighlightingColorListItem item = getHighlightingColorListItem();
                                fOverlayStore.setValue(item.getUnderlineKey(), fUnderlineCheckBox.getSelection());
                        }
                                                        } );


Clone AbstractionParameter Count: 6Parameter Bindings

fItalicCheckBox.setLayoutData(gd);
fStrikethroughCheckBox = new Button(stylesComposite, SWT.CHECK);
fStrikethroughCheckBox.setText(PreferencesMessages. [[#variableb598ebe0]]);
gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalIndent = 20;
gd.horizontalSpan = 2;
fStrikethroughCheckBox.setLayoutData(gd);
fUnderlineCheckBox = new Button(stylesComposite, SWT.CHECK);
fUnderlineCheckBox.setText(PreferencesMessages. [[#variableb598ea60]]);
gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalIndent = 20;
gd.horizontalSpan = 2;
fUnderlineCheckBox.setLayoutData(gd);
label = new Label( [[#variable576e65a0]], SWT.LEFT);
label.setText(PreferencesMessages. [[#variableb598ea40]]);
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Control previewer = createPreviewer( [[#variable576e65a0]]);
gd = new GridData(GridData.FILL_BOTH);
gd.widthHint = convertWidthInCharsToPixels(20);
gd.heightHint = convertHeightInCharsToPixels(5);
previewer.setLayoutData(gd);
 [[#variableb9630ea0]].addSelectionChangedListener(new ISelectionChangedListener() {
                                                     public void selectionChanged(SelectionChangedEvent event) {
                                                       handleSyntaxColorListSelection();
                                                     }
                                                   } );
foregroundColorButton.addSelectionListener(new SelectionListener() {
                                             public void widgetDefaultSelected(SelectionEvent e) {
                                             // do nothing
                                             }

                                             public void widgetSelected(SelectionEvent e) {
                                               HighlightingColorListItem item = getHighlightingColorListItem();
                                               PreferenceConverter.setValue( [[#variablea43a2340]], item.getColorKey(), fSyntaxForegroundColorEditor.getColorValue());
                                             }
                                           } );
fBoldCheckBox.addSelectionListener(new SelectionListener() {
                                     public void widgetDefaultSelected(SelectionEvent e) {
                                     // do nothing
                                     }

                                     public void widgetSelected(SelectionEvent e) {
                                       HighlightingColorListItem item = getHighlightingColorListItem();
                                        [[#variablea43a2340]].setValue(item.getBoldKey(), fBoldCheckBox.getSelection());
                                     }
                                   } );
fItalicCheckBox.addSelectionListener(new SelectionListener() {
                                       public void widgetDefaultSelected(SelectionEvent e) {
                                       // do nothing
                                       }

                                       public void widgetSelected(SelectionEvent e) {
                                         HighlightingColorListItem item = getHighlightingColorListItem();
                                          [[#variablea43a2340]].setValue(item.getItalicKey(), fItalicCheckBox.getSelection());
                                       }
                                     } );
fStrikethroughCheckBox.addSelectionListener(new SelectionListener() {
                                              public void widgetDefaultSelected(SelectionEvent e) {
                                              // do nothing
                                              }

                                              public void widgetSelected(SelectionEvent e) {
                                                HighlightingColorListItem item = getHighlightingColorListItem();
                                                 [[#variablea43a2340]].setValue(item.getStrikethroughKey(), fStrikethroughCheckBox.getSelection());
                                              }
                                            } );
fUnderlineCheckBox.addSelectionListener(new SelectionListener() {
                                          public void widgetDefaultSelected(SelectionEvent e) {
                                          // do nothing
                                          }

                                          public void widgetSelected(SelectionEvent e) {
                                            HighlightingColorListItem item = getHighlightingColorListItem();
                                             [[#variablea43a2340]].setValue(item.getUnderlineKey(), fUnderlineCheckBox.getSelection());
                                          }
                                        } );
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b598ebe0]]
JavaEditorPreferencePage_strikethrough 
12[[#b598ebe0]]
PropertiesFileEditorPreferencePage_strikethrough 
21[[#b598ea60]]
JavaEditorPreferencePage_underline 
22[[#b598ea60]]
PropertiesFileEditorPreferencePage_underline 
31[[#576e65a0]]
colorComposite 
32[[#576e65a0]]
parent 
41[[#b598ea40]]
JavaEditorPreferencePage_preview 
42[[#b598ea40]]
PropertiesFileEditorPreferencePage_preview 
51[[#b9630ea0]]
fListViewer 
52[[#b9630ea0]]
fHighlightingColorListViewer 
61[[#a43a2340]]
getPreferenceStore() 
62[[#a43a2340]]
fOverlayStore