if (other.text != null) { return false; }
if (rhsManifest.manifestVersion != null) { return false; }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/MacroDef.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Manifest.java
Method name: boolean sameOrSimilar(Object, boolean) Method name: boolean equals(Object)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (other.text != null) {
1
if (rhsManifest.manifestVersion != null) {
2
                return false;
2
                return false;
3
            }
3
            }
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.2
Clones locationClones are in different classes
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    15
    if (other.text != null)
    15
    if (other.text != null)
    7
    if (rhsManifest.manifestVersion != null)
    Differences
    Expression1Expression2Difference
    otherrhsManifestVARIABLE_NAME_MISMATCH
    org.apache.tools.ant.taskdefs.MacroDeforg.apache.tools.ant.taskdefs.ManifestVARIABLE_TYPE_MISMATCH
    textmanifestVersionVARIABLE_NAME_MISMATCH
    org.apache.tools.ant.taskdefs.MacroDef.Textjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.tools.ant.taskdefs.MacroDef of variable other does not match with type org.apache.tools.ant.taskdefs.Manifest of variable rhsManifest
    • Make classes org.apache.tools.ant.taskdefs.MacroDef and org.apache.tools.ant.taskdefs.Manifest extend a common superclass
    Type org.apache.tools.ant.taskdefs.MacroDef.Text of variable other.text does not match with type java.lang.String of variable rhsManifest.manifestVersion
    • Make classes org.apache.tools.ant.taskdefs.MacroDef.Text and java.lang.String extend a common superclass
    7
    if (rhsManifest.manifestVersion != null)
    16
    return false;
    16
    return false;
    8
    return false;
    Preondition Violations
    Conditional return false;
    Conditional return false;
    8
    return false;
    Precondition Violations (4)
    Row Violation
    1Type org.apache.tools.ant.taskdefs.MacroDef of variable other does not match with type org.apache.tools.ant.taskdefs.Manifest of variable rhsManifest
    2Type org.apache.tools.ant.taskdefs.MacroDef.Text of variable other.text does not match with type java.lang.String of variable rhsManifest.manifestVersion
    3Conditional return false;
    4Conditional return false;