File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/JMeterMenuBar.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/ReportMenuBar.java | |||
Method name: void setEditRemoveEnabled(boolean)
|
Method name: void setEditRemoveEnabled(boolean)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | edit_remove.setEnabled(enabled);↵ | 1 | edit_remove.setEnabled(enabled);↵ | |
2 | // If we are enabling the Edit-->Remove menu item, then we also need to↵ | 2 | // If we are enabling the Edit-->Remove menu item, then we also need to↵ | |
3 | // enable the Edit menu. The Edit menu may already be enabled, but↵ | 3 | // enable the Edit menu. The Edit menu may already be enabled, but↵ | |
4 | // there's no harm it trying to enable it again.↵ | 4 | // there's no harm it trying to enable it again.↵ | |
5 | if (enabled) {↵ | 5 | if (enabled) {↵ | |
6 | setEditEnabled(true);↵ | 6 | setEditEnabled(true);↵ | |
7 | } else {↵ | 7 | } else {↵ | |
8 | // If we are disabling the Edit-->Remove menu item and the↵ | 8 | // If we are disabling the Edit-->Remove menu item and the↵ | |
9 | // Edit-->Add menu item is disabled, then we also need to disable↵ | 9 | // Edit-->Add menu item is disabled, then we also need to disable↵ | |
10 | // the Edit menu.↵ | 10 | // the Edit menu.↵ | |
11 | // The Java Look and Feel Guidelines say to disable a menu if all↵ | 11 | // The Java Look and Feel Guidelines say to disable a menu if all↵ | |
12 | // menu items are disabled.↵ | 12 | // menu items are disabled.↵ | |
13 | if (!edit_add.isEnabled()) {↵ | 13 | if (!edit_add.isEnabled()) {↵ | |
14 | editMenu.setEnabled(false);↵ | 14 | editMenu.setEnabled(false);↵ | |
15 | }↵ | 15 | }↵ | |
16 | } | 16 |
| |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 9 |
Number of mapped statements | 5 |
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.7 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | edit_remove.setEnabled(enabled); | 1 | edit_remove.setEnabled(enabled); | |
2 | if (enabled) | 2 | if (enabled) | |
3 | setEditEnabled(true); | 3 | setEditEnabled(true); | |
else | else | |||
4 | if (!edit_add.isEnabled()) | 4 | if (!edit_add.isEnabled()) | |
5 | editMenu.setEnabled(false); | 5 | editMenu.setEnabled(false); |
Row | Violation |
---|