if (previous instanceof PluginClassDescriptor)
{
PluginClassDescriptor descriptor = (PluginClassDescriptor)previous;
EcorePlugin.INSTANCE.log
("Both '" + descriptor.element.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a package for '" + packageURI + "'");
}
if (previous instanceof PluginClassDescriptor)
{
PluginClassDescriptor descriptor = (PluginClassDescriptor)previous;
EcorePlugin.INSTANCE.log
("Both '" + descriptor.element.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a package for '" + packageURI + "'");
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/plugin/DynamicPackageRegistryReader.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/plugin/GeneratedPackageRegistryReader.java
|
Method name: boolean readElement(IConfigurationElement, boolean)
|
|
Method name: boolean readElement(IConfigurationElement, boolean)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (previous instanceof PluginClassDescriptor)↵ | | 1 | if (previous instanceof PluginClassDescriptor)↵
|
2 | {↵ | | 2 | {↵
|
3 | PluginClassDescriptor descriptor = (PluginClassDescriptor)previous;↵ | | 3 | PluginClassDescriptor descriptor = (PluginClassDescriptor)previous;↵
|
4 | EcorePlugin.INSTANCE.log↵ | | 4 | EcorePlugin.INSTANCE.log↵
|
5 | ("Both '" + descriptor.element.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a package for '" + packageURI + "'");↵ | | 5 | ("Both '" + descriptor.element.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a package for '" + packageURI + "'");↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
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) | 0.9 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
9 | if (previous instanceof PluginClassDescriptor) | | 9 | if (previous instanceof PluginClassDescriptor) |
10 | PluginClassDescriptor descriptor = (PluginClassDescriptor)previous; | | 10 | PluginClassDescriptor descriptor = (PluginClassDescriptor)previous; |
11 | EcorePlugin.INSTANCE.log("Both '" + descriptor.element.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a package for '" + packageURI + "'"); | | 11 | EcorePlugin.INSTANCE.log("Both '" + descriptor.element.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a package for '" + packageURI + "'"); |
Precondition Violations (0)
Row |
Violation |