File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/menu/MenuXMLDecoder.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folderoptions/ColumnOptionsPlugin.java | |||
Method name: ExtendableMenuBar createMenuBar(InputStream)
|
Method name: void saveOptionsToXml(IMailbox)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 7 | |||
1 | if (menuElement.getName().equals(MenuXMLDecoder.MENU)) {↵ | |||
1 | TableColumn tc = (TableColumn) enumeration.nextElement();↵ | |||
2 | String menuId = menuElement↵ | 2 | String ↵ | |
3 | .getAttributeValue(MenuXMLDecoder.ID);↵ | |||
4 | String menuName = mediator.getString("menu", "mainframe",↵ | |||
5 | menuId);↵ | |||
6 | ExtendableMenu menu = new ExtendableMenu(menuId, menuName);↵ | |||
7 | parseMenu(menu, menuElement↵ | 3 | name = (String) tc.getHeaderValue();↵ | |
4 | XmlElement column = new XmlElement("column");↵ | |||
5 | column.addAttribute("name", name);↵ | |||
6 | // save width↵ | |||
7 | int size = tc.getWidth();↵ | |||
8 | );↵ | 8 | column.addAttribute("width", Integer.toString(size));↵ | |
9 | menuBar.add(menu);↵ | 9 | ↵ | |
10 | } | 10 |
| |
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 36 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 6 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 8 | TableColumn tc = (TableColumn)enumeration.nextElement(); | |||||||||||||||
11 | String menuId = menuElement.getAttributeValue(MenuXMLDecoder.ID); |
| 9 | String name = (String)tc.getHeaderValue(); | ||||||||||||||
|
| 10 | XmlElement column = new XmlElement("column"); | |||||||||||||||
|
| 11 | column.addAttribute("name", name); | |||||||||||||||
| 12 | int size = tc.getWidth(); | ||||||||||||||||
12 | String menuName = mediator.getString("menu", "mainframe", menuId); |
| | |||||||||||||||
|
| 13 | column.addAttribute("width", Integer.toString(size)); | |||||||||||||||
13 | ExtendableMenu menu = new ExtendableMenu(menuId, menuName); |
| | |||||||||||||||
|
| 14 | columns.addElement(column); | |||||||||||||||
14 | parseMenu(menu, menuElement); |
| | |||||||||||||||
15 | menuBar.add(menu); |
| |
Row | Violation |
---|---|
1 | Unmatched statement TableColumn tc=(TableColumn)enumeration.nextElement(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression (String)tc.getHeaderValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement XmlElement column=new XmlElement("column"); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement column.addAttribute("name",name); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement String menuName=mediator.getString("menu","mainframe",menuId); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement column.addAttribute("width",Integer.toString(size)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | Unmatched statement ExtendableMenu menu=new ExtendableMenu(menuId,menuName); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched statement columns.addElement(column); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
9 | Unmatched statement parseMenu(menu,menuElement); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
10 | Unmatched statement menuBar.add(menu); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |