if (targetdir == null) { setError("The targetdir attribute is required."); } if (mapperElement == null) { map = new IdentityMapper(); } else { map = mapperElement.getImplementation(); } if (map == null) { setError("Could not set <mapper> element."); }
if (targetdir == null) { setError("The targetdir attribute is required."); } if (mapperElement == null) { map = new IdentityMapper(); } else { map = mapperElement.getImplementation(); } if (map == null) { setError("Could not set <mapper> element."); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/MappingSelector.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/PresentSelector.java
Method name: void verifySettings() Method name: void verifySettings()
Number of AST nodes: 7 Number of AST nodes: 7
1
if (targetdir == null) {
1
if (targetdir == null) {
2
            setError("The targetdir attribute is required.");
2
            setError("The targetdir attribute is required.");
3
        }
3
        }
4
        if (mapperElement == null) {
4
        if (mapperElement == null) {
5
            map = new IdentityMapper();
5
            map = new IdentityMapper();
6
        } else {
6
        } else {
7
            map = mapperElement.getImplementation();
7
            map = mapperElement.getImplementation();
8
        }
8
        }
9
        if (map == null) {
9
        if (map == null) {
10
            setError("Could not set <mapper> element.");
10
            setError("Could not set <mapper> element.");
11
        }
11
        }
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.4
Clones locationClones are in different classes having the same super class
Number of node comparisons36
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    if (targetdir == null)
    1
    if (targetdir == null)
    2
    setError("The targetdir attribute is required.");
    2
    setError("The targetdir attribute is required.");
    3
    if (mapperElement == null)
    3
    if (mapperElement == null)
    4
    map = new IdentityMapper();
    4
    map = new IdentityMapper();
    else
    else
    5
    map = mapperElement.getImplementation();
    5
    map = mapperElement.getImplementation();
    6
    if (map == null)
    6
    if (map == null)
    7
    setError("Could not set <mapper> element.");
    7
    setError("Could not set <mapper> element.");
    Precondition Violations (0)
    Row Violation