| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 54 | 2 | 1 | 0.995 | class_body_declarations[5] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 54 | 91 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/LibraryStandin.java |
| 2 | 54 | 104 | 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 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;
}
|
| ||||
/* (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;
}
|
| |||
/* (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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#4d7cf880]] | LibraryStandin |
| 1 | 2 | [[#4d7cf880]] | LibraryLocation |