CloneSet674


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
33260.986class_body_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
134199
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesViewFlatContentProvider.java
233516
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesViewHierarchicalContentProvider.java
Clone Instance
1
Line Count
34
Source Line
199
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesViewFlatContentProvider.java

        private void postAdd( final Object child) {
                postRunnable(new Runnable() {
                        public void run() {
                                Control ctrl = fViewer.getControl();
                                if (ctrl != null && !ctrl.isDisposed()) {
                                        ((TableViewer) fViewer).add(child);
                                }
                        }
                             } );
        }


        private void postRemove( final Object object) {
                postRunnable(new Runnable() {
                        public void run() {
                                Control ctrl = fViewer.getControl();
                                if (ctrl != null && !ctrl.isDisposed()) {
                                        ((TableViewer) fViewer).remove(object);
                                }
                        }
                             } );
        }

        private void postRunnable( final Runnable r) {
                Control ctrl = fViewer.getControl();
                if (ctrl != null && !ctrl.isDisposed()) {
                //      fBrowsingPart.setProcessSelectionEvents(false);
                        try {
                                Display currentDisplay = Display.getCurrent();
                                if (currentDisplay != null && currentDisplay.equals(ctrl.getDisplay()))
                                        ctrl.getDisplay().syncExec(r);
                                else
                                        ctrl.getDisplay().asyncExec(r);
                        } finally {
                //              fBrowsingPart.setProcessSelectionEvents(true);
                          }
                }
        }


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

        private void postRemove( final Object object) {
                postRunnable(new Runnable() {
                        public void run() {
                                Control ctrl = fViewer.getControl();
                                if (ctrl != null && !ctrl.isDisposed()) {
                                        ((TreeViewer) fViewer).remove(object);
                                }
                        }
                             } );
        }

        private void postRefresh( final Object object) {
                postRunnable(new Runnable() {
                        public void run() {
                                Control ctrl = fViewer.getControl();
                                if (ctrl != null && !ctrl.isDisposed()) {
                                        ((TreeViewer) fViewer).refresh(object);
                                }
                        }
                             } );
        }

        private void postRunnable( final Runnable r) {
                Control ctrl = fViewer.getControl();
                if (ctrl != null && !ctrl.isDisposed()) {
                //      fBrowsingPart.setProcessSelectionEvents(false);
                        try {
                                Display currentDisplay = Display.getCurrent();
                                if (currentDisplay != null && currentDisplay.equals(ctrl.getDisplay()))
                                        ctrl.getDisplay().syncExec(r);
                                else
                                        ctrl.getDisplay().asyncExec(r);
                        } finally {
                //              fBrowsingPart.setProcessSelectionEvents(true);
                          }
                }
        }


Clone AbstractionParameter Count: 6Parameter Bindings

private void [[#variableb3d10420]]( final Object  [[#variableb3d10380]]) {
  postRunnable(new Runnable() {
                 public void run() {
                   Control ctrl = fViewer.getControl();
                   if (ctrl != null && !ctrl.isDisposed()) {
                     (( [[#variableb3d102e0]]) fViewer). [[#variableb3d102a0]]( [[#variableb3d10380]]);
                   }
                 }
               } );
}

private void [[#variableb3d10240]]( final Object object) {
  postRunnable(new Runnable() {
                 public void run() {
                   Control ctrl = fViewer.getControl();
                   if (ctrl != null && !ctrl.isDisposed()) {
                     (( [[#variableb3d102e0]]) fViewer). [[#variableb3d10160]](object);
                   }
                 }
               } );
}

private void postRunnable( final Runnable r) {
  Control ctrl = fViewer.getControl();
  if (ctrl != null && !ctrl.isDisposed()) {
    //      fBrowsingPart.setProcessSelectionEvents(false);
    try {
      Display currentDisplay = Display.getCurrent();
      if (currentDisplay != null && currentDisplay.equals(ctrl.getDisplay()))
        ctrl.getDisplay().syncExec(r);
      else
        ctrl.getDisplay().asyncExec(r);
    }
    finally {
    //              fBrowsingPart.setProcessSelectionEvents(true);
    }
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b3d10420]]
postRemove 
12[[#b3d10420]]
postAdd 
21[[#b3d10380]]
object 
22[[#b3d10380]]
child 
31[[#b3d102e0]]
TreeViewer 
32[[#b3d102e0]]
TableViewer 
41[[#b3d102a0]]
remove 
42[[#b3d102a0]]
add 
51[[#b3d10240]]
postRefresh 
52[[#b3d10240]]
postRemove 
61[[#b3d10160]]
refresh 
62[[#b3d10160]]
remove