deploymentDescriptor = descr; if (!deploymentDescriptor.exists()) { throw new BuildException("Deployment descriptor: " + deploymentDescriptor + " does not exist."); } // Create a ZipFileSet for this file, and pass it up. ZipFileSet fs = new ZipFileSet(); fs.setFile(deploymentDescriptor);
deploymentDescriptor = descr; if (!deploymentDescriptor.exists()) { throw new BuildException("Deployment descriptor: " + deploymentDescriptor + " does not exist."); } // Create a ZipFileSet for this file, and pass it up. ZipFileSet fs = new ZipFileSet(); fs.setFile(deploymentDescriptor);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/War.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Ear.java
Method name: void setWebxml(File) Method name: void setAppxml(File)
Number of AST nodes: 5 Number of AST nodes: 5
1
deploymentDescriptor = descr;
1
deploymentDescriptor = descr;
2
        if (!deploymentDescriptor.exists()) {
2
        if (!deploymentDescriptor.exists()) {
3
            throw new BuildException("Deployment descriptor: "
3
            throw new BuildException("Deployment descriptor: "
4
                                     + deploymentDescriptor
4
                                     + deploymentDescriptor
5
                                     + " does not exist.");
5
                                     + " does not exist.");
6
        }
6
        }
7
        // Create a ZipFileSet for this file, and pass it up.
7
        // Create a ZipFileSet for this file, and pass it up.
8
        ZipFileSet fs = new ZipFileSet();
8
        ZipFileSet fs = new ZipFileSet();
9
        fs.setFile(deploymentDescriptor);
9
        fs.setFile(deploymentDescriptor);
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.3
Clones locationClones are in different classes having the same super class
Number of node comparisons9
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)92.9
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    deploymentDescriptor = descr;
    1
    deploymentDescriptor = descr;
    2
    if (!deploymentDescriptor.exists())
    2
    if (!deploymentDescriptor.exists())
    3
    throw new BuildException("Deployment descriptor: " + deploymentDescriptor + " does not exist.");
    3
    throw new BuildException("Deployment descriptor: " + deploymentDescriptor + " does not exist.");
    4
    ZipFileSet fs = new ZipFileSet();
    4
    ZipFileSet fs = new ZipFileSet();
    5
    fs.setFile(deploymentDescriptor);
    5
    fs.setFile(deploymentDescriptor);
    Precondition Violations (0)
    Row Violation