if(doc.equals(editor.getDocument())) { editorMatchingDocument = editor; break; }
if (actionListeners[j].equals(listener)) { // We don't add a listener to a button twice // because the FindDialogSupport class will call // this method with the same button instances // whenever the replace dialog is opened. // // If we add the listener again and again replace // will be done as often as the dialog is opened. // This is especially nasty if the text to replace // is part of the replacement text. found = true; }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbeans/SyntaxFactory.java File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbeans/SquirrelNBDialogFactory.java
Method name: Syntax getSyntax(Document) Method name: Dialog createDialog(String, JPanel, boolean, JButton[], boolean, int, int, ActionListener)
Number of AST nodes: 3 Number of AST nodes: 2
1
if(doc.equals(editor.getDocument()))
1
if (actionListeners[j].equals(listener))
2
               {
3
                  // We don't add a listener to a button twice
4
                  // because the FindDialogSupport class will call
5
                  // this method with the same button instances
2
         {
6
         
3
            editorMatchingDocument = editor;
7
         
4
            break;
8
// whenever the replace dialog is opened.
9
                  //
10
                  // If we add the listener again and again replace
11
                  // will be done as often as the dialog is opened.
12
                  // This is especially nasty if the text to replace
13
                  // is part of the replacement text.
14
                  found = true;
5
         }
15
               }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons1