FileResource fr = new FileResource(); fr.setProject(getProject()); fr.setFile(stylesheet); configureLiaison(fr);
if (format.equals(FRAMES)) { Delete delete = new Delete(); delete.bindToOwner(task); delete.setFile(outputFile); delete.execute(); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/XSLTProcess.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java
Method name: void configureLiaison(File) Method name: void transform()
Number of AST nodes: 4 Number of AST nodes: 5
1
FileResource fr = new FileResource();
2
        fr.setProject(getProject()
1
if (format.equals(FRAMES)) {
2
            Delete delete = new Delete();
3
);
3
            delete.bindToOwner(task);
4
        fr.setFile(stylesheet);
4
        
5
        configureLiaison(fr);
5
    delete.setFile(outputFile);
6
            delete.execute();
7
        }
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
Number of node comparisons13
  1. {Non-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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    FileResource fr = new FileResource();
    1
    FileResource fr = new FileResource();
    35
    Delete delete = new Delete();
    Differences
    Expression1Expression2Difference
    org.apache.tools.ant.types.resources.FileResourceorg.apache.tools.ant.taskdefs.DeleteSUBCLASS_TYPE_MISMATCH
    frdeleteVARIABLE_NAME_MISMATCH
    org.apache.tools.ant.types.resources.FileResourceorg.apache.tools.ant.taskdefs.DeleteSUBCLASS_TYPE_MISMATCH
    org.apache.tools.ant.types.resources.FileResourceorg.apache.tools.ant.taskdefs.DeleteSUBCLASS_TYPE_MISMATCH
    35
    Delete delete = new Delete();
    2
    fr.setProject(getProject());
    2
    fr.setProject(getProject());
    38
    delete.execute();
    Differences
    Expression1Expression2Difference
    setProjectexecuteMETHOD_INVOCATION_NAME_MISMATCH
    frdeleteVARIABLE_NAME_MISMATCH
    org.apache.tools.ant.types.resources.FileResourceorg.apache.tools.ant.taskdefs.DeleteSUBCLASS_TYPE_MISMATCH
    fr.setProject(getProject())delete.execute()ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression fr.setProject(getProject()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression delete.execute() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression fr.setProject(getProject()) is a void method call, and thus it cannot be parameterized
    Expression delete.execute() is a void method call, and thus it cannot be parameterized
    Expression fr.setProject(getProject()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression delete.execute() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression fr.setProject(getProject()) is a void method call, and thus it cannot be parameterized
    Expression delete.execute() is a void method call, and thus it cannot be parameterized
    38
    delete.execute();
    3
    fr.setFile(stylesheet);
    3
    fr.setFile(stylesheet);
    37
    delete.setFile(outputFile);
    Differences
    Expression1Expression2Difference
    stylesheetoutputFileVARIABLE_NAME_MISMATCH
    frdeleteVARIABLE_NAME_MISMATCH
    org.apache.tools.ant.types.resources.FileResourceorg.apache.tools.ant.taskdefs.DeleteSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression fr cannot be unified with expression delete , because common superclass org.apache.tools.ant.ProjectComponent does not declare member(s) public void setFile(java.io.File)
    37
    delete.setFile(outputFile);
    4
    configureLiaison(fr);
    4
    configureLiaison(fr);
    36
    delete.bindToOwner(task);
    Differences
    Expression1Expression2Difference
    configureLiaisonbindToOwnerMETHOD_INVOCATION_NAME_MISMATCH
    frtaskVARIABLE_NAME_MISMATCH
    org.apache.tools.ant.types.resources.FileResourceorg.apache.tools.ant.TaskSUBCLASS_TYPE_MISMATCH
    deleteMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression configureLiaison(fr) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression delete.bindToOwner(task) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression configureLiaison(fr) is a void method call, and thus it cannot be parameterized
    Expression delete.bindToOwner(task) is a void method call, and thus it cannot be parameterized
    Expression fr cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression configureLiaison(fr) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression delete.bindToOwner(task) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression configureLiaison(fr) is a void method call, and thus it cannot be parameterized
    Expression delete.bindToOwner(task) is a void method call, and thus it cannot be parameterized
    36
    delete.bindToOwner(task);
    Precondition Violations (18)
    Row Violation
    1Expression fr.setProject(getProject()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression delete.execute() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression fr.setProject(getProject()) is a void method call, and thus it cannot be parameterized
    4Expression delete.execute() is a void method call, and thus it cannot be parameterized
    5Expression fr.setProject(getProject()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression delete.execute() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression fr.setProject(getProject()) is a void method call, and thus it cannot be parameterized
    8Expression delete.execute() is a void method call, and thus it cannot be parameterized
    9Expression fr cannot be unified with expression delete , because common superclass org.apache.tools.ant.ProjectComponent does not declare member(s) public void setFile(java.io.File)
    10Expression configureLiaison(fr) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression delete.bindToOwner(task) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression configureLiaison(fr) is a void method call, and thus it cannot be parameterized
    13Expression delete.bindToOwner(task) is a void method call, and thus it cannot be parameterized
    14Expression fr cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression configureLiaison(fr) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression delete.bindToOwner(task) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17Expression configureLiaison(fr) is a void method call, and thus it cannot be parameterized
    18Expression delete.bindToOwner(task) is a void method call, and thus it cannot be parameterized