if (!src.isExists()) { throw new BuildException("the archive doesn't exist"); } if (src.isDirectory()) { throw new BuildException("the archive can't be a directory"); }
if (!src.isExists()) { throw new BuildException("the archive doesn't exist"); } if (src.isDirectory()) { throw new BuildException("the archive can't be a directory"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Unpack.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/ArchiveFileSet.java
Method name: void setSrcResource(Resource) Method name: DirectoryScanner getDirectoryScanner(Project)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (!src.isExists()) {
1
if (!src.isExists()) {
2
            throw new BuildException("the archive doesn't exist");
2
            throw new BuildException("the archive doesn't exist");
3
        }
3
        }
4
        if (src.isDirectory()) {
4
        if (src.isDirectory()) {
5
            throw new BuildException("the archive can't be a directory");
5
            throw new BuildException("the archive can't be a directory");
6
        }
6
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes having the same super class
Number of node comparisons13
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    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.7
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    if (!src.isExists())
    5
    if (!src.isExists())
    2
    throw new BuildException("the archive doesn't exist");
    6
    throw new BuildException("the archive doesn't exist");
    3
    if (src.isDirectory())
    7
    if (src.isDirectory())
    4
    throw new BuildException("the archive can't be a directory");
    8
    throw new BuildException("the archive can't be a directory");
    Precondition Violations (0)
    Row Violation