public class DoubleCPInfo extends ConstantCPInfo { /** * Constructor */ public DoubleCPInfo() { super(CONSTANT_DOUBLE, 2); } /** * read a constant pool entry from a class stream. * * @param cpStream the DataInputStream which contains the constant pool * entry to be read. * @exception IOException if there is a problem reading the entry from the * stream. */ public void read(DataInputStream cpStream) throws IOException { setValue(new Double(cpStream.readDouble())); } /** * Print a readable version of the constant pool entry. * * @return the string representation of this constant pool entry. */ public String toString() { return "Double Constant Pool Entry: " + getValue();
public class IntegerCPInfo extends ConstantCPInfo { /** Constructor. */ public IntegerCPInfo() { super(CONSTANT_INTEGER, 1); } /** * read a constant pool entry from a class stream. * * @param cpStream the DataInputStream which contains the constant pool * entry to be read. * @exception IOException if there is a problem reading the entry from * the stream. */ public void read(DataInputStream cpStream) throws IOException { setValue(new Integer(cpStream.readInt())); } /** * Print a readable version of the constant pool entry. * * @return the string representation of this constant pool entry. */ public String toString() { return "Integer Constant Pool Entry: " + getValue();
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/depend/constantpool/DoubleCPInfo.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/depend/constantpool/IntegerCPInfo.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class DoubleCPInfo extends ConstantCPInfo {
1
public class IntegerCPInfo extends ConstantCPInfo {
2
    /**
2
    /**
3
     * Constructor
3
 Constructor
4
     */
4
.  */
5
    public DoubleCPInfo() {
5
    public IntegerCPInfo() {
6
        super(CONSTANT_DOUBLE, 2);
6
        super(CONSTANT_INTEGER, 1);
7
    }
7
    }
8
    /**
8
    /**
9
     * read a constant pool entry from a class stream.
9
     * read a constant pool entry from a class stream.
10
     *
10
     *
11
     * @param cpStream the DataInputStream which contains the constant pool
11
     * @param cpStream the DataInputStream which contains the constant pool
12
     *      entry to be read.
12
     *      entry to be read.
13
     * @exception IOException if there is a problem reading the entry from the
13
     * @exception IOException if there is a problem reading the entry from
14
     *      stream.
14
     *      the stream.
15
     */
15
     */
16
    public void read(DataInputStream cpStream) throws IOException {
16
    public void read(DataInputStream cpStream) throws IOException {
17
        setValue(new Double(cpStream.readDouble()));
17
        setValue(new Integer(cpStream.readInt()));
18
    }
18
    }
19
    /**
19
    /**
20
     * Print a readable version of the constant pool entry.
20
     * Print a readable version of the constant pool entry.
21
     *
21
     *
22
     * @return the string representation of this constant pool entry.
22
     * @return the string representation of this constant pool entry.
23
     */
23
     */
24
    public String toString() {
24
    public String toString() {
25
        return "Double Constant Pool Entry: " + getValue();
25
        return "Integer Constant Pool Entry: " + getValue();
26
    
26
    
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