File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/command/OpenAttachmentCommand.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/command/SaveAttachmentCommand.java | |||
Method name: void execute(IWorkerStatusController)
|
Method name: void execute(IWorkerStatusController)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | switch (encoding) {↵ | 1 | switch (encoding) {↵ | |
2 | case MimeHeader.QUOTED_PRINTABLE:↵ | 2 | case MimeHeader.QUOTED_PRINTABLE:↵ | |
3 | bodyStream = new QuotedPrintableDecoderInputStream(bodyStream);↵ | 3 | bodyStream = new QuotedPrintableDecoderInputStream(bodyStream);↵ | |
4 | break;↵ | 4 | break;↵ | |
5 | case MimeHeader.BASE64:↵ | 5 | case MimeHeader.BASE64:↵ | |
6 | bodyStream = new Base64DecoderInputStream(bodyStream);↵ | 6 | bodyStream = new Base64DecoderInputStream(bodyStream);↵ | |
7 | break;↵ | 7 | break;↵ | |
8 | default:↵ | 8 | default:↵ | |
9 | }↵ | 9 | }↵ | |
10 | if (LOG.isLoggable(Level.FINE)) {↵ | 10 | if (LOG.isLoggable(Level.FINE)) {↵ | |
11 | LOG.fine("Storing the attachment to :" + tempFile);↵ | 11 | LOG.fine("Storing the attachment to :" + tempFile);↵ | |
12 | }↵ | 12 | }↵ | |
13 | FileOutputStream fileStream = new FileOutputStream(tempFile);↵ | 13 | FileOutputStream fileStream = new FileOutputStream(tempFile);↵ | |
14 | StreamUtils.streamCopy(bodyStream, fileStream);↵ | 14 | StreamUtils.streamCopy(bodyStream, fileStream);↵ | |
15 | fileStream.close();↵ | 15 | fileStream.close();↵ | |
16 | bodyStream.close(); | 16 | bodyStream.close(); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 51 |
Number of mapped statements | 14 |
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) | 3.7 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
18 | switch (encoding) | 16 | switch (encoding) | |
19 | case MimeHeader.QUOTED_PRINTABLE: | 17 | case MimeHeader.QUOTED_PRINTABLE: | |
20 | bodyStream = new QuotedPrintableDecoderInputStream(bodyStream); | 18 | bodyStream = new QuotedPrintableDecoderInputStream(bodyStream); | |
21 | break; | 19 | break; | |
22 | case MimeHeader.BASE64: | 20 | case MimeHeader.BASE64: | |
23 | bodyStream = new Base64DecoderInputStream(bodyStream); | 21 | bodyStream = new Base64DecoderInputStream(bodyStream); | |
24 | break; | 22 | break; | |
25 | default: | 23 | default: | |
26 | if (LOG.isLoggable(Level.FINE)) | 24 | if (LOG.isLoggable(Level.FINE)) | |
27 | LOG.fine("Storing the attachment to :" + tempFile); | 25 | LOG.fine("Storing the attachment to :" + tempFile); | |
28 | FileOutputStream fileStream = new FileOutputStream(tempFile); | 26 | FileOutputStream fileStream = new FileOutputStream(tempFile); | |
29 | StreamUtils.streamCopy(bodyStream, fileStream); | 27 | StreamUtils.streamCopy(bodyStream, fileStream); | |
30 | fileStream.close(); | 28 | fileStream.close(); | |
31 | bodyStream.close(); | 29 | bodyStream.close(); |
Row | Violation |
---|