ICalendarItem item = (ICalendarItem) model.getElement(i);
String calendarId = item.getId();
boolean selected = item.isSelected();
Category category = CategoryDepository.getCategory(calendarId);
if (category == null)
continue;
category.setPropertyDeep(Category.PROP_IS_HIDDEN, Boolean
.valueOf(!selected), Boolean.TRUE);
if (menuElement.getName().equals(MenuXMLDecoder.MENU)) {
String menuId = menuElement
.getAttributeValue(MenuXMLDecoder.ID);
String menuName = mediator.getString("menu", "mainframe",
menuId);
ExtendableMenu menu = new ExtendableMenu(menuId, menuName);
parseMenu(menu, menuElement);
menuBar.add(menu);
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/list/CalendarListController.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/menu/MenuXMLDecoder.java
|
Method name: void handleEvent(MouseEvent)
|
|
Method name: ExtendableMenuBar createMenuBar(InputStream)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 6
|
|
1 | ICalendarItem item = (ICalendarItem) model.getElement(i);↵ | | |
|
2 | String calendarId = item.getId();↵ | | |
|
3 | boolean selected = item.isSelected();↵ | | |
|
|
4 | Category category = CategoryDeposi↵ | | 1 | if (menuElement.getName().equals(MenuXMLDecoder.MENU)) {↵
|
|
| | | 2 | String menuId = menuElement↵
|
| | | 3 | .getAttributeValue(MenuXMLDecoder.ID);↵
|
|
5 | tory.getCategory(calendar↵ | | 4 | String menuName = mediator.getString("menu", "mainframe",↵
|
6 | Id);↵ | | 5 | menuId);↵
|
|
7 | if (category == null)↵ | | 6 | ↵
|
8 | continue;↵ | | 7 | ExtendableMenu menu = new ExtendableMenu(menuId, menuName);↵
|
|
9 | category.setPropertyDeep(Category.PROP_IS_HIDDEN, Boolean↵ | | 8 | ↵
|
10 | .valueOf(!selected), Boolean.TRUE); | | 9 | parseMenu(menu, menuElement);↵
|
| | | 10 | menuBar.add(menu);↵
|
| | | 11 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |