File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/dialogs/ResourceDialog.java | File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/dialogs/ResourceDialog.java | |||
Method name: void normalizeStyle()
|
Method name: void normalizeStyle()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if ((style & SWT.MULTI) == 0 && (style & SWT.SINGLE) == 0)↵ | 1 | if ((style & SWT.OPEN) == 0 && (style & SWT.SAVE) == 0)↵ | |
2 | {↵ | 2 | {↵ | |
3 | style |= SWT.SINGLE;↵ | 3 | style |= SWT.OPEN;↵ | |
4 | }↵ | 4 | }↵ | |
5 | else if ((style & SWT.MULTI) != 0 && (style & SWT.SINGLE) != 0)↵ | 5 | else if ((style & SWT.OPEN) != 0 && (style & SWT.SAVE) != 0)↵ | |
6 | {↵ | 6 | {↵ | |
7 | throw new IllegalArgumentException("conflicting style bits specified (sWT.MUTLI and SWT.SINGLE)");↵ | 7 | throw new IllegalArgumentException("conflicting style bits specified (sWT.OPEN and SWT.SAVE)");↵ | |
8 | } | 8 |
| |
See real code fragment | See real code fragment |
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.9 |
Clones location | Clones are in the same method |
Number of node comparisons | 13 |
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) | 0.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if ((style & SWT.MULTI) == 0 && (style & SWT.SINGLE) == 0) |
| 7 | if ((style & SWT.OPEN) == 0 && (style & SWT.SAVE) == 0) | |||||||||||||
4 | style |= SWT.SINGLE; |
| 8 | style |= SWT.OPEN; | |||||||||||||
5 | else if ((style & SWT.MULTI) != 0 && (style & SWT.SINGLE) != 0) |
| 9 | else if ((style & SWT.OPEN) != 0 && (style & SWT.SAVE) != 0) | |||||||||||||
6 | throw new IllegalArgumentException("conflicting style bits specified (sWT.MUTLI and SWT.SINGLE)"); |
| 10 | throw new IllegalArgumentException("conflicting style bits specified (sWT.OPEN and SWT.SAVE)"); |
Row | Violation |
---|