Commandline.Argument arguments = ddCreatorTask.createArg(); arguments.setLine(args); ddCreatorTask.setClasspath(new Path(getProject(), execClassPath)); if (ddCreatorTask.executeJava() != 0) { throw new BuildException("Execution of ddcreator helper failed"); }
Commandline.Argument arguments = helperTask.createArg(); arguments.setLine(args); helperTask.setClasspath(new Path(getProject(), execClassPath)); if (helperTask.executeJava() != 0) { throw new BuildException("Execution of ejbc helper failed"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java
Method name: void execute() Method name: void execute()
Number of AST nodes: 5 Number of AST nodes: 5
1
Commandline.Argument arguments = ddCreatorTask.createArg();
1
Commandline.Argument arguments = helperTask.createArg();
2
        arguments.setLine(args);
2
        arguments.setLine(args);
3
        ddCreatorTask.setClasspath(new Path(getProject(), execClassPath));
3
        helperTask.setClasspath(new Path(getProject(), execClassPath));
4
        if (ddCreatorTask.executeJava() != 0) {
4
        if (helperTask.executeJava() != 0) {
5
            throw new BuildException("Execution of ddcreator helper failed");
5
            throw new BuildException("Execution of ejbc helper failed");
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 comparisons10
  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)2.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    15
    Commandline.Argument arguments = ddCreatorTask.createArg();
    15
    Commandline.Argument arguments = ddCreatorTask.createArg();
    22
    Commandline.Argument arguments = helperTask.createArg();
    Differences
    Expression1Expression2Difference
    ddCreatorTaskhelperTaskVARIABLE_NAME_MISMATCH
    22
    Commandline.Argument arguments = helperTask.createArg();
    16
    arguments.setLine(args);
    23
    arguments.setLine(args);
    17
    ddCreatorTask.setClasspath(new Path(getProject(), execClassPath));
    17
    ddCreatorTask.setClasspath(new Path(getProject(), execClassPath));
    24
    helperTask.setClasspath(new Path(getProject(), execClassPath));
    Differences
    Expression1Expression2Difference
    ddCreatorTaskhelperTaskVARIABLE_NAME_MISMATCH
    24
    helperTask.setClasspath(new Path(getProject(), execClassPath));
    18
    if (ddCreatorTask.executeJava() != 0)
    18
    if (ddCreatorTask.executeJava() != 0)
    25
    if (helperTask.executeJava() != 0)
    Differences
    Expression1Expression2Difference
    ddCreatorTaskhelperTaskVARIABLE_NAME_MISMATCH
    25
    if (helperTask.executeJava() != 0)
    19
    throw new BuildException("Execution of ddcreator helper failed");
    19
    throw new BuildException("Execution of ddcreator helper failed");
    26
    throw new BuildException("Execution of ejbc helper failed");
    Differences
    Expression1Expression2Difference
    "Execution of ddcreator helper failed""Execution of ejbc helper failed"LITERAL_VALUE_MISMATCH
    26
    throw new BuildException("Execution of ejbc helper failed");
    Precondition Violations (0)
    Row Violation