File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/mainframe/MainFrameMenuBar.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/mainframe/MainFrameMenuBar.java | |||
Method name: void addToMenu(int, Component)
|
Method name: void addToMenu(int, Action)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | if (comp == null)↵ | 1 | if (action == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | throw new IllegalArgumentException("Component == null");↵ | 3 | throw new IllegalArgumentException("Null Action passed");↵ | |
4 | }↵ | 4 | }↵ | |
5 | switch (menuId)↵ | 5 | switch (menuId)↵ | |
6 | {↵ | 6 | {↵ | |
7 | case IMenuIDs.PLUGINS_MENU :↵ | 7 | case IMenuIDs.PLUGINS_MENU :↵ | |
8 | {↵ | 8 | {↵ | |
9 | _pluginsMenu.add(comp);↵ | 9 | _pluginsMenu.add(action);↵ | |
10 | break;↵ | 10 | break;↵ | |
11 | }↵ | 11 | }↵ | |
12 | case IMenuIDs.SESSION_MENU :↵ | 12 | case IMenuIDs.SESSION_MENU :↵ | |
13 | {↵ | 13 | {↵ | |
14 | _sessionMenu.add(comp);↵ | 14 | _sessionMenu.add(action);↵ | |
15 | break;↵ | 15 | break;↵ | |
16 | }↵ | 16 | }↵ | |
17 | default :↵ | 17 | default :↵ | |
18 | {↵ | 18 | {↵ | |
19 | throw new IllegalArgumentException("Invalid menuId passed: " + menuId);↵ | 19 | throw new IllegalArgumentException("Invalid menuId passed: " + menuId);↵ | |
20 | }↵ | 20 | }↵ | |
21 | } | 21 |
| |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 50 |
Number of mapped statements | 11 |
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) | 3.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (comp == null) |
| 1 | if (action == null) | ||||||||||||||
2 | throw new IllegalArgumentException("Component == null"); |
| 2 | throw new IllegalArgumentException("Null Action passed"); | ||||||||||||||
3 | switch (menuId) | 3 | switch (menuId) | |||||||||||||||
4 | case IMenuIDs.PLUGINS_MENU: | 4 | case IMenuIDs.PLUGINS_MENU: | |||||||||||||||
5 | _pluginsMenu.add(comp); |
| 5 | _pluginsMenu.add(action); | ||||||||||||||
6 | break; | 6 | break; | |||||||||||||||
7 | case IMenuIDs.SESSION_MENU: | 7 | case IMenuIDs.SESSION_MENU: | |||||||||||||||
8 | _sessionMenu.add(comp); |
| 8 | _sessionMenu.add(action); | ||||||||||||||
9 | break; | 9 | break; | |||||||||||||||
10 | default: | 10 | default: | |||||||||||||||
11 | throw new IllegalArgumentException("Invalid menuId passed: " + menuId); | 11 | throw new IllegalArgumentException("Invalid menuId passed: " + menuId); |
Row | Violation |
---|---|
1 | Type java.awt.Component of variable comp does not match with type javax.swing.Action of variable action |
2 | Type java.awt.Component of variable comp does not match with type javax.swing.Action of variable action |
3 | Type java.awt.Component of variable comp does not match with type javax.swing.Action of variable action |