File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EClassImpl.java | |||
Method name: boolean equalTypeArguments(EList
|
Method name: boolean equivalent(EGenericType, EGenericType)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 5 | |||
1 | for (int i = 0; i < size; ++i)↵ | 1 | for (int j = 0; j < eTypeArgumentSize; ++j)↵ | |
2 | {↵ | 2 | {↵ | |
3 | EGenericType eTypeArgument1 = eTypeArguments1.get(i);↵ | 3 | EGenericType eTypeArgument = eTypeArguments.get(j);↵ | |
4 | EGenericType eTypeArgument2 = eTypeArguments2.get(i);↵ | 4 | EGenericType otherETypeArgument = otherETypeArguments.get(j);↵ | |
5 | if (!equalTypeArguments(eTypeArgument1, eTypeArgument2, substitutions))↵ | 5 | if (!equivalent(eTypeArgument, otherETypeArgument↵ | |
6 | {↵ | |||
6 | ))↵ | |||
7 | {↵ | |||
7 | return false;↵ | 8 | return false;↵ | |
8 | }↵ | 9 | ↵ | |
9 | }↵ | 10 | }↵ | |
10 | return true; | 11 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 13 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.3 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | for (int i = 0; i < size; ++i) |
| 16 | for (int j = 0; j < eTypeArgumentSize; ++j) | |||||||||||||||||||
5 | EGenericType eTypeArgument1 = eTypeArguments1.get(i); |
| 17 | EGenericType eTypeArgument = eTypeArguments.get(j); | |||||||||||||||||||
6 | EGenericType eTypeArgument2 = eTypeArguments2.get(i); |
| 18 | EGenericType otherETypeArgument = otherETypeArguments.get(j); | |||||||||||||||||||
7 | if (!equalTypeArguments(eTypeArgument1, eTypeArgument2, substitutions)) |
| 19 | if (!equivalent(eTypeArgument, otherETypeArgument)) | |||||||||||||||||||
8 | return false; |
| 20 | return false; | |||||||||||||||||||
9 | return true; |
| |
Row | Violation |
---|---|
1 | Expression equalTypeArguments(eTypeArgument1,eTypeArgument2,substitutions) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression equivalent(eTypeArgument,otherETypeArgument) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression equalTypeArguments(eTypeArgument1,eTypeArgument2,substitutions) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression equivalent(eTypeArgument,otherETypeArgument) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Unmatched return true; |
6 | Conditional return false; |
7 | Conditional return false; |