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: 12 | Number of AST nodes: 12 | |||
1 | if (Boolean.valueOf(html.getAttribute("prefer")).booleanValue()) {↵ | 1 | if (Boolean.valueOf(html.getAttribute("prefer")).booleanValue()) {↵ | |
2 | bodyPart = mimePartTree.getFirstTextPart("html");↵ | 2 | bodyPart = mimePartTree.getFirstTextPart("html");↵ | |
3 | } else {↵ | 3 | } else {↵ | |
4 | bodyPart = mimePartTree.getFirstTextPart("plain");↵ | 4 | bodyPart = mimePartTree.getFirstTextPart("plain");↵ | |
5 | }↵ | 5 | }↵ | |
6 | if (bodyPart != null) {↵ | 6 | if (bodyPart != null) {↵ | |
7 | // setup charset and html↵ | 7 | // setup charset and html↵ | |
8 | initMimeHeader(bodyPart);↵ | 8 | initMimeHeader(bodyPart);↵ | |
9 | bodyPartAddress = bodyPart.getAddress();↵ | 9 | bodyPartAddress = bodyPart.getAddress();↵ | |
10 | String quotedBodyText = createQuotedBody(bodyPart.getHeader(),↵ | 10 | String quotedBodyText = createQuotedBody(↵ | |
11 | folder, uids, ↵ | 11 | folder, uids,↵ | |
12 | bodyPartAddress);↵ | 12 | bodyPartAddress);↵ | |
13 | /*↵ | 13 | /*↵ | |
14 | * *20040210, karlpeder* Remove html comments - they are not↵ | 14 | * *20040210, karlpeder* Remove html comments - they are not↵ | |
15 | * displayed properly in the composer↵ | 15 | * displayed properly in the composer↵ | |
16 | */↵ | 16 | */↵ | |
17 | if (bodyPart.getHeader().getMimeType().getSubtype().equals("html")) {↵ | 17 | if (bodyPart.getHeader().getMimeType().getSubtype().equals("html")) {↵ | |
18 | quotedBodyText = HtmlParser.removeComments(quotedBodyText);↵ | 18 | quotedBodyText = HtmlParser.removeComments(quotedBodyText);↵ | |
19 | }↵ | 19 | }↵ | |
20 | model.setBodyText(quotedBodyText);↵ | 20 | model.setBodyText(quotedBodyText);↵ | |
21 | }↵ | 21 | }↵ | |
22 | // add all attachments↵ | 22 | // add all attachments↵ | |
23 | MimeTree mt = folder.getMimePartTree(uids[0]);↵ | 23 | MimeTree mt = folder.getMimePartTree(uids[0]);↵ | |
24 | Iterator it = mt.getAllLeafs().iterator(); | 24 |
| |
See real code fragment | See real code fragment |
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.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 43 |
Number of mapped statements | 12 |
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) | 49.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11 | if (Boolean.valueOf(html.getAttribute("prefer")).booleanValue()) | 11 | if (Boolean.valueOf(html.getAttribute("prefer")).booleanValue()) | |||||||||||||
12 | bodyPart = mimePartTree.getFirstTextPart("html"); | 12 | bodyPart = mimePartTree.getFirstTextPart("html"); | |||||||||||||
else | else | |||||||||||||||
13 | bodyPart = mimePartTree.getFirstTextPart("plain"); | 13 | bodyPart = mimePartTree.getFirstTextPart("plain"); | |||||||||||||
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(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); | |||||||||||||
21 | MimeTree mt = folder.getMimePartTree(uids[0]); | 21 | MimeTree mt = folder.getMimePartTree(uids[0]); | |||||||||||||
22 | Iterator it = mt.getAllLeafs().iterator(); | 22 | Iterator it = mt.getAllLeafs().iterator(); |
Row | Violation |
---|---|
1 | Expression createQuotedBody(bodyPart.getHeader(),folder,uids,bodyPartAddress) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression createQuotedBody(folder,uids,bodyPartAddress) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variables it, bodyPartAddress , while Clone fragment #2 returns variables it, bodyPartAddress |