int size = delegateSize(); if (array.length < size) { @SuppressWarnings("unchecked") T[] newArray = (T[])Array.newInstance(array.getClass().getComponentType(), size); array = newArray; } if (array.length > size) { array[size] = null; } int index = 0; for (EGenericType eGenericType : getEGenericExceptions()) { @SuppressWarnings("unchecked") T rawType = (T)unwrap(eGenericType); array[index++] = rawType; } return array;
int size = delegateSize(); if (array.length < size) { @SuppressWarnings("unchecked") T[] newArray = (T[])Array.newInstance(array.getClass().getComponentType(), size); array = newArray; } if (array.length > size) { array[size] = null; } int index = 0; for (EGenericType eGenericType : getEGenericSuperTypes()) { @SuppressWarnings("unchecked") T rawType = (T)unwrap(eGenericType); array[index++] = rawType; } return array;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EOperationImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EClassImpl.java
Method name: T[] delegateToArray(T[]) Method name: T[] delegateToArray(T[])
Number of AST nodes: 11 Number of AST nodes: 11
1
int size = delegateSize();
1
int size = delegateSize();
2
            if (array.length < size)
2
            if (array.length < size)
3
            {
3
            {
4
              @SuppressWarnings("unchecked") T[] newArray = (T[])Array.newInstance(array.getClass().getComponentType(), size);
4
              @SuppressWarnings("unchecked") T[] newArray = (T[])Array.newInstance(array.getClass().getComponentType(), size);
5
              array = newArray;
5
              array = newArray;
6
            }
6
            }
7
          
7
          
8
            if (array.length > size)
8
            if (array.length > size)
9
            {
9
            {
10
              array[size] = null;
10
              array[size] = null;
11
            }
11
            }
12
            int index = 0;
12
            int index = 0;
13
            for (EGenericType eGenericType : getEGenericExceptions())
13
            for (EGenericType eGenericType : getEGenericSuperTypes())
14
            {
14
            {
15
              @SuppressWarnings("unchecked") T rawType = (T)unwrap(eGenericType);
15
              @SuppressWarnings("unchecked") T rawType = (T)unwrap(eGenericType);
16
              array[index++] = rawType;
16
              array[index++] = rawType;
17
            }
17
            }
18
            return array;
18
            return array;
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.7
Clones locationClones are in different classes having the same super class
Number of node comparisons9