File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/menu/ExtendableMenuBar.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/menu/ExtendableMenuBar.java | |||
Method name: void insertMenuItem(String, String, JMenuItem)
|
Method name: void insertAction(String, String, AbstractColumbaAction)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if ( menuId == null ) throw new IllegalArgumentException("menuId == null");↵ | 1 | if ( menuId == null ) throw new IllegalArgumentException("menuId == null");↵ | |
2 | ↵ | 2 | ↵ | |
3 | if (map.containsKey(menuId) == false)↵ | 3 | if (map.containsKey(menuId) == false)↵ | |
4 | throw new IllegalArgumentException("no menu with id " + menuId↵ | 4 | throw new IllegalArgumentException("no menu with id " + menuId↵ | |
5 | + " found");↵ | 5 | + " found");↵ | |
6 | ExtendableMenu menu = (ExtendableMenu) map.get(menuId);↵ | 6 | ExtendableMenu menu = (ExtendableMenu) map.get(menuId);↵ | |
7 | menu.insert(menuItem, placeholderId); | 7 | menu.insert(action, placeholderId); | |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 17 |
Number of mapped statements | 6 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (menuId == null) | 1 | if (menuId == null) | |||||||||||||||
2 | throw new IllegalArgumentException("menuId == null"); | 2 | throw new IllegalArgumentException("menuId == null"); | |||||||||||||||
3 | if (map.containsKey(menuId) == false) | 3 | if (map.containsKey(menuId) == false) | |||||||||||||||
4 | throw new IllegalArgumentException("no menu with id " + menuId + " found"); | 4 | throw new IllegalArgumentException("no menu with id " + menuId + " found"); | |||||||||||||||
5 | ExtendableMenu menu = (ExtendableMenu)map.get(menuId); | 5 | ExtendableMenu menu = (ExtendableMenu)map.get(menuId); | |||||||||||||||
6 | menu.insert(menuItem, placeholderId); |
| 6 | menu.insert(action, placeholderId); |
Row | Violation |
---|---|
1 | Type javax.swing.JMenuItem of variable menuItem does not match with type org.columba.core.gui.action.AbstractColumbaAction of variable action |