XmlElement html = composerOptions.getElement("html"); if (html == null) { html = composerOptions.addSubElement("html"); } String multipart = html.getAttribute("send_as_multipart", "true");
XmlElement htmlElement = optionsElement.getElement("html"); // create html element, if it doesn't exist if (htmlElement == null) { htmlElement = optionsElement.addSubElement("html"); } // get enable attribute String enableHtml = htmlElement.getAttribute("enable", "false");
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/composer/MessageComposer.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/composer/MessageBuilderHelper.java
Method name: SendableMessage compose(IWorkerStatusController, boolean) Method name: boolean isHTMLEnabled()
Number of AST nodes: 4 Number of AST nodes: 4
1
XmlElement html = composerOptions.getElement("html");
1
XmlElement html
2
	
2
Element = optionsElement.getElement("html");
3
		// create html element, if it doesn't exist
3
		if (html == null) {
4
		if (htmlElement == null) {
4
				html = composerOptions.addSubElement("html");
5
			htmlElement = optionsElement.addSubElement("html");
5
			}
6
		}
6
			String multipart = html
7
		// get enable attribute
7
.getAttribute("send_as_multipart", "true");
8
		String enableHtml = htmlElement.getAttribute("enable", "false");
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons8
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    15
    XmlElement html = composerOptions.getElement("html");
    15
    XmlElement html = composerOptions.getElement("html");
    4
    XmlElement htmlElement = optionsElement.getElement("html");
    Differences
    Expression1Expression2Difference
    htmlhtmlElementVARIABLE_NAME_MISMATCH
    composerOptionsoptionsElementVARIABLE_NAME_MISMATCH
    4
    XmlElement htmlElement = optionsElement.getElement("html");
    16
    if (html == null)
    16
    if (html == null)
    5
    if (htmlElement == null)
    Differences
    Expression1Expression2Difference
    htmlhtmlElementVARIABLE_NAME_MISMATCH
    5
    if (htmlElement == null)
    17
    html = composerOptions.addSubElement("html");
    17
    html = composerOptions.addSubElement("html");
    6
    htmlElement = optionsElement.addSubElement("html");
    Differences
    Expression1Expression2Difference
    htmlhtmlElementVARIABLE_NAME_MISMATCH
    composerOptionsoptionsElementVARIABLE_NAME_MISMATCH
    6
    htmlElement = optionsElement.addSubElement("html");
    18
    String multipart = html.getAttribute("send_as_multipart", "true");
    18
    String multipart = html.getAttribute("send_as_multipart", "true");
    7
    String enableHtml = htmlElement.getAttribute("enable", "false");
    Differences
    Expression1Expression2Difference
    multipartenableHtmlVARIABLE_NAME_MISMATCH
    "send_as_multipart""enable"LITERAL_VALUE_MISMATCH
    "true""false"LITERAL_VALUE_MISMATCH
    htmlhtmlElementVARIABLE_NAME_MISMATCH
    7
    String enableHtml = htmlElement.getAttribute("enable", "false");
    Precondition Violations (0)
    Row Violation