setDirectory(e.isDirectory()); setSize(e.getSize()); setMode(e.getMode());
setDirectory(e.isDirectory()); setSize(e.getSize()); setMode(e.getUnixMode());
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/TarResource.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/ZipResource.java
Method name: void setEntry(TarEntry) Method name: void setEntry(ZipEntry)
Number of AST nodes: 3 Number of AST nodes: 3
1
setDirectory(e.isDirectory());
1
setDirectory(e.isDirectory());
2
        setSize(e.getSize());
2
        setSize(e.getSize());
3
        setMode(e.getMode());
3
        setMode(e.getUnixMode());
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    setDirectory(e.isDirectory());
    7
    setDirectory(e.isDirectory());
    7
    setDirectory(e.isDirectory());
    Differences
    Expression1Expression2Difference
    org.apache.tools.tar.TarEntryorg.apache.tools.zip.ZipEntryVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.tools.tar.TarEntry of variable e does not match with type org.apache.tools.zip.ZipEntry of variable e
    • Make classes org.apache.tools.tar.TarEntry and org.apache.tools.zip.ZipEntry extend a common superclass
    7
    setDirectory(e.isDirectory());
    8
    setSize(e.getSize());
    8
    setSize(e.getSize());
    8
    setSize(e.getSize());
    Differences
    Expression1Expression2Difference
    org.apache.tools.tar.TarEntryorg.apache.tools.zip.ZipEntryVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.tools.tar.TarEntry of variable e does not match with type org.apache.tools.zip.ZipEntry of variable e
    • Make classes org.apache.tools.tar.TarEntry and org.apache.tools.zip.ZipEntry extend a common superclass
    8
    setSize(e.getSize());
    9
    setMode(e.getMode());
    9
    setMode(e.getMode());
    9
    setMode(e.getUnixMode());
    Differences
    Expression1Expression2Difference
    getModegetUnixModeMETHOD_INVOCATION_NAME_MISMATCH
    org.apache.tools.tar.TarEntryorg.apache.tools.zip.ZipEntryVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.tools.tar.TarEntry of variable e does not match with type org.apache.tools.zip.ZipEntry of variable e
    • Make classes org.apache.tools.tar.TarEntry and org.apache.tools.zip.ZipEntry extend a common superclass
    9
    setMode(e.getUnixMode());
    Precondition Violations (3)
    Row Violation
    1Type org.apache.tools.tar.TarEntry of variable e does not match with type org.apache.tools.zip.ZipEntry of variable e
    2Type org.apache.tools.tar.TarEntry of variable e does not match with type org.apache.tools.zip.ZipEntry of variable e
    3Type org.apache.tools.tar.TarEntry of variable e does not match with type org.apache.tools.zip.ZipEntry of variable e