this.adapterFactory = adapterFactory;
if (adapterFactory instanceof IChangeNotifier)
{
((IChangeNotifier)adapterFactory).addListener(this);
}
labelProviderListeners = new ArrayList<ILabelProviderListener>();
this.adapterFactory = adapterFactory;
if (adapterFactory instanceof IChangeNotifier)
{
((IChangeNotifier)adapterFactory).addListener(this);
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/AdapterFactoryLabelProvider.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/AdapterFactoryContentProvider.java
|
Method name: void AdapterFactoryLabelProvider(AdapterFactory)
|
|
Method name: void AdapterFactoryContentProvider(AdapterFactory)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 3
|
|
1 | this.adapterFactory = adapterFactory;↵ | | 1 | this.adapterFactory = adapterFactory;↵
|
|
2 | if (adapterFactory instanceof IChangeNotifier)↵ | | 2 | if (adapterFactory instanceof IChangeNotifier)↵
|
3 | {↵ | | 3 | {↵
|
4 | ((IChangeNotifier)adapterFactory).addListener(this);↵ | | 4 | ((IChangeNotifier)adapterFactory).addListener(this);↵
|
5 | }↵ | | 5 | }
|
|
6 | labelProviderListeners = new ArrayList<ILabelProviderListener>(); | | | |
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 |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.4 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | this.adapterFactory = adapterFactory; | | 1 | this.adapterFactory = adapterFactory; |
2 | if (adapterFactory instanceof IChangeNotifier) | | 2 | if (adapterFactory instanceof IChangeNotifier) |
3 | ((IChangeNotifier)adapterFactory).addListener(this); | | 3 | ((IChangeNotifier)adapterFactory).addListener(this); |
4 | labelProviderListeners = new ArrayList<ILabelProviderListener>(); | | | |
Precondition Violations (0)
Row |
Violation |