for (IItemPropertyDescriptor descriptor : getPropertyDescriptors(object))
{
if (propertyId.equals(descriptor.getId(object)) || propertyId.equals(descriptor.getFeature(object)))
{
return descriptor;
}
}
return null;
for (EReference eReference : getChildrenReferences(object))
{
// If this object is compatible with this reference...
//
if (isValidValue(object, child, eReference))
{
return eReference;
}
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/WrapperItemProvider.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ItemProviderAdapter.java
|
Method name: IItemPropertyDescriptor getPropertyDescriptor(Object, Object)
|
|
Method name: EReference getChildReference(Object, Object)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 3
|
|
1 | for (IItemPropertyDescriptor descriptor : getPropertyDescriptors(object))↵ | | 1 | for (EReference eReference : getChildrenReferences(object))↵
|
2 | {↵ | | 2 | {↵
|
3 | if (propertyId.equals(descriptor.getId(object)) || propertyId.equals(descriptor.getFeature(object)↵ | | 3 | // If this object is compatible with this reference...↵
|
| | | 4 | //↵
|
4 | ))↵ | | 5 | if (isValidValue(object, child, eReference))↵
|
5 | {↵ | | 6 | {↵
|
6 | return descriptor;↵ | | 7 | return eReference;↵
|
7 | }↵ | | 8 | ↵
|
8 | }↵ | | 9 | }↵
|
9 | return null; | | 10 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
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 | 1 |