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/util/EcoreValidator.java | |||
Method name: boolean equalTypeArguments(EList
|
Method name: boolean matchingTypeArguments(EList
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | for (int i = 0; i < size; ++i)↵ | 1 | for (int i = 0; i < size; ++i)↵ | |
2 | {↵ | 2 | {↵ | |
3 | EGenericType eTypeArgument1 = eTypeArguments1.get(i);↵ | 3 | EGenericType eTypeArgument1 = eTypeArguments1.get(i);↵ | |
4 | EGenericType eTypeArgument2 = eTypeArguments2.get(i);↵ | 4 | EGenericType eTypeArgument2 = eTypeArguments2.get(i);↵ | |
5 | if (!equalTypeArguments(eTypeArgument1, eTypeArgument2, substitutions))↵ | 5 | if (!isMatching(eTypeArgument1, eTypeArgument2, substitutions))↵ | |
6 | {↵ | 6 | {↵ | |
7 | return false;↵ | 7 | return false;↵ | |
8 | }↵ | 8 | }↵ | |
9 | }↵ | 9 | }↵ | |
10 | return true; | 10 |
| |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 15 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 4.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | for (int i = 0; i < size; ++i) | 4 | for (int i = 0; i < size; ++i) | |||||||||||||||||
5 | EGenericType eTypeArgument1 = eTypeArguments1.get(i); | 5 | EGenericType eTypeArgument1 = eTypeArguments1.get(i); | |||||||||||||||||
6 | EGenericType eTypeArgument2 = eTypeArguments2.get(i); | 6 | EGenericType eTypeArgument2 = eTypeArguments2.get(i); | |||||||||||||||||
7 | if (!equalTypeArguments(eTypeArgument1, eTypeArgument2, substitutions)) |
| 7 | if (!isMatching(eTypeArgument1, eTypeArgument2, substitutions)) | ||||||||||||||||
8 | return false; |
| 8 | return false; | ||||||||||||||||
9 | return true; |
| 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 isMatching(eTypeArgument1,eTypeArgument2,substitutions) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type java.util.Map<,> of variable substitutions does not match with type java.util.Map<,> of variable substitutions |
4 | Conditional return false; |
5 | Conditional return false; |
6 | Conditional return true; |
7 | Conditional return true; |