Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Check for required attributes if (getTypeName() == null) { throw new BuildException("Required attribute TypeName not specified"); }
Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Check for required attributes if (getTypeName() == null) { throw new BuildException("Required attribute TypeName not specified"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkattr.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java
Method name: void execute() Method name: void execute()
Number of AST nodes: 5 Number of AST nodes: 5
1
Commandline commandLine = new Commandline();
1
Commandline commandLine = new Commandline();
2
        Project aProj = getProject();
2
        Project aProj = getProject();
3
        int result = 0;
3
        int result = 0;
4
        // Check for required attributes
4
        // Check for required attributes
5
        if (getTypeName() == null) {
5
        if (getTypeName() == null) {
6
            throw new BuildException("Required attribute TypeName not specified");
6
            throw new BuildException("Required attribute TypeName not specified");
7
        }
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons9
  1. {Non-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)13.3
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    Commandline commandLine = new Commandline();
    1
    Commandline commandLine = new Commandline();
    2
    Project aProj = getProject();
    2
    Project aProj = getProject();
    3
    int result = 0;
    3
    int result = 0;
    4
    if (getTypeName() == null)
    4
    if (getTypeName() == null)
    5
    throw new BuildException("Required attribute TypeName not specified");
    5
    throw new BuildException("Required attribute TypeName not specified");
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables aProj, commandLine, result , while Clone fragment #2 returns variables aProj, commandLine, result