File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/ChangeKind.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/namespace/SpaceType.java | |||
Method name: ChangeKind getByName(String)
|
Method name: SpaceType get(String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | for (int i = 0; i < VALUES_ARRAY.length; ++i)↵ | 1 | for (int i = 0; i < VALUES_ARRAY.length; ++i)↵ | |
2 | {↵ | 2 | {↵ | |
3 | ChangeKind result = VALUES_ARRAY[i];↵ | 3 | SpaceType result = VALUES_ARRAY[i];↵ | |
4 | if (result.getName().equals(name))↵ | 4 | if (result.toString().equals(literal))↵ | |
5 | {↵ | 5 | {↵ | |
6 | return result;↵ | 6 | return result;↵ | |
7 | }↵ | 7 | }↵ | |
8 | }↵ | 8 | }↵ | |
9 | return null; | 9 |
| |
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 in different classes having the same super class |
Number of node comparisons | 9 |
Number of mapped statements | 5 |
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) | 0.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | for (int i = 0; i < VALUES_ARRAY.length; ++i) | 1 | for (int i = 0; i < VALUES_ARRAY.length; ++i) | ||||||||||||||||
2 | ChangeKind result = VALUES_ARRAY[i]; | 2 | SpaceType result = VALUES_ARRAY[i]; | ||||||||||||||||
3 | if (result.getName().equals(name)) |
| 3 | if (result.toString().equals(literal)) | |||||||||||||||
4 | return result; | 4 | return result; | ||||||||||||||||
5 | return null; | 5 | return null; |
Row | Violation |
---|---|
1 | Expression result.getName() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression result.toString() cannot be parameterized, because it has dependencies to/from statements that will be extracted |