int hashCode() { if (isReference()) { return getCheckedRef().hashCode(); } return super.hashCode() * STRING_MAGIC; } /** * Get the string. * * @return the string contents of the resource. * @since Ant 1.7 */ public String toString() { if (isReference()) { return getCheckedRef().toString(); } return String.valueOf(getContent());
int hashCode() { if (isReference()) { return getCheckedRef().hashCode(); } return super.hashCode() * PROPERTY_MAGIC; } /** * Get the string. * * @return the string contents of the resource. * @since Ant 1.7 */ public String toString() { if (isReference()) { return getCheckedRef().toString(); } return String.valueOf(getValue());
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/StringResource.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/PropertyResource.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
int hashCode() {
1
int hashCode() {
2
        if (isReference()) {
2
        if (isReference()) {
3
            return getCheckedRef().hashCode();
3
            return getCheckedRef().hashCode();
4
        }
4
        }
5
        return super.hashCode() * STRING_MAGIC;
5
        return super.hashCode() * PROPERTY_MAGIC;
6
    }
6
    }
7
    /**
7
    /**
8
     * Get the string.
8
     * Get the string.
9
     *
9
     *
10
     * @return the string contents of the resource.
10
     * @return the string contents of the resource.
11
     * @since Ant 1.7
11
     * @since Ant 1.7
12
     */
12
     */
13
    public String toString() {
13
    public String toString() {
14
        if (isReference()) {
14
        if (isReference()) {
15
            return getCheckedRef().toString();
15
            return getCheckedRef().toString();
16
        }
16
        }
17
        return String.valueOf(getContent());
17
        return String.valueOf(getValue());
18
    
18
    
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