File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/ExtendedImageRegistry.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/MappingDomainLabelProvider.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (that instanceof URLImageDescriptor)↵ | 1 | if (object instanceof ↵ | |
2 | {↵ | |||
3 | URLImageDescriptor otherURLImageDescriptor = (URLImageDescriptor)that;↵ | |||
4 | return ↵ | |||
5 | url.equals(otherURLImageDescriptor.url) &&↵ | |||
6 | (key1 == null ? otherURLImageDescriptor.key1 == null : key1.equals(otherURLImageDescriptor.key1)) &&↵ | |||
7 | (key2 == null ? otherURLImageDescriptor.key2 == null : key2.equals(otherURLImageDescriptor.key2));↵ | |||
2 | MappingIndicatorCompositeImage)↵ | |||
3 | {↵ | |||
4 | MappingIndicatorCompositeImage that = (MappingIndicatorCompositeImage)object;↵ | |||
5 | return that.mainImage == mainImage && that.overlayImage == overlayImage;↵ | |||
8 | }↵ | 6 | }↵ | |
9 | else↵ | 7 | else↵ | |
10 | {↵ | 8 | ↵ | |
9 | {↵ | |||
11 | return false;↵ | 10 | return false;↵ | |
12 | } | 11 | } | |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 16 |
Number of mapped statements | 4 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (that instanceof URLImageDescriptor) |
| 1 | if (object instanceof MappingIndicatorCompositeImage) | ||||||||||||||||||||||
2 | URLImageDescriptor otherURLImageDescriptor = (URLImageDescriptor)that; |
| 2 | MappingIndicatorCompositeImage that = (MappingIndicatorCompositeImage)object; | ||||||||||||||||||||||
3 | return url.equals(otherURLImageDescriptor.url) && (key1 == null ? otherURLImageDescriptor.key1 == null : key1.equals(otherURLImageDescriptor.key1)) && (key2 == null ? otherURLImageDescriptor.key2 == null : key2.equals(otherURLImageDescriptor.key2)); |
| 3 | return that.mainImage == mainImage && that.overlayImage == overlayImage; | ||||||||||||||||||||||
else | else | |||||||||||||||||||||||||
4 | return false; | 4 | return false; |
Row | Violation |
---|---|
1 | Expression url.equals(otherURLImageDescriptor.url) && (key1 == null ? otherURLImageDescriptor.key1 == null : key1.equals(otherURLImageDescriptor.key1)) && (key2 == null ? otherURLImageDescriptor.key2 == null : key2.equals(otherURLImageDescriptor.key2)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression that.mainImage == mainImage && that.overlayImage == overlayImage cannot be parameterized, because it has dependencies to/from statements that will be extracted |