PropertyHelper ph = PropertyHelper.getPropertyHelper(this); return (String) ph.getProperty(null, propertyName);
PropertyHelper ph = PropertyHelper.getPropertyHelper(this); return (String) ph.getUserProperty(null, propertyName);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Project.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Project.java
Method name: String getProperty(String) Method name: String getUserProperty(String)
Number of AST nodes: 2 Number of AST nodes: 2
1
PropertyHelper ph = PropertyHelper.getPropertyHelper(this);
1
PropertyHelper ph = PropertyHelper.getPropertyHelper(this);
2
        return (String) ph.getProperty(null, propertyName);
2
        return (String) ph.getUserProperty(null, propertyName);
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.0
Clones locationClones are declared in the same class
Number of node comparisons4
  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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    PropertyHelper ph = PropertyHelper.getPropertyHelper(this);
    1
    PropertyHelper ph = PropertyHelper.getPropertyHelper(this);
    2
    return (String)ph.getProperty(null, propertyName);
    2
    return (String)ph.getProperty(null, propertyName);
    2
    return (String)ph.getUserProperty(null, propertyName);
    Differences
    Expression1Expression2Difference
    getPropertygetUserPropertyMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression ph.getProperty(null,propertyName) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ph.getUserProperty(null,propertyName) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    return (String)ph.getUserProperty(null, propertyName);
    Precondition Violations (2)
    Row Violation
    1Expression ph.getProperty(null,propertyName) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression ph.getUserProperty(null,propertyName) cannot be parameterized, because it has dependencies to/from statements that will be extracted