if (parserProperties == null || parserProperties.get(SAX_LEXICAL_PROPERTY) == null) { parser.setProperty(SAX_LEXICAL_PROPERTY, handler); }
if (parserProperties == null || parserProperties.get(SAX_LEXICAL_PROPERTY) == null) { parser.setProperty(SAX_LEXICAL_PROPERTY, handler); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLLoadImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLLoadImpl.java
Method name: void load(XMLResource, InputStream, Map) Method name: void load(XMLResource, InputSource, Map)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (parserProperties == null || parserProperties.get(SAX_LEXICAL_PROPERTY) == null) 
1
if (parserProperties == null || parserProperties.get(SAX_LEXICAL_PROPERTY) == null) 
2
        {
2
        {
3
          parser.setProperty(SAX_LEXICAL_PROPERTY, handler);
3
          parser.setProperty(SAX_LEXICAL_PROPERTY, handler);
4
        }
4
        }
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.5
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 fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    45
    if (parserProperties == null || parserProperties.get(SAX_LEXICAL_PROPERTY) == null)
    45
    if (parserProperties == null || parserProperties.get(SAX_LEXICAL_PROPERTY) == null)
    23
    if (parserProperties == null || parserProperties.get(SAX_LEXICAL_PROPERTY) == null)
    Differences
    Expression1Expression2Difference
    java.util.Mapjava.util.MapVARIABLE_TYPE_MISMATCH
    VARIABLE_TYPE_MISMATCH
    java.util.Mapjava.util.MapVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Map<java.lang.String,> of variable parserProperties does not match with type java.util.Map<java.lang.String,> of variable parserProperties
    • Make classes java.util.Map and java.util.Map extend a common superclass
    Type of variable parserProperties.get(SAX_LEXICAL_PROPERTY) does not match with type of variable parserProperties.get(SAX_LEXICAL_PROPERTY)
    • Make classes and extend a common superclass
    Type java.util.Map<java.lang.String,> of variable parserProperties does not match with type java.util.Map<java.lang.String,> of variable parserProperties
    • Make classes java.util.Map and java.util.Map extend a common superclass
    23
    if (parserProperties == null || parserProperties.get(SAX_LEXICAL_PROPERTY) == null)
    46
    parser.setProperty(SAX_LEXICAL_PROPERTY, handler);
    24
    parser.setProperty(SAX_LEXICAL_PROPERTY, handler);
    Precondition Violations (3)
    Row Violation
    1Type java.util.Map<java.lang.String,> of variable parserProperties does not match with type java.util.Map<java.lang.String,> of variable parserProperties
    2Type of variable parserProperties.get(SAX_LEXICAL_PROPERTY) does not match with type of variable parserProperties.get(SAX_LEXICAL_PROPERTY)
    3Type java.util.Map<java.lang.String,> of variable parserProperties does not match with type java.util.Map<java.lang.String,> of variable parserProperties