Map<?, ?> response = options == null ? null : (Map<?, ?>)options.get(URIConverter.OPTION_RESPONSE); if (response == null) { response = new HashMap<Object, Object>(); }
Map<?, ?> response = options == null ? null : (Map<?, ?>)options.get(URIConverter.OPTION_RESPONSE); if (response == null) { response = new HashMap<Object, Object>(); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java
Method name: void saveOnlyIfChangedWithMemoryBuffer(Map) Method name: void load(Map)
Number of AST nodes: 3 Number of AST nodes: 3
1
Map<?, ?> response = options == null ? null : (Map<?, ?>)options.get(URIConverter.OPTION_RESPONSE);
1
Map<?, ?> response = options == null ? null : (Map<?, ?>)options.get(URIConverter.OPTION_RESPONSE);
2
      if (response == null)
2
      if (response == null)
3
      {
3
      {
4
        response = new HashMap<Object, Object>();
4
        response = new HashMap<Object, Object>();
5
      }
5
      }
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.3
Clones locationClones are declared in the same class
Number of node comparisons6
  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)1.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                                                                                                                        
    3
    Map<?, ?> response = options == null ? null : (Map<?, ?>)options.get(URIConverter.OPTION_RESPONSE);
    21
    Map<?, ?> response = options == null ? null : (Map<?, ?>)options.get(URIConverter.OPTION_RESPONSE);
                                                                                                                                                                                                          
    22
    if (response == null)
    22
    if (response == null)
    4
    if (response == null)
    Differences
    Expression1Expression2Difference
    java.util.Map<,>java.util.Map<,>VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Map<,> of variable response does not match with type java.util.Map<,> of variable response
    • Make classes java.util.Map<,> and java.util.Map<,> extend a common superclass
    4
    if (response == null)
    23
    response = new HashMap<Object, Object>();
    5
    response = new HashMap<Object, Object>();
    Precondition Violations (1)
    Row Violation
    1Type java.util.Map<,> of variable response does not match with type java.util.Map<,> of variable response