if (bodyPart != null) { // setup charset and html initMimeHeader(bodyPart); bodyPartAddress = bodyPart.getAddress(); String quotedBodyText = createQuotedBody(bodyPart.getHeader(), folder, uids, bodyPartAddress); /* * *20040210, karlpeder* Remove html comments - they are not * displayed properly in the composer */ if (bodyPart.getHeader().getMimeType().getSubtype().equals("html")) { quotedBodyText = HtmlParser.removeComments(quotedBodyText); } model.setBodyText(quotedBodyText); }
if (bodyPart != null) { // setup charset and html initMimeHeader(bodyPart); bodyPartAddress = bodyPart.getAddress(); String quotedBodyText = createQuotedBody(folder, uids, bodyPartAddress); /* * *20040210, karlpeder* Remove html comments - they are not * displayed properly in the composer */ if (bodyPart.getHeader().getMimeType().getSubtype().equals("html")) { quotedBodyText = HtmlParser.removeComments(quotedBodyText); } model.setBodyText(quotedBodyText); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/command/ForwardInlineCommand.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/command/RedirectCommand.java
Method name: void execute(IWorkerStatusController) Method name: void execute(IWorkerStatusController)
Number of AST nodes: 7 Number of AST nodes: 7
1
if (bodyPart != null) {
1
if (bodyPart != null) {
2
			// setup charset and html
2
			// setup charset and html
3
			initMimeHeader(bodyPart);
3
			initMimeHeader(bodyPart);
4
			bodyPartAddress = bodyPart.getAddress();
4
			bodyPartAddress = bodyPart.getAddress();
5
			String quotedBodyText = createQuotedBody(bodyPart.getHeader(),
5
			String quotedBodyText = createQuotedBody(
6
					folder, uids, 
6
folder, uids,
7
bodyPartAddress);
7
					bodyPartAddress);
8
			/*
8
			/*
9
			 * *20040210, karlpeder* Remove html comments - they are not
9
			 * *20040210, karlpeder* Remove html comments - they are not
10
			 * displayed properly in the composer
10
			 * displayed properly in the composer
11
			 */
11
			 */
12
			if (bodyPart.getHeader().getMimeType().getSubtype().equals("html")) {
12
			if (bodyPart.getHeader().getMimeType().getSubtype().equals("html")) {
13
				quotedBodyText = HtmlParser.removeComments(quotedBodyText);
13
				quotedBodyText = HtmlParser.removeComments(quotedBodyText);
14
			}
14
			}
15
			model.setBodyText(quotedBodyText);
15
			model.setBodyText(quotedBodyText);
16
		}
16
		}
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.3
Clones locationClones are in different classes having the same super class
Number of node comparisons29
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)35.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    14
    if (bodyPart != null)
    14
    if (bodyPart != null)
    15
    initMimeHeader(bodyPart);
    15
    initMimeHeader(bodyPart);
    16
    bodyPartAddress = bodyPart.getAddress();
    16
    bodyPartAddress = bodyPart.getAddress();
    17
    String quotedBodyText = createQuotedBody(bodyPart.getHeader(), folder, uids, bodyPartAddress);
    17
    String quotedBodyText = createQuotedBody(bodyPart.getHeader(), folder, uids, bodyPartAddress);
    17
    String quotedBodyText = createQuotedBody(folder, uids, bodyPartAddress);
    Differences
    Expression1Expression2Difference
    createQuotedBody(bodyPart.getHeader(),folder,uids,bodyPartAddress)createQuotedBody(folder,uids,bodyPartAddress)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression createQuotedBody(bodyPart.getHeader(),folder,uids,bodyPartAddress) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression createQuotedBody(folder,uids,bodyPartAddress) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17
    String quotedBodyText = createQuotedBody(folder, uids, bodyPartAddress);
    18
    if (bodyPart.getHeader().getMimeType().getSubtype().equals("html"))
    18
    if (bodyPart.getHeader().getMimeType().getSubtype().equals("html"))
    19
    quotedBodyText = HtmlParser.removeComments(quotedBodyText);
    19
    quotedBodyText = HtmlParser.removeComments(quotedBodyText);
    20
    model.setBodyText(quotedBodyText);
    20
    model.setBodyText(quotedBodyText);
    Precondition Violations (2)
    Row Violation
    1Expression createQuotedBody(bodyPart.getHeader(),folder,uids,bodyPartAddress) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression createQuotedBody(folder,uids,bodyPartAddress) cannot be parameterized, because it has dependencies to/from statements that will be extracted