CloneSet693


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
54210.995class_body_declarations[5]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
15491
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/LibraryStandin.java
254104
plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/LibraryLocation.java
Clone Instance
1
Line Count
54
Source Line
91
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/LibraryStandin.java

        /* (non-Javadoc)
         * @see java.lang.Object#equals(java.lang.Object)
         */
        public boolean equals(Object obj) {
                if (obj instanceof LibraryStandin) {
                        LibraryStandin lib = (LibraryStandin) obj;
                        return getSystemLibraryPath().equals(lib.getSystemLibraryPath()) &&
                                   equals(getSystemLibrarySourcePath(), lib.getSystemLibrarySourcePath()) &&
                                   equals(getPackageRootPath(), lib.getPackageRootPath()) &&
                                   equalsOrNull(getJavadocLocation(), lib.getJavadocLocation());
                }
                return false;
        }

        /* (non-Javadoc)
         * @see java.lang.Object#hashCode()
         */
        public int hashCode() {
                return getSystemLibraryPath().hashCode();
        }

        /**
         * Returns whether the given paths are equal - either may be <code>null</code>.
         * @param path1 path to be compared
         * @param path2 path to be compared
         * @return whether the given paths are equal
         */
        protected boolean equals(IPath path1, IPath path2) {
                return equalsOrNull(path1, path2);
        }

        /**
         * Returns whether the given objects are equal - either may be <code>null</code>.
         * @param o1 object to be compared
         * @param o2 object to be compared
         * @return whether the given objects are equal or both null
         * @since 3.1
         */
        private boolean equalsOrNull(Object o1, Object o2) {
                if (o1 == null) {
                        return o2 == null;
                }
                if (o2 == null) {
                        return false;
                }
                return o1.equals(o2);
        }

        /**
         * Returns the Javadoc location associated with this Library location.
         * 
         * @return a url pointing to the Javadoc location associated with
         *      this Library location, or <code>null</code> if none
         * @since 3.1
         */
        public URL getJavadocLocation() {
                return fJavadocLocation;
        }


Clone Instance
2
Line Count
54
Source Line
104
Source File
plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/LibraryLocation.java

        /* (non-Javadoc)
         * @see java.lang.Object#equals(java.lang.Object)
         */
        public boolean equals(Object obj) {
                if (obj instanceof LibraryLocation) {
                        LibraryLocation lib = (LibraryLocation) obj;
                        return getSystemLibraryPath().equals(lib.getSystemLibraryPath()) &&
                                   equals(getSystemLibrarySourcePath(), lib.getSystemLibrarySourcePath()) &&
                                   equals(getPackageRootPath(), lib.getPackageRootPath()) &&
                                   equalsOrNull(getJavadocLocation(), lib.getJavadocLocation());
                }
                return false;
        }

        /* (non-Javadoc)
         * @see java.lang.Object#hashCode()
         */
        public int hashCode() {
                return getSystemLibraryPath().hashCode();
        }

        /**
         * Returns whether the given paths are equal - either may be <code>null</code>.
         * @param path1 path to be compared
         * @param path2 path to be compared
         * @return whether the given paths are equal
         */
        protected boolean equals(IPath path1, IPath path2) {
                return equalsOrNull(path1, path2);
        }

        /**
         * Returns whether the given objects are equal - either may be <code>null</code>.
         * @param o1 object to be compared
         * @param o2 object to be compared
         * @return whether the given objects are equal or both null
         * @since 3.1
         */
        private boolean equalsOrNull(Object o1, Object o2) {
                if (o1 == null) {
                        return o2 == null;
                }
                if (o2 == null) {
                        return false;
                }
                return o1.equals(o2);
        }

        /**
         * Returns the Javadoc location associated with this Library location.
         * 
         * @return a url pointing to the Javadoc location associated with
         *      this Library location, or <code>null</code> if none
         * @since 3.1
         */
        public URL getJavadocLocation() {
                return fJavadocLocation;
        }


Clone AbstractionParameter Count: 1Parameter Bindings

/* (non-Javadoc)
         * @see java.lang.Object#equals(java.lang.Object)
         */
public boolean equals(Object obj) {
  if (obj instanceof [[#variable4d7cf880]]) {
     [[#variable4d7cf880]] lib = ( [[#variable4d7cf880]]) obj;
    return getSystemLibraryPath().equals(lib.getSystemLibraryPath()) && equals(getSystemLibrarySourcePath(), lib.getSystemLibrarySourcePath()) && equals(getPackageRootPath(), lib.getPackageRootPath()) && equalsOrNull(getJavadocLocation(), lib.getJavadocLocation());
  }
  return false;
}

/* (non-Javadoc)
         * @see java.lang.Object#hashCode()
         */
public int hashCode() {
  return getSystemLibraryPath().hashCode();
}

/**
         * Returns whether the given paths are equal - either may be <code>null</code>.
         * @param path1 path to be compared
         * @param path2 path to be compared
         * @return whether the given paths are equal
         */
protected boolean equals(IPath path1, IPath path2) {
  return equalsOrNull(path1, path2);
}

/**
         * Returns whether the given objects are equal - either may be <code>null</code>.
         * @param o1 object to be compared
         * @param o2 object to be compared
         * @return whether the given objects are equal or both null
         * @since 3.1
         */
private boolean equalsOrNull(Object o1, Object o2) {
  if (o1 == null) {
    return o2 == null;
  }
  if (o2 == null) {
    return false;
  }
  return o1.equals(o2);
}

/**
         * Returns the Javadoc location associated with this Library location.
         * 
         * @return a url pointing to the Javadoc location associated with
         *      this Library location, or <code>null</code> if none
         * @since 3.1
         */
public URL getJavadocLocation() {
  return fJavadocLocation;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4d7cf880]]
LibraryStandin 
12[[#4d7cf880]]
LibraryLocation