throw new BuildException("remotedir attribute must be set for " + "mkdir action!"); } if (action == CHMOD && chmod == null) { throw new BuildException("chmod attribute must be set for chmod " + "action!"); } if (action == SITE_CMD && siteCommand == null) { throw new BuildException("sitecommand attribute must be set for site " + "action!"); }
throw new BuildException("listing attribute must be set for list " + "action!"); } if (action == MK_DIR && remotedir == null) { throw new BuildException("remotedir attribute must be set for " + "mkdir action!"); } if (action == CHMOD && chmod == null) { throw new BuildException("chmod attribute must be set for chmod " + "action!"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/FTP.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/FTP.java
Method name: void checkAttributes() Method name: void checkAttributes()
Number of AST nodes: 5 Number of AST nodes: 5
1
throw new BuildException("listing attribute must be set for list "
2
                 + "action!");
3
        }
4
        if (action == MK_DIR && remotedir == null) {
1
throw new BuildException("remotedir attribute must be set for "
5
            throw new BuildException("remotedir attribute must be set for "
2
                 + "mkdir action!");
6
                 + "mkdir action!");
3
        }
7
        }
4
        if (action == CHMOD && chmod == null) {
8
        if (action == CHMOD && chmod == null) {
5
            throw new BuildException("chmod attribute must be set for chmod "
9
            throw new BuildException("chmod attribute must be set for chmod "
6
                 + "action!");
10
                 + "action!");
7
        }
11
        }
8
        if (action == SITE_CMD && siteCommand == null) {
9
            throw new BuildException("sitecommand attribute must be set for site "
10
                 + "action!");
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 the same method
Number of node comparisons13
  1. {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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    11
    if (action == CHMOD && chmod == null)
    11
    if (action == CHMOD && chmod == null)
    12
    throw new BuildException("chmod attribute must be set for chmod " + "action!");
    12
    throw new BuildException("chmod attribute must be set for chmod " + "action!");
    13
    if (action == SITE_CMD && siteCommand == null)
    13
    if (action == SITE_CMD && siteCommand == null)
    9
    if (action == MK_DIR && remotedir == null)
    Differences
    Expression1Expression2Difference
    SITE_CMDMK_DIRVARIABLE_NAME_MISMATCH
    siteCommandremotedirVARIABLE_NAME_MISMATCH
    9
    if (action == MK_DIR && remotedir == null)
    14
    throw new BuildException("sitecommand attribute must be set for site " + "action!");
    14
    throw new BuildException("sitecommand attribute must be set for site " + "action!");
    10
    throw new BuildException("remotedir attribute must be set for " + "mkdir action!");
    Differences
    Expression1Expression2Difference
    "sitecommand attribute must be set for site ""remotedir attribute must be set for "LITERAL_VALUE_MISMATCH
    "action!""mkdir action!"LITERAL_VALUE_MISMATCH
    10
    throw new BuildException("remotedir attribute must be set for " + "mkdir action!");
    Precondition Violations (0)
    Row Violation