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);
StreamableMimePart textPart = composeTextMimePart(appendSignature); // compose html part StreamableMimePart htmlPart = composeHtmlMimePart(appendSignature); // merge mimeparts and return LocalMimePart bodyPart = new LocalMimePart(new MimeHeader("multipart", "alternative")); bodyPart.addChild(textPart); bodyPart.addChild(htmlPart); return bodyPart;
Clone fragments detected by clone detection tool
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;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons30
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment4
    Number of unmapped statements in the second code fragment5
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    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;
    Preondition Violations
    Unmatched return bodyPart;
    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);
    13
    ExtendableMenu menu = new ExtendableMenu(menuId, menuName);
    Preondition Violations
    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
                                                                                                                            
    14
    parseMenu(menu, menuElement);
    14
    parseMenu(menu, menuElement);
    5
    bodyPart.addChild(htmlPart);
    Differences
    Expression1Expression2Difference
    parseMenuaddChildMETHOD_INVOCATION_NAME_MISMATCH
    parseMenu(menu,menuElement)bodyPart.addChild(htmlPart)ARGUMENT_NUMBER_MISMATCH
    bodyPartMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression parseMenu(menu,menuElement) is a void method call, and thus it cannot be parameterized
    Expression bodyPart.addChild(htmlPart) is a void method call, and thus it cannot be parameterized
    Expression parseMenu(menu,menuElement) is a void method call, and thus it cannot be parameterized
    Expression bodyPart.addChild(htmlPart) is a void method call, and thus it cannot be parameterized
    5
    bodyPart.addChild(htmlPart);
    15
    menuBar.add(menu);
    15
    menuBar.add(menu);
    Preondition Violations
    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
                                                
    Precondition Violations (7)
    Row Violation
    1Unmatched return bodyPart;
    2Unmatched 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
    3Expression parseMenu(menu,menuElement) is a void method call, and thus it cannot be parameterized
    4Expression bodyPart.addChild(htmlPart) is a void method call, and thus it cannot be parameterized
    5Expression parseMenu(menu,menuElement) is a void method call, and thus it cannot be parameterized
    6Expression bodyPart.addChild(htmlPart) is a void method call, and thus it cannot be parameterized
    7Unmatched statement menuBar.add(menu); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted