File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ItemProviderAdapter.java | File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ItemProviderAdapter.java | |||
Method name: Command createCommand(Object, EditingDomain, Class extends Command>, CommandParameter)
|
Method name: Command createCommand(Object, EditingDomain, Class extends Command>, CommandParameter)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (commandParameter.getEStructuralFeature() != null)↵ | 1 | if (commandParameter.getEStructuralFeature() != null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | result = ↵ | 3 | result = ↵ | |
4 | createAddCommand↵ | 4 | createMoveCommand↵ | |
5 | (domain, ↵ | 5 | (domain, ↵ | |
6 | commandParameter.getEOwner(), ↵ | 6 | commandParameter.getEOwner(), ↵ | |
7 | commandParameter.getEStructuralFeature(), ↵ | 7 | commandParameter.getEStructuralFeature(), ↵ | |
8 | commandParameter.getCollection(),↵ | 8 | commandParameter.getValue(), ↵ | |
9 | commandParameter.getIndex());↵ | 9 | commandParameter.getIndex());↵ | |
10 | }↵ | 10 | }↵ | |
11 | else↵ | 11 | else↵ | |
12 | {↵ | 12 | {↵ | |
13 | result = factorAddCommand(domain, commandParameter);↵ | 13 | result = factorMoveCommand(domain, commandParameter);↵ | |
14 | } | 14 |
| |
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 the same method |
Number of node comparisons | 10 |
Number of mapped statements | 3 |
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.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17 | if (commandParameter.getEStructuralFeature() != null) | 21 | if (commandParameter.getEStructuralFeature() != null) | ||||||||||||||||||||||
18 | result = createAddCommand(domain, commandParameter.getEOwner(), commandParameter.getEStructuralFeature(), commandParameter.getCollection(), commandParameter.getIndex()); |
| 22 | result = createMoveCommand(domain, commandParameter.getEOwner(), commandParameter.getEStructuralFeature(), commandParameter.getValue(), commandParameter.getIndex()); | |||||||||||||||||||||
else | else | ||||||||||||||||||||||||
19 | result = factorAddCommand(domain, commandParameter); |
| 23 | result = factorMoveCommand(domain, commandParameter); |
Row | Violation |
---|---|
1 | Expression createAddCommand(domain,commandParameter.getEOwner(),commandParameter.getEStructuralFeature(),commandParameter.getCollection(),commandParameter.getIndex()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression createMoveCommand(domain,commandParameter.getEOwner(),commandParameter.getEStructuralFeature(),commandParameter.getValue(),commandParameter.getIndex()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression commandParameter.getCollection() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression commandParameter.getValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type java.util.Collection<> of variable commandParameter.getCollection() does not match with type java.lang.Object of variable commandParameter.getValue() |
6 | Expression factorAddCommand(domain,commandParameter) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression factorMoveCommand(domain,commandParameter) cannot be parameterized, because it has dependencies to/from statements that will be extracted |