if (mapperElement != null) { throw new BuildException("Cannot define more than one mapper", getLocation()); } mapperElement = mapper;
if (nested != null) { throw new BuildException(ONE_NESTED); } nested = c;
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/types/resources/comparators/Reverse.java
Method name: void addMapper(Mapper) Method name: void add(ResourceComparator)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (mapperElement != null) {
1
if (nested != null) {
2
            throw new BuildException("Cannot define more than one mapper",
2
            throw new BuildException(
3
                                     getLocation());
4
        }
5
        mapperElement = mapper
3
ONE_NESTED);
4
        }
6
;
5
        nested = c;
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (mapperElement != null)
    1
    if (mapperElement != null)
    1
    if (nested != null)
    Differences
    Expression1Expression2Difference
    mapperElementnestedVARIABLE_NAME_MISMATCH
    org.apache.tools.ant.types.Mapperorg.apache.tools.ant.types.resources.comparators.ResourceComparatorSUBCLASS_TYPE_MISMATCH
    1
    if (nested != null)
    2
    throw new BuildException("Cannot define more than one mapper", getLocation());
    2
    throw new BuildException("Cannot define more than one mapper", getLocation());
    2
    throw new BuildException(ONE_NESTED);
    Differences
    Expression1Expression2Difference
    new BuildException("Cannot define more than one mapper",getLocation())new BuildException(ONE_NESTED)ARGUMENT_NUMBER_MISMATCH
    2
    throw new BuildException(ONE_NESTED);
    3
    mapperElement = mapper;
    3
    mapperElement = mapper;
    3
    nested = c;
    Differences
    Expression1Expression2Difference
    mapperElementnestedVARIABLE_NAME_MISMATCH
    org.apache.tools.ant.types.Mapperorg.apache.tools.ant.types.resources.comparators.ResourceComparatorSUBCLASS_TYPE_MISMATCH
    mappercVARIABLE_NAME_MISMATCH
    org.apache.tools.ant.types.Mapperorg.apache.tools.ant.types.resources.comparators.ResourceComparatorSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression mapperElement is a field being modified, and thus it cannot be parameterized
    Expression nested is a field being modified, and thus it cannot be parameterized
    3
    nested = c;
    Precondition Violations (2)
    Row Violation
    1Expression mapperElement is a field being modified, and thus it cannot be parameterized
    2Expression nested is a field being modified, and thus it cannot be parameterized