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 isBounded(EGenericType, EGenericType, Map extends ETypeParameter,? extends EGenericType>)
|
Method name: boolean isMatching(EGenericType, EGenericType, Map extends ETypeParameter,? extends EGenericType>)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | EGenericType eBoundELowerBound = eBound.getELowerBound();↵ | 1 | EGenericType eBoundELowerBound = eBound.getELowerBound();↵ | |
2 | if (eBoundELowerBound != null)↵ | 2 | if (eBoundELowerBound != null)↵ | |
3 | {↵ | 3 | ↵ | |
4 | {↵ | |||
4 | // If there is an lower bound, the type argument must bound it.↵ | 5 | // ↵ | |
6 | Reverse the test.↵ | |||
5 | //↵ | 7 | //↵ | |
6 | return isBounded(eBoundELowerBound, eGenericType, substitutions);↵ | 8 | return isMatching(eBoundELowerBound, eGenericType, substitutions);↵ | |
7 | }↵ | 9 | }↵ | |
8 | ↵ | 10 | ↵ | |
11 | ↵ | |||
9 | // The bound is a wildcard with no constraints.↵ | 12 | // The bound is a wildcard with no constraints.↵ | |
10 | //↵ | 13 | //↵ | |
11 | return false; | 14 | return true; | |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 4 |
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) | 1.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
77 | EGenericType eBoundELowerBound = eBound.getELowerBound(); | 30 | EGenericType eBoundELowerBound = eBound.getELowerBound(); | |||||||||||||||||
78 | if (eBoundELowerBound != null) | 31 | if (eBoundELowerBound != null) | |||||||||||||||||
79 | return isBounded(eBoundELowerBound, eGenericType, substitutions); |
| 32 | return isMatching(eBoundELowerBound, eGenericType, substitutions); | ||||||||||||||||
80 | return false; |
| 33 | return true; |
Row | Violation |
---|---|
1 | Expression isBounded(eBoundELowerBound,eGenericType,substitutions) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression isMatching(eBoundELowerBound,eGenericType,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 true; |