CloneSet517


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
35260.975class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
135156
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/DeclarationsSearchGroup.java
235166
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ReferencesSearchGroup.java
Clone Instance
1
Line Count
35
Source Line
156
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/DeclarationsSearchGroup.java

        /* (non-Javadoc)
         * Method declared on ActionGroup.
         */
        public void fillContextMenu(IMenuManager manager) {
                IMenuManager javaSearchMM = new MenuManager(MENU_TEXT, IContextMenuConstants.GROUP_SEARCH);
                addAction(fFindDeclarationsAction, javaSearchMM);
                addAction(fFindDeclarationsInProjectAction, javaSearchMM);
                addAction(fFindDeclarationsInHierarchyAction, javaSearchMM);

                javaSearchMM.add(new Separator());

                Iterator iter = SearchUtil.getLRUWorkingSets().sortedIterator();
                while (iter.hasNext()) {
                        addWorkingSetAction((IWorkingSet[]) iter.next(), javaSearchMM);
                }
                addAction(fFindDeclarationsInWorkingSetAction, javaSearchMM);

                if ( !javaSearchMM.isEmpty())
                        manager.appendToGroup(fGroupId, javaSearchMM);
        }

        /* 
         * Method declared on ActionGroup.
         */
        public void dispose() {
                ISelectionProvider provider = fSite.getSelectionProvider();
                if (provider != null) {
                        disposeAction(fFindDeclarationsAction, provider);
                        disposeAction(fFindDeclarationsInProjectAction, provider);
                        disposeAction(fFindDeclarationsInHierarchyAction, provider);
                        disposeAction(fFindDeclarationsInWorkingSetAction, provider);
                }
                fFindDeclarationsAction = null;
                fFindDeclarationsInProjectAction = null;
                fFindDeclarationsInHierarchyAction = null;
                fFindDeclarationsInWorkingSetAction = null;
                updateGlobalActionHandlers();
                super.dispose();
        }


Clone Instance
2
Line Count
35
Source Line
166
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ReferencesSearchGroup.java

        /* (non-Javadoc)
         * Method declared on ActionGroup.
         */
        public void fillContextMenu(IMenuManager manager) {
                MenuManager javaSearchMM = new MenuManager(getName(), IContextMenuConstants.GROUP_SEARCH);
                addAction(fFindReferencesAction, javaSearchMM);
                addAction(fFindReferencesInProjectAction, javaSearchMM);
                addAction(fFindReferencesInHierarchyAction, javaSearchMM);

                javaSearchMM.add(new Separator());

                Iterator iter = SearchUtil.getLRUWorkingSets().sortedIterator();
                while (iter.hasNext()) {
                        addWorkingSetAction((IWorkingSet[]) iter.next(), javaSearchMM);
                }
                addAction(fFindReferencesInWorkingSetAction, javaSearchMM);

                if ( !javaSearchMM.isEmpty())
                        manager.appendToGroup(fGroupId, javaSearchMM);
        }

        /* 
         * Overrides method declared in ActionGroup
         */
        public void dispose() {
                ISelectionProvider provider = fSite.getSelectionProvider();
                if (provider != null) {
                        disposeAction(fFindReferencesAction, provider);
                        disposeAction(fFindReferencesInProjectAction, provider);
                        disposeAction(fFindReferencesInHierarchyAction, provider);
                        disposeAction(fFindReferencesInWorkingSetAction, provider);
                }
                fFindReferencesAction = null;
                fFindReferencesInProjectAction = null;
                fFindReferencesInHierarchyAction = null;
                fFindReferencesInWorkingSetAction = null;
                updateGlobalActionHandlers();
                super.dispose();
        }


Clone AbstractionParameter Count: 6Parameter Bindings

/* (non-Javadoc)
         * Method declared on ActionGroup.
         */
public void fillContextMenu(IMenuManager manager) {
   [[#variablea1230860]] javaSearchMM = new MenuManager( [[#variablea1230800]], IContextMenuConstants.GROUP_SEARCH);
  addAction( [[#variablea1230780]], javaSearchMM);
  addAction( [[#variablea1230660]], javaSearchMM);
  addAction( [[#variablea1230620]], javaSearchMM);
  javaSearchMM.add(new Separator());
  Iterator iter = SearchUtil.getLRUWorkingSets().sortedIterator();
  while (iter.hasNext()) {
    addWorkingSetAction((IWorkingSet[]) iter.next(), javaSearchMM);
  }
  addAction( [[#variablea1230600]], javaSearchMM);
  if ( !javaSearchMM.isEmpty())
    manager.appendToGroup(fGroupId, javaSearchMM);
}

/* 
         * Method declared on ActionGroup.
         */
/* 
         * Overrides method declared in ActionGroup
         */
public void dispose() {
  ISelectionProvider provider = fSite.getSelectionProvider();
  if (provider != null) {
    disposeAction( [[#variablea1230780]], provider);
    disposeAction( [[#variablea1230660]], provider);
    disposeAction( [[#variablea1230620]], provider);
    disposeAction( [[#variablea1230600]], provider);
  }
   [[#variablea1230780]]= null;
   [[#variablea1230660]]= null;
   [[#variablea1230620]]= null;
   [[#variablea1230600]]= null;
  updateGlobalActionHandlers();
  super.dispose();
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#a1230860]]
IMenuManager 
12[[#a1230860]]
MenuManager 
21[[#a1230800]]
MENU_TEXT 
22[[#a1230800]]
getName() 
31[[#a1230780]]
fFindDeclarationsAction 
32[[#a1230780]]
fFindReferencesAction 
41[[#a1230660]]
fFindDeclarationsInProjectAction 
42[[#a1230660]]
fFindReferencesInProjectAction 
51[[#a1230620]]
fFindDeclarationsInHierarchyAction 
52[[#a1230620]]
fFindReferencesInHierarchyAction 
61[[#a1230600]]
fFindDeclarationsInWorkingSetAction 
62[[#a1230600]]
fFindReferencesInWorkingSetAction