File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/menu/MenuXMLDecoder.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/menu/MenuXMLDecoder.java | |||
Method name: void parseMenu(ExtendableMenu, Element)
|
Method name: void extendMenu(ExtendableMenuBar, ExtendableMenu, Element, String)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | String id = menuElement.getAttributeValue(MenuXMLDecoder.ID);↵ | 1 | String id = menuElement.getAttributeValue(MenuXMLDecoder.ID);↵ | |
2 | AbstractColumbaAction action = getAction(id, mediator);↵ | 2 | AbstractColumbaAction action = getAction(id, mediator);↵ | |
3 | if (action == null)↵ | 3 | if (action == null)↵ | |
4 | continue;↵ | 4 | continue;↵ | |
5 | JRadioButtonMenuItem menuItem = new JRadioButtonMenuItem(action);↵ | 5 | JRadioButtonMenuItem menuItem = new JRadioButtonMenuItem(action);↵ | |
6 | menuItem.addMouseListener(mediator.getMouseTooltipHandler());↵ | 6 | menuItem.addMouseListener(mediator.getMouseTooltipHandler());↵ | |
7 | parentMenu.add(menuItem); | 7 | parentMenu.insert(menuItem, 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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 19 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 3.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||
---|---|---|---|---|---|---|---|---|---|---|
27 | String id = menuElement.getAttributeValue(MenuXMLDecoder.ID); | 32 | String id = menuElement.getAttributeValue(MenuXMLDecoder.ID); | |||||||
28 | AbstractColumbaAction action = getAction(id, mediator); | 33 | AbstractColumbaAction action = getAction(id, mediator); | |||||||
29 | if (action == null) | 34 | if (action == null) | |||||||
30 | continue; |
| 35 | continue; | ||||||
31 | JRadioButtonMenuItem menuItem = new JRadioButtonMenuItem(action); | 36 | JRadioButtonMenuItem menuItem = new JRadioButtonMenuItem(action); | |||||||
32 | menuItem.addMouseListener(mediator.getMouseTooltipHandler()); | 37 | menuItem.addMouseListener(mediator.getMouseTooltipHandler()); | |||||||
33 | parentMenu.add(menuItem); |
| | |||||||
|
| 38 | parentMenu.insert(menuItem, placeholderId); |
Row | Violation |
---|---|
1 | Statement continue; without innermost loop |
2 | Statement continue; without innermost loop |
3 | Unmatched statement parentMenu.add(menuItem); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement parentMenu.insert(menuItem,placeholderId); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |