long getValue(byte[] bytes) { return getValue(bytes, 0); } /** * Override to make two instances with same value equal. * @param o an object to compare * @return true if the objects are equal * @since 1.1 */ public boolean equals(Object o) { if (o == null || !(o instanceof ZipLong)) { return false; } return value == ((ZipLong) o).getValue();
int getValue(byte[] bytes) { return getValue(bytes, 0); } /** * Override to make two instances with same value equal. * @param o an object to compare * @return true if the objects are equal * @since 1.1 */ public boolean equals(Object o) { if (o == null || !(o instanceof ZipShort)) { return false; } return value == ((ZipShort) o).getValue();
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/zip/ZipLong.java File path: /apache-ant-1.7.0/src/org/apache/tools/zip/ZipShort.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
long getValue(byte[] bytes) {
1
int getValue(byte[] bytes) {
2
        return getValue(bytes, 0);
2
        return getValue(bytes, 0);
3
    }
3
    }
4
    /**
4
    /**
5
     * Override to make two instances with same value equal.
5
     * Override to make two instances with same value equal.
6
     * @param o an object to compare
6
     * @param o an object to compare
7
     * @return true if the objects are equal
7
     * @return true if the objects are equal
8
     * @since 1.1
8
     * @since 1.1
9
     */
9
     */
10
    public boolean equals(Object o) {
10
    public boolean equals(Object o) {
11
        if (o == null || !(o instanceof ZipLong)) {
11
        if (o == null || !(o instanceof ZipShort)) {
12
            return false;
12
            return false;
13
        }
13
        }
14
        return value == ((ZipLong) o).getValue();
14
        return value == ((ZipShort) o).getValue();
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