MimePart mp = (MimePart) it.next(); Integer[] address = mp.getAddress(); // skip if bodypart (already added as quoted text) if (Arrays.equals(address, bodyPartAddress)) continue; // add attachment InputStream bodyStream = folder.getMimePartBodyStream(uids[0], address);
MimePart mp = (MimePart) it.next(); Integer[] address = mp.getAddress(); // skip if bodypart (already added as quoted text) if (Arrays.equals(address, bodyPartAddress)) continue; // add attachment InputStream stream = folder.getMimePartBodyStream(uids[0], address);
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: 5 Number of AST nodes: 5
1
MimePart mp = (MimePart) it.next();
1
MimePart mp = (MimePart) it.next();
2
			Integer[] address = mp.getAddress();
2
			Integer[] address = mp.getAddress();
3
			// skip if bodypart (already added as quoted text)
3
			// skip if bodypart (already added as quoted text)
4
			if (Arrays.equals(address, bodyPartAddress))
4
			if (Arrays.equals(address, bodyPartAddress))
5
				continue;
5
				continue;
6
			// add attachment
6
			// add attachment
7
			InputStream bodyStream = folder.getMimePartBodyStream(uids[0], address);
7
			InputStream stream = folder.getMimePartBodyStream(uids[0], address);
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)13.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    24
    MimePart mp = (MimePart)it.next();
    24
    MimePart mp = (MimePart)it.next();
    25
    Integer[] address = mp.getAddress();
    25
    Integer[] address = mp.getAddress();
    26
    if (Arrays.equals(address, bodyPartAddress))
    26
    if (Arrays.equals(address, bodyPartAddress))
    27
    continue;
    27
    continue;
    27
    continue;
    Preondition Violations
    Statement continue; without innermost loop
    Statement continue; without innermost loop
    27
    continue;
    28
    InputStream bodyStream = folder.getMimePartBodyStream(uids[0], address);
    28
    InputStream bodyStream = folder.getMimePartBodyStream(uids[0], address);
    28
    InputStream stream = folder.getMimePartBodyStream(uids[0], address);
    Differences
    Expression1Expression2Difference
    bodyStreamstreamVARIABLE_NAME_MISMATCH
    28
    InputStream stream = folder.getMimePartBodyStream(uids[0], address);
    Precondition Violations (3)
    Row Violation
    1Statement continue; without innermost loop
    2Statement continue; without innermost loop
    3Clone fragment #1 returns variables mp, bodyStream , while Clone fragment #2 returns variables mp, stream