File path: /emf-2.4.1/src/org/eclipse/emf/mapping/command/RemoveOverrideCommand.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/command/SetOverrideCommand.java | |||
Method name: void execute()
|
Method name: void execute()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (outputs.size() == 1 && outputs.iterator().next() == object)↵ | 1 | if (outputs.size() == 1 && outputs.iterator().next() == object)↵ | |
2 | {↵ | 2 | {↵ | |
3 | commandList.add(RemoveMappingCommand.create(mappingDomain, mapping));↵ | 3 | subcommands.append(RemoveMappingCommand.create(mappingDomain, mapping));↵ | |
4 | }↵ | 4 | }↵ | |
5 | else↵ | 5 | else↵ | |
6 | {↵ | 6 | {↵ | |
7 | //commandList.add↵ | 7 | subcommands.append(↵ | |
8 | (RemoveCommand.create(mappingDomain, mapping, mapping.ePackageMapping().getMapping_Outputs(), object));↵ | 8 | //(RemoveCommand.create(mappingDomain, mapping, mapping.ePackageMapping().getMapping_Outputs(), object)));↵ | |
9 | commandList.add(RemoveCommand.create(mappingDomain, mapping, MappingPackage.eINSTANCE.getMapping_Outputs(), object));↵ | 9 | (RemoveCommand.create(mappingDomain, mapping, MappingPackage.eINSTANCE.getMapping_Outputs(), object)));↵ | |
10 | } | 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.9 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 11 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 40.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
9 | if (outputs.size() == 1 && outputs.iterator().next() == object) | 10 | if (outputs.size() == 1 && outputs.iterator().next() == object) | |||||
10 | commandList.add(RemoveMappingCommand.create(mappingDomain, mapping)); |
| | |||||
else | | |||||||
11 | commandList.add(RemoveCommand.create(mappingDomain, mapping, MappingPackage.eINSTANCE.getMapping_Outputs(), object)); |
| | |||||
|
| 12 | subcommands.append((RemoveCommand.create(mappingDomain, mapping, MappingPackage.eINSTANCE.getMapping_Outputs(), object))); | |||||
|
| 11 | subcommands.append(RemoveMappingCommand.create(mappingDomain, mapping)); |
Row | Violation |
---|---|
1 | Unmatched statement commandList.add(RemoveMappingCommand.create(mappingDomain,mapping)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement commandList.add(RemoveCommand.create(mappingDomain,mapping,MappingPackage.eINSTANCE.getMapping_Outputs(),object)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement subcommands.append((RemoveCommand.create(mappingDomain,mapping,MappingPackage.eINSTANCE.getMapping_Outputs(),object))); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement subcommands.append((RemoveCommand.create(mappingDomain,mapping,MappingPackage.eINSTANCE.getMapping_Outputs(),object))); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
5 | Unmatched statement subcommands.append(RemoveMappingCommand.create(mappingDomain,mapping)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Unmatched statement subcommands.append(RemoveMappingCommand.create(mappingDomain,mapping)); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
7 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |