CloneSet521


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
26220.991class_body_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12629
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesViewTableViewer.java
23334
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesViewTreeViewer.java
Clone Instance
1
Line Count
26
Source Line
29
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesViewTableViewer.java

        public PackagesViewTableViewer(Composite parent, int style) {
                super(parent, style);
        }

        public void mapElement(Object element, Widget item) {
                if (element instanceof LogicalPackage && item instanceof Item) {
                        LogicalPackage cp = (LogicalPackage) element;
                        IPackageFragment[] fragments = cp.getFragments();
                        for (int i = 0; i < fragments.length; i++) {
                                IPackageFragment fragment = fragments[i];
                                fResourceToItemsMapper.addToMap(fragment, (Item) item);
                        }
                }
                super.mapElement(element, item);
        }

        public void unmapElement(Object element, Widget item) {
                if (element instanceof LogicalPackage && item instanceof Item) {
                        LogicalPackage cp = (LogicalPackage) element;
                        IPackageFragment[] fragments = cp.getFragments();
                        for (int i = 0; i < fragments.length; i++) {
                                IPackageFragment fragment = fragments[i];
                                fResourceToItemsMapper.removeFromMap(fragment, (Item) item);
                        }
                }
                super.unmapElement(element, item);
        }


Clone Instance
2
Line Count
33
Source Line
34
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesViewTreeViewer.java

        public PackagesViewTreeViewer(Composite parent, int style) {
                super(parent, style);
        }

        /*
         * @see org.eclipse.jface.viewers.StructuredViewer#mapElement(java.lang.Object, org.eclipse.swt.widgets.Widget)
         */
        public void mapElement(Object element, Widget item) {
                if (element instanceof LogicalPackage && item instanceof Item) {
                        LogicalPackage cp = (LogicalPackage) element;
                        IPackageFragment[] fragments = cp.getFragments();
                        for (int i = 0; i < fragments.length; i++) {
                                IPackageFragment fragment = fragments[i];
                                fResourceToItemsMapper.addToMap(fragment, (Item) item);
                        }
                }
                super.mapElement(element, item);
        }

        /*
         * @see org.eclipse.jface.viewers.StructuredViewer#unmapElement(java.lang.Object, org.eclipse.swt.widgets.Widget)
         */
        public void unmapElement(Object element, Widget item) {

                if (element instanceof LogicalPackage && item instanceof Item) {
                        LogicalPackage cp = (LogicalPackage) element;
                        IPackageFragment[] fragments = cp.getFragments();
                        for (int i = 0; i < fragments.length; i++) {
                                IPackageFragment fragment = fragments[i];
                                fResourceToItemsMapper.removeFromMap((Object) fragment, (Item) item);
                        }
                }
                super.unmapElement(element, item);
        }


Clone AbstractionParameter Count: 2Parameter Bindings

public [[#variablebda23560]](Composite parent, int style) {
  super(parent, style);
}

/*
         * @see org.eclipse.jface.viewers.StructuredViewer#mapElement(java.lang.Object, org.eclipse.swt.widgets.Widget)
         */
public void mapElement(Object element, Widget item) {
  if (element instanceof LogicalPackage && item instanceof Item) {
    LogicalPackage cp = (LogicalPackage) element;
    IPackageFragment[] fragments = cp.getFragments();
    for (int i = 0; i < fragments.length; i++) {
      IPackageFragment fragment = fragments[i];
      fResourceToItemsMapper.addToMap(fragment, (Item) item);
    }
  }
  super.mapElement(element, item);
}

/*
         * @see org.eclipse.jface.viewers.StructuredViewer#unmapElement(java.lang.Object, org.eclipse.swt.widgets.Widget)
         */
public void unmapElement(Object element, Widget item) {
  if (element instanceof LogicalPackage && item instanceof Item) {
    LogicalPackage cp = (LogicalPackage) element;
    IPackageFragment[] fragments = cp.getFragments();
    for (int i = 0; i < fragments.length; i++) {
      IPackageFragment fragment = fragments[i];
      fResourceToItemsMapper.removeFromMap( [[#variablebda235e0]], (Item) item);
    }
  }
  super.unmapElement(element, item);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bda23560]]
PackagesViewTableViewer 
12[[#bda23560]]
PackagesViewTreeViewer 
21[[#bda235e0]]
fragment 
22[[#bda235e0]]
(Object) fragment