CloneSet1135


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
32210.970class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
134290
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ExceptionFilterEditor.java
232544
plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencePage.java
Clone Instance
1
Line Count
34
Source Line
290
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ExceptionFilterEditor.java

        private void setEditorListeners(Text text) {
                // CR means commit the changes, ESC means abort and don't commit
                text.addKeyListener(new KeyAdapter() {
                        public void keyReleased(KeyEvent event) {
                                if (event.character == SWT.CR) {
                                        if (fInvalidEditorText != null) {
                                                fEditorText.setText(fInvalidEditorText);
                                                fInvalidEditorText = null;
                                        }
                                        else   {
                                                validateChangeAndCleanup();
                                        }
                                }
                                else   if (event.character == SWT.ESC) {
                                        removeNewFilter();
                                        cleanupEditor();
                                       }
                        }
                                    } );
                // Consider loss of focus on the editor to mean the same as CR
                text.addFocusListener(new FocusAdapter() {
                        public void focusLost(FocusEvent event) {
                                if (fInvalidEditorText != null) {
                                        fEditorText.setText(fInvalidEditorText);
                                        fInvalidEditorText = null;
                                }
                                else   {
                                        validateChangeAndCleanup();
                                }
                        }
                                      } );
                // Consume traversal events from the text widget so that CR doesn't 
                // traverse away to dialog's default button.  Without this, hitting
                // CR in the text field closes the entire dialog.
                text.addListener(SWT.Traverse, new Listener() {
                        public void handleEvent(Event event) {
                                event.doit = false;
                        }
                                               } );
        }


Clone Instance
2
Line Count
32
Source Line
544
Source File
plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencePage.java

        private void setEditorListeners(Text text) {
                // CR means commit the changes, ESC means abort and don't commit
                text.addKeyListener(new KeyAdapter() {
                        public void keyReleased(KeyEvent event) {
                                if (event.character == SWT.CR) {
                                        if (fInvalidEditorText != null) {
                                                fEditorText.setText(fInvalidEditorText);
                                                fInvalidEditorText = null;
                                        }
                                        else    validateChangeAndCleanup();
                                }
                                else   if (event.character == SWT.ESC) {
                                        removeNewFilter();
                                        cleanupEditor();
                                       }
                        }
                                    } );
                // Consider loss of focus on the editor to mean the same as CR
                text.addFocusListener(new FocusAdapter() {
                        public void focusLost(FocusEvent event) {
                                if (fInvalidEditorText != null) {
                                        fEditorText.setText(fInvalidEditorText);
                                        fInvalidEditorText = null;
                                }
                                else    validateChangeAndCleanup();
                        }
                                      } );
                // Consume traversal events from the text widget so that CR doesn't 
                // traverse away to dialog's default button.  Without this, hitting
                // CR in the text field closes the entire dialog.
                text.addListener(SWT.Traverse, new Listener() {
                        public void handleEvent(Event event) {
                                event.doit = false;
                        }
                                               } );
        }


Clone AbstractionParameter Count: 1Parameter Bindings

private void setEditorListeners(Text text) {
  // CR means commit the changes, ESC means abort and don't commit
  text.addKeyListener(new KeyAdapter() {
                        public void keyReleased(KeyEvent event) {
                          if (event.character == SWT.CR) {
                            if (fInvalidEditorText != null) {
                              fEditorText.setText(fInvalidEditorText);
                              fInvalidEditorText = null;
                            }
                            else
                               [[#variableba50c180]]
                          }
                          else
                            if (event.character == SWT.ESC) {
                              removeNewFilter();
                              cleanupEditor();
                            }
                        }
                      } );
  // Consider loss of focus on the editor to mean the same as CR
  text.addFocusListener(new FocusAdapter() {
                          public void focusLost(FocusEvent event) {
                            if (fInvalidEditorText != null) {
                              fEditorText.setText(fInvalidEditorText);
                              fInvalidEditorText = null;
                            }
                            else
                               [[#variableba50c180]]
                          }
                        } );
  // Consume traversal events from the text widget so that CR doesn't 
  // traverse away to dialog's default button.  Without this, hitting
  // CR in the text field closes the entire dialog.
  text.addListener(SWT.Traverse, new Listener() {
                                   public void handleEvent(Event event) {
                                     event.doit = false;
                                   }
                                 } );
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#ba50c180]]
validateChangeAndCleanup(); 
12[[#ba50c180]]
{
  validateChangeAndCleanup();
}