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/ReplyCommand.java | |||
Method name: void initMimeHeader(MimePart)
|
Method name: void initMimeHeader(MimePart)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | MimeHeader bodyHeader = bodyPart.getHeader();↵ | 1 | MimeHeader bodyHeader = bodyPart.getHeader();↵ | |
2 | if (bodyHeader.getMimeType().getSubtype().equals("html")) {↵ | 2 | if (bodyHeader.getMimeType().getSubtype().equals("html")) {↵ | |
3 | model.setHtml(true);↵ | 3 | model.setHtml(true);↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | model.setHtml(false);↵ | 5 | model.setHtml(false);↵ | |
6 | }↵ | |||
7 | ↵ | 6 | }↵ | |
8 | // Select the charset of the original message↵ | 7 | // Select the charset of the original message↵ | |
9 | String charset = bodyHeader.getContentParameter("charset");↵ | 8 | String charset = bodyHeader.getContentParameter("charset");↵ | |
10 | if (charset != null) {↵ | 9 | if (charset != null) {↵ | |
11 | try {↵ | 10 | try {↵ | |
12 | model.setCharset(Charset.forName(charset));↵ | 11 | model.setCharset(Charset.forName(charset));↵ | |
13 | } catch( UnsupportedCharsetException e ) {↵ | 12 | } catch( UnsupportedCharsetException e ) {↵ | |
14 | // Stick with the default charset↵ | 13 | // Stick with the default charset↵ | |
15 | }↵ | 14 | }↵ | |
16 | } | 15 |
| |
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 18 |
Number of mapped statements | 8 |
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) | 0.9 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | MimeHeader bodyHeader = bodyPart.getHeader(); | 1 | MimeHeader bodyHeader = bodyPart.getHeader(); | |
2 | if (bodyHeader.getMimeType().getSubtype().equals("html")) | 2 | if (bodyHeader.getMimeType().getSubtype().equals("html")) | |
3 | model.setHtml(true); | 3 | model.setHtml(true); | |
else | else | |||
4 | model.setHtml(false); | 4 | model.setHtml(false); | |
5 | String charset = bodyHeader.getContentParameter("charset"); | 5 | String charset = bodyHeader.getContentParameter("charset"); | |
6 | if (charset != null) | 6 | if (charset != null) | |
7 | try | 7 | try | |
8 | model.setCharset(Charset.forName(charset)); | 8 | model.setCharset(Charset.forName(charset)); |
Row | Violation |
---|