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/composer/MessageComposer.java | |||
Method name: ExtendableMenuBar createMenuBar(InputStream)
|
Method name: StreamableMimePart composeMultipartAlternativeMimePart(boolean)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 6 | |||
1 | String menuId = menuElement↵ | 1 | Str↵ | |
2 | .getAttributeValue(MenuXMLDecoder.ID);↵ | |||
3 | String menuName = mediator.getString("menu", "mainframe",↵ | |||
4 | menuId);↵ | |||
5 | ExtendableMenu menu = new ExtendableMenu(menuId, menuName);↵ | |||
6 | parseMenu(menu, menuElement);↵ | |||
7 | menuB↵ | 2 | eamableMimePart textPart = composeTextMimePart(appendSignature);↵ | |
3 | // compose html part↵ | |||
4 | StreamableMimePart htmlPart = composeHtmlMimePart(appendSignature);↵ | |||
5 | // merge mimeparts and return↵ | |||
6 | LocalMimePart bodyPart = new LocalMimePart(new MimeHeader("multipart",↵ | |||
7 | "alternative"));↵ | |||
8 | bodyPart.addChild(textPart);↵ | |||
8 | ar.add(menu)↵ | 9 | bodyPart.addChild(htmlPart);↵ | |
9 | ; | 10 | return bodyPart; | |
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 | 30 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | StreamableMimePart textPart = composeTextMimePart(appendSignature); | ||||||||||||||||||||||
| 2 | StreamableMimePart htmlPart = composeHtmlMimePart(appendSignature); | ||||||||||||||||||||||
| 3 | LocalMimePart bodyPart = new LocalMimePart(new MimeHeader("multipart", "alternative")); | ||||||||||||||||||||||
| 4 | bodyPart.addChild(textPart); | ||||||||||||||||||||||
|
| 6 | return bodyPart; | |||||||||||||||||||||
11 | String menuId = menuElement.getAttributeValue(MenuXMLDecoder.ID); | | ||||||||||||||||||||||
12 | String menuName = mediator.getString("menu", "mainframe", menuId); | | ||||||||||||||||||||||
13 | ExtendableMenu menu = new ExtendableMenu(menuId, menuName); |
| | |||||||||||||||||||||
14 | parseMenu(menu, menuElement); |
| 5 | bodyPart.addChild(htmlPart); | ||||||||||||||||||||
15 | menuBar.add(menu); |
| |
Row | Violation |
---|---|
1 | Unmatched return bodyPart; |
2 | 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 |
3 | Expression parseMenu(menu,menuElement) is a void method call, and thus it cannot be parameterized |
4 | Expression bodyPart.addChild(htmlPart) is a void method call, and thus it cannot be parameterized |
5 | Expression parseMenu(menu,menuElement) is a void method call, and thus it cannot be parameterized |
6 | Expression bodyPart.addChild(htmlPart) is a void method call, and thus it cannot be parameterized |
7 | Unmatched statement menuBar.add(menu); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |