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);
|
See real code fragment |
|
See real code fragment |
Summary
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 14 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 13.7 |
Clone type | Type 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 | | | 27 | |
28 | InputStream bodyStream = folder.getMimePartBodyStream(uids[0], address); | | 28 | InputStream stream = folder.getMimePartBodyStream(uids[0], address); |
Precondition Violations (3)
Row |
Violation |
1 | Statement continue; without innermost loop |
2 | Statement continue; without innermost loop |
3 | Clone fragment #1 returns variables mp, bodyStream , while Clone fragment #2 returns variables mp, stream |