File websphereEXT = new File(getConfig().descriptorDir, ddPrefix + WAS_EXT); if (websphereEXT.exists()) { ejbFiles.put(META_DIR + WAS_EXT, websphereEXT); } else { log("Unable to locate websphere extensions. " + "It was expected to be in " + websphereEXT.getPath(), Project.MSG_VERBOSE); }
File websphereBND = new File(getConfig().descriptorDir, ddPrefix + WAS_BND); if (websphereBND.exists()) { ejbFiles.put(META_DIR + WAS_BND, websphereBND); } else { log("Unable to locate websphere bindings. " + "It was expected to be in " + websphereBND.getPath(), Project.MSG_VERBOSE); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
Method name: void addVendorFiles(Hashtable, String) Method name: void addVendorFiles(Hashtable, String)
Number of AST nodes: 4 Number of AST nodes: 4
1
File websphereEXT = new File(getConfig().descriptorDir, ddPrefix + WAS_EXT);
1
File websphereBND = new File(getConfig().descriptorDir, ddPrefix + WAS_BND);
2
        if (websphereEXT.exists()) {
2
        if (websphereBND.exists()) {
3
            ejbFiles.put(META_DIR + WAS_EXT,
3
            ejbFiles.put(META_DIR + WAS_BND,
4
                websphereEXT);
4
                websphereBND);
5
        } else {
5
        } else {
6
            log("Unable to locate websphere extensions. "
6
            log("Unable to locate websphere bindings. "
7
                + "It was expected to be in "
7
                + "It was expected to be in "
8
                + websphereEXT.getPath(), Project.MSG_VERBOSE);
8
                + websphereBND.getPath(), Project.MSG_VERBOSE);
9
        }
9
        }
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 the same method
Number of node comparisons10
  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)25.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    File websphereEXT = new File(getConfig().descriptorDir, ddPrefix + WAS_EXT);
    3
    File websphereEXT = new File(getConfig().descriptorDir, ddPrefix + WAS_EXT);
    7
    File websphereBND = new File(getConfig().descriptorDir, ddPrefix + WAS_BND);
    Differences
    Expression1Expression2Difference
    websphereEXTwebsphereBNDVARIABLE_NAME_MISMATCH
    WAS_EXTWAS_BNDVARIABLE_NAME_MISMATCH
    7
    File websphereBND = new File(getConfig().descriptorDir, ddPrefix + WAS_BND);
    4
    if (websphereEXT.exists())
    4
    if (websphereEXT.exists())
    8
    if (websphereBND.exists())
    Differences
    Expression1Expression2Difference
    websphereEXTwebsphereBNDVARIABLE_NAME_MISMATCH
    8
    if (websphereBND.exists())
    5
    ejbFiles.put(META_DIR + WAS_EXT, websphereEXT);
    5
    ejbFiles.put(META_DIR + WAS_EXT, websphereEXT);
    9
    ejbFiles.put(META_DIR + WAS_BND, websphereBND);
    Differences
    Expression1Expression2Difference
    WAS_EXTWAS_BNDVARIABLE_NAME_MISMATCH
    websphereEXTwebsphereBNDVARIABLE_NAME_MISMATCH
    9
    ejbFiles.put(META_DIR + WAS_BND, websphereBND);
    else
    else
    6
    log("Unable to locate websphere extensions. " + "It was expected to be in " + websphereEXT.getPath(), Project.MSG_VERBOSE);
    6
    log("Unable to locate websphere extensions. " + "It was expected to be in " + websphereEXT.getPath(), Project.MSG_VERBOSE);
    10
    log("Unable to locate websphere bindings. " + "It was expected to be in " + websphereBND.getPath(), Project.MSG_VERBOSE);
    Differences
    Expression1Expression2Difference
    websphereEXTwebsphereBNDVARIABLE_NAME_MISMATCH
    "Unable to locate websphere extensions. ""Unable to locate websphere bindings. "LITERAL_VALUE_MISMATCH
    10
    log("Unable to locate websphere bindings. " + "It was expected to be in " + websphereBND.getPath(), Project.MSG_VERBOSE);
    Precondition Violations (0)
    Row Violation