notifications = super.inverseAdd(object, notifications); synchronized (ETypeParameterImpl.this) { @SuppressWarnings("unchecked") Set<EGenericTypeImpl> eGenericTypes = (Set<EGenericTypeImpl>)(Set<?>)getEGenericTypes(); for (EGenericTypeImpl eGenericType : eGenericTypes) { notifications = eGenericType.setERawType(eGenericType.getErasure(ETypeParameterImpl.this), notifications); } } return notifications;
notifications = super.inverseRemove(object, notifications); synchronized (ETypeParameterImpl.this) { @SuppressWarnings("unchecked") Set<EGenericTypeImpl> eGenericTypes = (Set<EGenericTypeImpl>)(Set<?>)getEGenericTypes(); for (EGenericTypeImpl eGenericType : eGenericTypes) { notifications = eGenericType.setERawType(eGenericType.getErasure(ETypeParameterImpl.this), notifications); } } return notifications;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/ETypeParameterImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/ETypeParameterImpl.java
Method name: NotificationChain inverseAdd(EGenericType, NotificationChain) Method name: NotificationChain inverseRemove(EGenericType, NotificationChain)
Number of AST nodes: 6 Number of AST nodes: 6
1
notifications =  super.inverseAdd(object, notifications);
1
notifications = super.inverseRemove(object, notifications);
2
            synchronized (ETypeParameterImpl.this)
2
            synchronized (ETypeParameterImpl.this)
3
            {
3
            {
4
              @SuppressWarnings("unchecked") 
4
              @SuppressWarnings("unchecked") 
5
              Set<EGenericTypeImpl> eGenericTypes = (Set<EGenericTypeImpl>)(Set<?>)getEGenericTypes();
5
Set<EGenericTypeImpl> eGenericTypes = (Set<EGenericTypeImpl>)(Set<?>)getEGenericTypes();
6
              for (EGenericTypeImpl eGenericType : eGenericTypes)
6
              for (EGenericTypeImpl eGenericType : eGenericTypes)
7
              {
7
              {
8
                notifications = eGenericType.setERawType(eGenericType.getErasure(ETypeParameterImpl.this), notifications);
8
                notifications = eGenericType.setERawType(eGenericType.getErasure(ETypeParameterImpl.this), notifications);
9
              }
9
              }
10
            }
10
            } 
11
            return notifications;
11
            return notifications;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)1.1
Clones locationClones are declared in the same class
Number of node comparisons12
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    notifications = super.inverseAdd(object, notifications);
    1
    notifications = super.inverseAdd(object, notifications);
    1
    notifications = super.inverseRemove(object, notifications);
    Differences
    Expression1Expression2Difference
    inverseAddinverseRemoveMETHOD_INVOCATION_NAME_MISMATCH
    1
    notifications = super.inverseRemove(object, notifications);
    2
    synchronized (ETypeParameterImpl.this)
    2
    synchronized (ETypeParameterImpl.this)
    3
    @SuppressWarnings("unchecked") Set<EGenericTypeImpl> eGenericTypes = (Set<EGenericTypeImpl>)(Set<?>)getEGenericTypes();
    3
    @SuppressWarnings("unchecked") Set<EGenericTypeImpl> eGenericTypes = (Set<EGenericTypeImpl>)(Set<?>)getEGenericTypes();
    4
    for (EGenericTypeImpl eGenericType : eGenericTypes)
    4
    for (EGenericTypeImpl eGenericType : eGenericTypes)
    5
    notifications = eGenericType.setERawType(eGenericType.getErasure(ETypeParameterImpl.this), notifications);
    5
    notifications = eGenericType.setERawType(eGenericType.getErasure(ETypeParameterImpl.this), notifications);
    6
    return notifications;
    6
    return notifications;
    Precondition Violations (0)
    Row Violation