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); }
File toplinkDD = new File(getConfig().descriptorDir, ddPrefix + toplinkDescriptor); if (toplinkDD.exists()) { ejbFiles.put(META_DIR + toplinkDescriptor, toplinkDD); } else { log("Unable to locate toplink deployment descriptor. " + "It was expected to be in " + toplinkDD.getPath(), Project.MSG_WARN); }
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/WeblogicTOPLinkDeploymentTool.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 websphereBND = new File(getConfig().descriptorDir, ddPrefix + WAS_BND);
1
File toplinkDD = new File(getConfig().descriptorDir, ddPrefix + toplinkDescriptor);
2
        if (websphereBND.exists()) {
2
        if (toplinkDD.exists()) {
3
            ejbFiles.put(META_DIR + WAS_BND,
3
            ejbFiles.put(META_DIR + 
4
toplinkDescriptor,
4
                websphereBND);
5
                         toplinkDD);
5
        } else {
6
        } else {
6
            log("Unable to locate websphere bindings. "
7
            log("Unable to locate toplink deployment descriptor. "
7
                + "It was expected to be in "
8
                + "It was expected to be in "
8
                + websphereBND.getPath(), Project.MSG_VERBOSE);
9
                + toplinkDD.getPath(), Project.MSG_WARN);
9
        }
10
        }
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 different classes having the same super class
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)23.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    File websphereBND = new File(getConfig().descriptorDir, ddPrefix + WAS_BND);
    7
    File websphereBND = new File(getConfig().descriptorDir, ddPrefix + WAS_BND);
    2
    File toplinkDD = new File(getConfig().descriptorDir, ddPrefix + toplinkDescriptor);
    Differences
    Expression1Expression2Difference
    websphereBNDtoplinkDDVARIABLE_NAME_MISMATCH
    WAS_BNDtoplinkDescriptorVARIABLE_NAME_MISMATCH
    2
    File toplinkDD = new File(getConfig().descriptorDir, ddPrefix + toplinkDescriptor);
    8
    if (websphereBND.exists())
    8
    if (websphereBND.exists())
    3
    if (toplinkDD.exists())
    Differences
    Expression1Expression2Difference
    websphereBNDtoplinkDDVARIABLE_NAME_MISMATCH
    3
    if (toplinkDD.exists())
    9
    ejbFiles.put(META_DIR + WAS_BND, websphereBND);
    9
    ejbFiles.put(META_DIR + WAS_BND, websphereBND);
    4
    ejbFiles.put(META_DIR + toplinkDescriptor, toplinkDD);
    Differences
    Expression1Expression2Difference
    WAS_BNDtoplinkDescriptorVARIABLE_NAME_MISMATCH
    websphereBNDtoplinkDDVARIABLE_NAME_MISMATCH
    4
    ejbFiles.put(META_DIR + toplinkDescriptor, toplinkDD);
    else
    else
    10
    log("Unable to locate websphere bindings. " + "It was expected to be in " + websphereBND.getPath(), Project.MSG_VERBOSE);
    10
    log("Unable to locate websphere bindings. " + "It was expected to be in " + websphereBND.getPath(), Project.MSG_VERBOSE);
    5
    log("Unable to locate toplink deployment descriptor. " + "It was expected to be in " + toplinkDD.getPath(), Project.MSG_WARN);
    Differences
    Expression1Expression2Difference
    websphereBNDtoplinkDDVARIABLE_NAME_MISMATCH
    "Unable to locate websphere bindings. ""Unable to locate toplink deployment descriptor. "LITERAL_VALUE_MISMATCH
    MSG_VERBOSEMSG_WARNVARIABLE_NAME_MISMATCH
    5
    log("Unable to locate toplink deployment descriptor. " + "It was expected to be in " + toplinkDD.getPath(), Project.MSG_WARN);
    Precondition Violations (0)
    Row Violation