try { reader.setFeature(feature, v); } catch (SAXNotRecognizedException e) { log(FEATURE + NOT_RECOGNIZED + feature, Project.MSG_VERBOSE); return false; } catch (SAXNotSupportedException e) { log(FEATURE + NOT_SUPPORTED + feature, Project.MSG_VERBOSE); return false; } return true;
try { reader.setProperty(property, value); } catch (SAXNotRecognizedException e) { log(PROPERTY + NOT_RECOGNIZED + property, Project.MSG_VERBOSE); return false; } catch (SAXNotSupportedException e) { log(PROPERTY + NOT_SUPPORTED + property, Project.MSG_VERBOSE); return false; } return true;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/condition/ParserSupports.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/condition/ParserSupports.java
Method name: boolean evalFeature() Method name: boolean evalProperty()
Number of AST nodes: 3 Number of AST nodes: 3
1
try {
1
try {
2
            reader.setFeature(feature, v);
2
            reader.setProperty(property, value);
3
        } catch (SAXNotRecognizedException e) {
3
        } catch (SAXNotRecognizedException e) {
4
            log(FEATURE + NOT_RECOGNIZED + feature, Project.MSG_VERBOSE);
4
            log(PROPERTY + NOT_RECOGNIZED + property, Project.MSG_VERBOSE);
5
            return false;
5
            return false;
6
        } catch (SAXNotSupportedException e) {
6
        } catch (SAXNotSupportedException e) {
7
            log(FEATURE + NOT_SUPPORTED + feature, Project.MSG_VERBOSE);
7
            log(PROPERTY + NOT_SUPPORTED + property, Project.MSG_VERBOSE);
8
            return false;
8
            return false;
9
        }
9
        }
10
        return true;
10
        return true;
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.4
Clones locationClones are declared in the same class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)6.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    try
    5
    try
    2
    try
    Differences
    Expression1Expression2Difference
    featurepropertyVARIABLE_NAME_MISMATCH
    FEATUREPROPERTYVARIABLE_NAME_MISMATCH
    featurepropertyVARIABLE_NAME_MISMATCH
    FEATUREPROPERTYVARIABLE_NAME_MISMATCH
    2
    try
                                                                                
    3
    reader.setProperty(property, value);
    Preondition Violations
    Unmatched statement reader.setProperty(property,value); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    3
    reader.setProperty(property, value);
    6
    reader.setFeature(feature, v);
    6
    reader.setFeature(feature, v);
    Preondition Violations
    Unmatched statement reader.setFeature(feature,v); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
                                                                    
    7
    return true;
    4
    return true;
    Precondition Violations (2)
    Row Violation
    1Unmatched statement reader.setProperty(property,value); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    2Unmatched statement reader.setFeature(feature,v); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted