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 extendMenu(ExtendableMenuBar, ExtendableMenu, Element, String)
|
Method name: void extendMenu(ExtendableMenuBar, ExtendableMenu, Element, String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (action == null)↵ | 1 | if (action == null)↵ | |
2 | continue;↵ | 2 | continue;↵ | |
3 | CMenuItem menuItem = new CMenuItem(action);↵ | 3 | CCheckBoxMenuItem menuItem = new CCheckBoxMenuItem(action);↵ | |
4 | menuItem.addMouseListener(mediator.getMouseTooltipHandler());↵ | 4 | menuItem.addMouseListener(mediator.getMouseTooltipHandler());↵ | |
5 | parentMenu.insert(menuItem, placeholderId); | 5 |
| |
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 in the same method |
Number of node comparisons | 11 |
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) | 80.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18 | if (action == null) |
| 26 | if (action == null) | ||||||||||||||||||||
19 | continue; |
| 27 | continue; | ||||||||||||||||||||
20 | CMenuItem menuItem = new CMenuItem(action); |
| 28 | CCheckBoxMenuItem menuItem = new CCheckBoxMenuItem(action); | ||||||||||||||||||||
21 | menuItem.addMouseListener(mediator.getMouseTooltipHandler()); |
| 29 | menuItem.addMouseListener(mediator.getMouseTooltipHandler()); | ||||||||||||||||||||
22 | parentMenu.insert(menuItem, placeholderId); |
| 30 | parentMenu.insert(menuItem, placeholderId); |
Row | Violation |
---|---|
1 | Statement continue; without innermost loop |
2 | Statement continue; without innermost loop |
3 | Expression new CMenuItem(action) cannot be parameterized, because it has dependencies to/from statements that will be extracted |