public boolean equals(Object another) { if (this == another) { return true; } if (isReference()) { return getCheckedRef().equals(another); } if (!(another.getClass().equals(getClass()))) { return false; } FileResource otherfr = (FileResource) another; return getFile() == null ? otherfr.getFile() == null : getFile().equals(otherfr.getFile());
public synchronized boolean equals(Object another) { if (this == another) { return true; } if (isReference()) { return getCheckedRef().equals(another); } if (!(another.getClass().equals(getClass()))) { return false; } URLResource otheru = (URLResource) another; return getURL() == null ? otheru.getURL() == null : getURL().equals(otheru.getURL());
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/FileResource.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/URLResource.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public boolean equals(Object another) {
1
public synchronized boolean equals(Object another) {
2
        if (this == another) {
2
        if (this == another) {
3
            return true;
3
            return true;
4
        }
4
        }
5
        if (isReference()) {
5
        if (isReference()) {
6
            return getCheckedRef().equals(another);
6
            return getCheckedRef().equals(another);
7
        }
7
        }
8
        if (!(another.getClass().equals(getClass()))) {
8
        if (!(another.getClass().equals(getClass()))) {
9
            return false;
9
            return false;
10
        }
10
        }
11
        FileResource otherfr = (FileResource) another;
11
        URLResource otheru = (URLResource) another;
12
        return getFile() == null
12
        return getURL() == null
13
            ? otherfr.getFile() == null
13
            ? otheru.getURL() == null
14
            : getFile().equals(otherfr.getFile());
14
            : getURL().equals(otheru.getURL());
15
    
15
    
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0