CloneSet421


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
28201.000class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12864
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OpenTypeSelectionDialog2.java
231209
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/PackageSelectionDialog.java
Clone Instance
1
Line Count
28
Source Line
64
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OpenTypeSelectionDialog2.java

        protected Point getInitialSize() {
                Point result = super.getInitialSize();
                if (fSize != null) {
                        result.x = Math.max(result.x, fSize.x);
                        result.y = Math.max(result.y, fSize.y);
                        Rectangle display = getShell().getDisplay().getClientArea();
                        result.x = Math.min(result.x, display.width);
                        result.y = Math.min(result.y, display.height);
                }
                return result;
        }

        protected Point getInitialLocation(Point initialSize) {
                Point result = super.getInitialLocation(initialSize);
                if (fLocation != null) {
                        result.x = fLocation.x;
                        result.y = fLocation.y;
                        Rectangle display = getShell().getDisplay().getClientArea();
                        int xe = result.x + initialSize.x;
                        if (xe > display.width) {
                                result.x -= xe - display.width;
                        }
                        int ye = result.y + initialSize.y;
                        if (ye > display.height) {
                                result.y -= ye - display.height;
                        }
                }
                return result;
        }


Clone Instance
2
Line Count
31
Source Line
209
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/PackageSelectionDialog.java

        /* (non-Javadoc)
         * @see org.eclipse.jface.window.Window#getInitialSize()
         */
        protected Point getInitialSize() {
                Point result = super.getInitialSize();
                if (fSize != null) {
                        result.x = Math.max(result.x, fSize.x);
                        result.y = Math.max(result.y, fSize.y);
                        Rectangle display = getShell().getDisplay().getClientArea();
                        result.x = Math.min(result.x, display.width);
                        result.y = Math.min(result.y, display.height);
                }
                return result;
        }

        /* (non-Javadoc)
         * @see org.eclipse.jface.window.Window#getInitialLocation(org.eclipse.swt.graphics.Point)
         */
        protected Point getInitialLocation(Point initialSize) {
                Point result = super.getInitialLocation(initialSize);
                if (fLocation != null) {
                        result.x = fLocation.x;
                        result.y = fLocation.y;
                        Rectangle display = getShell().getDisplay().getClientArea();
                        int xe = result.x + initialSize.x;
                        if (xe > display.width) {
                                result.x -= xe - display.width;
                        }
                        int ye = result.y + initialSize.y;
                        if (ye > display.height) {
                                result.y -= ye - display.height;
                        }
                }
                return result;
        }


Clone AbstractionParameter Count: 0Parameter Bindings

/* (non-Javadoc)
         * @see org.eclipse.jface.window.Window#getInitialSize()
         */
protected Point getInitialSize() {
  Point result = super.getInitialSize();
  if (fSize != null) {
    result.x = Math.max(result.x, fSize.x);
    result.y = Math.max(result.y, fSize.y);
    Rectangle display = getShell().getDisplay().getClientArea();
    result.x = Math.min(result.x, display.width);
    result.y = Math.min(result.y, display.height);
  }
  return result;
}

/* (non-Javadoc)
         * @see org.eclipse.jface.window.Window#getInitialLocation(org.eclipse.swt.graphics.Point)
         */
protected Point getInitialLocation(Point initialSize) {
  Point result = super.getInitialLocation(initialSize);
  if (fLocation != null) {
    result.x = fLocation.x;
    result.y = fLocation.y;
    Rectangle display = getShell().getDisplay().getClientArea();
    int xe = result.x + initialSize.x;
    if (xe > display.width) {
      result.x -= xe - display.width;
    }
    int ye = result.y + initialSize.y;
    if (ye > display.height) {
      result.y -= ye - display.height;
    }
  }
  return result;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None