parser.setEntityResolver(hb); parser.setErrorHandler(hb); parser.setDTDHandler(hb); parser.parse(inputSource);
parser.setEntityResolver(hb); parser.setErrorHandler(hb); parser.setDTDHandler(hb); parser.parse(inputSource);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/helper/ProjectHelper2.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/helper/ProjectHelperImpl.java
Method name: void parse(Project, Object, RootHandler) Method name: void parse(Project, Object)
Number of AST nodes: 4 Number of AST nodes: 4
1
parser.setEntityResolver(hb);
1
parser.setEntityResolver(hb);
2
            parser.setErrorHandler(hb);
2
            parser.setErrorHandler(hb);
3
            parser.setDTDHandler(hb);
3
            parser.setDTDHandler(hb);
4
            parser.parse(inputSource);
4
            parser.parse(inputSource);
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 in different classes having the same super class
Number of node comparisons17
  1. {Non-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)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    30
    parser.setEntityResolver(hb);
    30
    parser.setEntityResolver(hb);
    19
    parser.setEntityResolver(hb);
    Differences
    Expression1Expression2Difference
    org.xml.sax.helpers.DefaultHandlerorg.xml.sax.HandlerBaseSUBCLASS_TYPE_MISMATCH
    org.xml.sax.XMLReaderorg.xml.sax.ParserVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.xml.sax.XMLReader of variable parser does not match with type org.xml.sax.Parser of variable parser
    • Make classes org.xml.sax.XMLReader and org.xml.sax.Parser extend a common superclass
    19
    parser.setEntityResolver(hb);
    31
    parser.setErrorHandler(hb);
    31
    parser.setErrorHandler(hb);
    20
    parser.setErrorHandler(hb);
    Differences
    Expression1Expression2Difference
    org.xml.sax.helpers.DefaultHandlerorg.xml.sax.HandlerBaseSUBCLASS_TYPE_MISMATCH
    org.xml.sax.XMLReaderorg.xml.sax.ParserVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression hb cannot be unified with expression hb , because common superclass type org.xml.sax.EntityResolver cannot be passed as an argument to public abstract void setErrorHandler(org.xml.sax.ErrorHandler)
    Type org.xml.sax.XMLReader of variable parser does not match with type org.xml.sax.Parser of variable parser
    • Make classes org.xml.sax.XMLReader and org.xml.sax.Parser extend a common superclass
    20
    parser.setErrorHandler(hb);
    32
    parser.setDTDHandler(hb);
    32
    parser.setDTDHandler(hb);
    21
    parser.setDTDHandler(hb);
    Differences
    Expression1Expression2Difference
    org.xml.sax.helpers.DefaultHandlerorg.xml.sax.HandlerBaseSUBCLASS_TYPE_MISMATCH
    org.xml.sax.XMLReaderorg.xml.sax.ParserVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression hb cannot be unified with expression hb , because common superclass type org.xml.sax.EntityResolver cannot be passed as an argument to public abstract void setDTDHandler(org.xml.sax.DTDHandler)
    Type org.xml.sax.XMLReader of variable parser does not match with type org.xml.sax.Parser of variable parser
    • Make classes org.xml.sax.XMLReader and org.xml.sax.Parser extend a common superclass
    21
    parser.setDTDHandler(hb);
    33
    parser.parse(inputSource);
    33
    parser.parse(inputSource);
    22
    parser.parse(inputSource);
    Differences
    Expression1Expression2Difference
    org.xml.sax.XMLReaderorg.xml.sax.ParserVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.xml.sax.XMLReader of variable parser does not match with type org.xml.sax.Parser of variable parser
    • Make classes org.xml.sax.XMLReader and org.xml.sax.Parser extend a common superclass
    22
    parser.parse(inputSource);
    Precondition Violations (6)
    Row Violation
    1Type org.xml.sax.XMLReader of variable parser does not match with type org.xml.sax.Parser of variable parser
    2Expression hb cannot be unified with expression hb , because common superclass type org.xml.sax.EntityResolver cannot be passed as an argument to public abstract void setErrorHandler(org.xml.sax.ErrorHandler)
    3Type org.xml.sax.XMLReader of variable parser does not match with type org.xml.sax.Parser of variable parser
    4Expression hb cannot be unified with expression hb , because common superclass type org.xml.sax.EntityResolver cannot be passed as an argument to public abstract void setDTDHandler(org.xml.sax.DTDHandler)
    5Type org.xml.sax.XMLReader of variable parser does not match with type org.xml.sax.Parser of variable parser
    6Type org.xml.sax.XMLReader of variable parser does not match with type org.xml.sax.Parser of variable parser