if (adapterFactory.isFactoryForType(target)) { adapterFactory.adaptAllNew(target); }
if (!objectsWithGenericTypeList.contains(object)) { super.setValue(object, feature, value, position); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ComposedAdapterFactory.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/EMOFHelperImpl.java
Method name: void adaptAllNew(Notifier) Method name: void setValue(EObject, EStructuralFeature, Object, int)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (adapterFactory.isFactoryForType(target))
1
if (
2
      {
3
        adapterFactory.adaptAllNew(target
2
!objectsWithGenericTypeList.contains(object))
3
      {
4
);
4
        super.setValue(object, feature, value, position);
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.1
Clones locationClones are in different classes
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)423.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if (adapterFactory.isFactoryForType(target))
    2
    if (adapterFactory.isFactoryForType(target))
    9
    if (!objectsWithGenericTypeList.contains(object))
    Differences
    Expression1Expression2Difference
    adapterFactory.isFactoryForType(target)!objectsWithGenericTypeList.contains(object)TYPE_COMPATIBLE_REPLACEMENT
    9
    if (!objectsWithGenericTypeList.contains(object))
    3
    adapterFactory.adaptAllNew(target);
    3
    adapterFactory.adaptAllNew(target);
    10
    super.setValue(object, feature, value, position);
    Differences
    Expression1Expression2Difference
    adapterFactory.adaptAllNew(target)super.setValue(object,feature,value,position)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression adapterFactory.adaptAllNew(target) is a void method call, and thus it cannot be parameterized
    Expression super.setValue(object,feature,value,position) is a void method call, and thus it cannot be parameterized
    10
    super.setValue(object, feature, value, position);
    Precondition Violations (2)
    Row Violation
    1Expression adapterFactory.adaptAllNew(target) is a void method call, and thus it cannot be parameterized
    2Expression super.setValue(object,feature,value,position) is a void method call, and thus it cannot be parameterized