CloneSet386


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
89210.995class_body_declarations[11]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
18733
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyImageDescriptor.java
28973
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementImageDescriptor.java
Clone Instance
1
Line Count
87
Source Line
33
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyImageDescriptor.java

    private ImageDescriptor fBaseImage;

    private int fFlags;

    private Point fSize;

    /**
     * Creates a new CallHierarchyImageDescriptor.
     * 
     * @param baseImage an image descriptor used as the base image
     * @param flags flags indicating which adornments are to be rendered. See <code>setAdornments</code>
     *  for valid values.
     * @param size the size of the resulting image
     * @see #setAdornments(int)
     */
    public CallHierarchyImageDescriptor(ImageDescriptor baseImage, int flags, Point size) {
        fBaseImage = baseImage;
        Assert.isNotNull(fBaseImage);
        fFlags = flags;
        Assert.isTrue(fFlags >= 0);
        fSize = size;
        Assert.isNotNull(fSize);
    }

    /**
     * Sets the descriptors adornments. Valid values are: <code>RECURSIVE</code>, <code>CALLER</code>,
     * <code>CALLEE</code>, <code>MAX_LEVEL</code>, or any combination of those.
     * 
     * @param adornments the image descritpors adornments
     */
    public void setAdornments(int adornments) {
        Assert.isTrue(adornments >= 0);
        fFlags = adornments;
    }

    /**
     * Returns the current adornments.
     * 
     * @return the current adornments
     */
    public int getAdronments() {
        return fFlags;
    }

    /**
     * Sets the size of the image created by calling <code>createImage()</code>.
     * 
     * @param size the size of the image returned from calling <code>createImage()</code>
     * @see ImageDescriptor#createImage()
     */
    public void setImageSize(Point size) {
        Assert.isNotNull(size);
        Assert.isTrue(size.x >= 0 && size.y >= 0);
        fSize = size;
    }

    /**
     * Returns the size of the image created by calling <code>createImage()</code>.
     * 
     * @return the size of the image created by calling <code>createImage()</code>
     * @see ImageDescriptor#createImage()
     */
    public Point getImageSize() {
        return new Point(fSize.x, fSize.y);
    }

    /* (non-Javadoc)
     * Method declared in CompositeImageDescriptor
     */
    protected Point getSize() {
        return fSize;
    }

    /* (non-Javadoc)
     * Method declared on Object.
     */
    public boolean equals(Object object) {
        if (object == null || !CallHierarchyImageDescriptor.class .equals(object.getClass()))
            return false;

        CallHierarchyImageDescriptor other = (CallHierarchyImageDescriptor) object;
        return (fBaseImage.equals(other.fBaseImage) && fFlags == other.fFlags && fSize.equals(other.fSize));
    }

    /* (non-Javadoc)
     * Method declared on Object.
     */
    public int hashCode() {
        return fBaseImage.hashCode()|  fFlags|  fSize.hashCode();
    }


Clone Instance
2
Line Count
89
Source Line
73
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementImageDescriptor.java

        private ImageDescriptor fBaseImage;

        private int fFlags;

        private Point fSize;

        /**
         * Creates a new JavaElementImageDescriptor.
         * 
         * @param baseImage an image descriptor used as the base image
         * @param flags flags indicating which adornments are to be rendered. See <code>setAdornments</code>
         *      for valid values.
         * @param size the size of the resulting image
         * @see #setAdornments(int)
         */
        public JavaElementImageDescriptor(ImageDescriptor baseImage, int flags, Point size) {
                fBaseImage = baseImage;
                Assert.isNotNull(fBaseImage);
                fFlags = flags;
                Assert.isTrue(fFlags >= 0);
                fSize = size;
                Assert.isNotNull(fSize);
        }

        /**
         * Sets the descriptors adornments. Valid values are: <code>ABSTRACT</code>, <code>FINAL</code>,
         * <code>SYNCHRONIZED</code>, </code>STATIC<code>, </code>RUNNABLE<code>, </code>WARNING<code>, 
         * </code>ERROR<code>, </code>OVERRIDDES<code>, <code>IMPLEMENTS</code>, <code>CONSTRUCTOR</code>,
         * <code>DEPRECATED</code>,  or any combination of those.
         * 
         * @param adornments the image descriptors adornments
         */
        public void setAdornments(int adornments) {
                Assert.isTrue(adornments >= 0);
                fFlags = adornments;
        }

        /**
         * Returns the current adornments.
         * 
         * @return the current adornments
         */
        public int getAdronments() {
                return fFlags;
        }

        /**
         * Sets the size of the image created by calling <code>createImage()</code>.
         * 
         * @param size the size of the image returned from calling <code>createImage()</code>
         * @see ImageDescriptor#createImage()
         */
        public void setImageSize(Point size) {
                Assert.isNotNull(size);
                Assert.isTrue(size.x >= 0 && size.y >= 0);
                fSize = size;
        }

        /**
         * Returns the size of the image created by calling <code>createImage()</code>.
         * 
         * @return the size of the image created by calling <code>createImage()</code>
         * @see ImageDescriptor#createImage()
         */
        public Point getImageSize() {
                return new Point(fSize.x, fSize.y);
        }

        /* (non-Javadoc)
         * Method declared in CompositeImageDescriptor
         */
        protected Point getSize() {
                return fSize;
        }

        /* (non-Javadoc)
         * Method declared on Object.
         */
        public boolean equals(Object object) {
                if (object == null || !JavaElementImageDescriptor.class .equals(object.getClass()))
                        return false;

                JavaElementImageDescriptor other = (JavaElementImageDescriptor) object;
                return (fBaseImage.equals(other.fBaseImage) && fFlags == other.fFlags && fSize.equals(other.fSize));
        }

        /* (non-Javadoc)
         * Method declared on Object.
         */
        public int hashCode() {
                return fBaseImage.hashCode()|  fFlags|  fSize.hashCode();
        }


Clone AbstractionParameter Count: 1Parameter Bindings

private ImageDescriptor fBaseImage;

private int fFlags;

private Point fSize;

/**
         * Creates a new JavaElementImageDescriptor.
         * 
         * @param baseImage an image descriptor used as the base image
         * @param flags flags indicating which adornments are to be rendered. See <code>setAdornments</code>
         *      for valid values.
         * @param size the size of the resulting image
         * @see #setAdornments(int)
         */
/**
     * Creates a new CallHierarchyImageDescriptor.
     * 
     * @param baseImage an image descriptor used as the base image
     * @param flags flags indicating which adornments are to be rendered. See <code>setAdornments</code>
     *  for valid values.
     * @param size the size of the resulting image
     * @see #setAdornments(int)
     */
public [[#variablebd9ff3c0]](ImageDescriptor baseImage, int flags, Point size) {
  fBaseImage = baseImage;
  Assert.isNotNull(fBaseImage);
  fFlags = flags;
  Assert.isTrue(fFlags >= 0);
  fSize = size;
  Assert.isNotNull(fSize);
}

/**
         * Sets the descriptors adornments. Valid values are: <code>ABSTRACT</code>, <code>FINAL</code>,
         * <code>SYNCHRONIZED</code>, </code>STATIC<code>, </code>RUNNABLE<code>, </code>WARNING<code>, 
         * </code>ERROR<code>, </code>OVERRIDDES<code>, <code>IMPLEMENTS</code>, <code>CONSTRUCTOR</code>,
         * <code>DEPRECATED</code>,  or any combination of those.
         * 
         * @param adornments the image descriptors adornments
         */
/**
     * Sets the descriptors adornments. Valid values are: <code>RECURSIVE</code>, <code>CALLER</code>,
     * <code>CALLEE</code>, <code>MAX_LEVEL</code>, or any combination of those.
     * 
     * @param adornments the image descritpors adornments
     */
public void setAdornments(int adornments) {
  Assert.isTrue(adornments >= 0);
  fFlags = adornments;
}

/**
         * Returns the current adornments.
         * 
         * @return the current adornments
         */
/**
     * Returns the current adornments.
     * 
     * @return the current adornments
     */
public int getAdronments() {
  return fFlags;
}

/**
         * Sets the size of the image created by calling <code>createImage()</code>.
         * 
         * @param size the size of the image returned from calling <code>createImage()</code>
         * @see ImageDescriptor#createImage()
         */
/**
     * Sets the size of the image created by calling <code>createImage()</code>.
     * 
     * @param size the size of the image returned from calling <code>createImage()</code>
     * @see ImageDescriptor#createImage()
     */
public void setImageSize(Point size) {
  Assert.isNotNull(size);
  Assert.isTrue(size.x >= 0 && size.y >= 0);
  fSize = size;
}

/**
         * Returns the size of the image created by calling <code>createImage()</code>.
         * 
         * @return the size of the image created by calling <code>createImage()</code>
         * @see ImageDescriptor#createImage()
         */
/**
     * Returns the size of the image created by calling <code>createImage()</code>.
     * 
     * @return the size of the image created by calling <code>createImage()</code>
     * @see ImageDescriptor#createImage()
     */
public Point getImageSize() {
  return new Point(fSize.x, fSize.y);
}

/* (non-Javadoc)
         * Method declared in CompositeImageDescriptor
         */
/* (non-Javadoc)
     * Method declared in CompositeImageDescriptor
     */
protected Point getSize() {
  return fSize;
}

/* (non-Javadoc)
         * Method declared on Object.
         */
/* (non-Javadoc)
     * Method declared on Object.
     */
public boolean equals(Object object) {
  if (object == null || ! [[#variablebd9ff3c0]].class .equals(object.getClass()))
    return false;
   [[#variablebd9ff3c0]] other = ( [[#variablebd9ff3c0]]) object;
  return (fBaseImage.equals(other.fBaseImage) && fFlags == other.fFlags && fSize.equals(other.fSize));
}

/* (non-Javadoc)
         * Method declared on Object.
         */
/* (non-Javadoc)
     * Method declared on Object.
     */
public int hashCode() {
  return fBaseImage.hashCode()|fFlags|fSize.hashCode();
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bd9ff3c0]]
JavaElementImageDescriptor 
12[[#bd9ff3c0]]
CallHierarchyImageDescriptor