CloneSet1078


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
25240.973class_body_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12536
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyTransferDropAdapter.java
22536
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyTransferDropAdapter.java
Clone Instance
1
Line Count
25
Source Line
36
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyTransferDropAdapter.java

        public void validateDrop(Object target, DropTargetEvent event, int operation) {
                event.detail = DND.DROP_NONE;
                initializeSelection();
                if (target != null) {
                        super.validateDrop(target, event, operation);
                        return;
                }
                if (getInputElement(getSelection()) != null)
                        event.detail = OPERATION;
        }

        /* (non-Javadoc)
         * @see org.eclipse.jdt.internal.ui.packageview.SelectionTransferDropAdapter#isEnabled(org.eclipse.swt.dnd.DropTargetEvent)
         */
        public boolean isEnabled(DropTargetEvent event) {
                return true;
        }

        public void drop(Object target, DropTargetEvent event) {
                if (target != null || event.detail != OPERATION) {
                        super.drop(target, event);
                        return;
                }
                IMethod input = getInputElement(getSelection());
                fCallHierarchyViewPart.setMethod(input);
        }


Clone Instance
2
Line Count
25
Source Line
36
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyTransferDropAdapter.java

        public void validateDrop(Object target, DropTargetEvent event, int operation) {
                event.detail = DND.DROP_NONE;
                initializeSelection();
                if (target != null) {
                        super.validateDrop(target, event, operation);
                        return;
                }
                if (getInputElement(getSelection()) != null)
                        event.detail = TypeHierarchyTransferDropAdapter.OPERATION;
        }

        /* (non-Javadoc)
         * @see org.eclipse.jdt.internal.ui.packageview.SelectionTransferDropAdapter#isEnabled(org.eclipse.swt.dnd.DropTargetEvent)
         */
        public boolean isEnabled(DropTargetEvent event) {
                return true;
        }

        public void drop(Object target, DropTargetEvent event) {
                if (target != null || event.detail != TypeHierarchyTransferDropAdapter.OPERATION) {
                        super.drop(target, event);
                        return;
                }
                IJavaElement input = getInputElement(getSelection());
                fTypeHierarchyViewPart.setInputElement(input);
        }


Clone AbstractionParameter Count: 4Parameter Bindings

public void validateDrop(Object target, DropTargetEvent event, int operation) {
  event.detail = DND.DROP_NONE;
  initializeSelection();
  if (target != null) {
    super.validateDrop(target, event, operation);
    return;
  }
  if (getInputElement(getSelection()) != null)
    event.detail = [[#variable591c8ea0]];
}

/* (non-Javadoc)
         * @see org.eclipse.jdt.internal.ui.packageview.SelectionTransferDropAdapter#isEnabled(org.eclipse.swt.dnd.DropTargetEvent)
         */
public boolean isEnabled(DropTargetEvent event) {
  return true;
}

public void drop(Object target, DropTargetEvent event) {
  if (target != null || event.detail != [[#variable591c8ea0]]) {
    super.drop(target, event);
    return;
  }
   [[#variable591c8e20]] input = getInputElement(getSelection());
   [[#variable591c8dc0]]. [[#variable591c8ca0]](input);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#591c8ea0]]
OPERATION 
12[[#591c8ea0]]
TypeHierarchyTransferDropAdapter.OPERATION 
21[[#591c8e20]]
IMethod 
22[[#591c8e20]]
IJavaElement 
31[[#591c8dc0]]
fCallHierarchyViewPart 
32[[#591c8dc0]]
fTypeHierarchyViewPart 
41[[#591c8ca0]]
setMethod 
42[[#591c8ca0]]
setInputElement