File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/ExtendedFontRegistry.java | File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/ExtendedColorRegistry.java | |||
Method name: Font getFont(Font, Object)
|
Method name: Color getColor(Color, Color, Object)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | FontDescriptor fontDescriptor = (FontDescriptor)object;↵ | 1 | ColorDescriptor colorDescriptor = (ColorDescriptor)object;↵ | |
2 | try↵ | 2 | try↵ | |
3 | {↵ | 3 | {↵ | |
4 | result = fontDescriptor.createFont(display);↵ | 4 | result = colorDescriptor.createColor(display);↵ | |
5 | }↵ | 5 | }↵ | |
6 | catch (DeviceResourceException exception)↵ | 6 | catch (DeviceResourceException exception)↵ | |
7 | {↵ | 7 | {↵ | |
8 | EMFEditUIPlugin.INSTANCE.log(exception);↵ | 8 | EMFEditUIPlugin.INSTANCE.log(exception);↵ | |
9 | } | 9 |
| |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
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.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9 | FontDescriptor fontDescriptor = (FontDescriptor)object; |
| 10 | ColorDescriptor colorDescriptor = (ColorDescriptor)object; | |||||||||||||||||||||
10 | try | 11 | try | ||||||||||||||||||||||
11 | result = fontDescriptor.createFont(display); |
| 12 | result = colorDescriptor.createColor(display); |
Row | Violation |
---|---|
1 | Expression fontDescriptor.createFont(display) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression colorDescriptor.createColor(display) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variable result with type org.eclipse.swt.graphics.Font , while Clone fragment #2 returns variable result with type org.eclipse.swt.graphics.Color |