File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/composer/MessageComposer.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/composer/MessageComposer.java | |||
Method name: StreamableMimePart composeHtmlMimePart(boolean)
|
Method name: StreamableMimePart composeTextMimePart(boolean)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (needQPEncoding(body)) {↵ | 1 | if (needQPEncoding(body)) {↵ | |
2 | bodyPart.getHeader().setContentTransferEncoding("quoted-printable");↵ | 2 | bodyPart.getHeader().setContentTransferEncoding("quoted-printable");↵ | |
3 | ↵ | |||
3 | // check if the charset is US-ASCII then there is something wrong↵ | 4 | // check if the charset is US-ASCII then there is something wrong↵ | |
4 | // -> switch to UTF-8 and write to log-file↵ | 5 | // -> switch to UTF-8 and write to log-file↵ | |
5 | if( charsetName.equalsIgnoreCase("us-ascii")){↵ | 6 | if( charsetName.equalsIgnoreCase("us-ascii")){↵ | |
6 | charsetName = "UTF-8";↵ | 7 | charsetName = "UTF-8";↵ | |
7 | LOG.info("Charset was US-ASCII but text has 8-bit chars -> switched to UTF-8");↵ | 8 | LOG.info("Charset was US-ASCII but text has 8-bit chars -> switched to UTF-8");↵ | |
8 | }↵ | 9 | }↵ | |
9 | } | 10 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
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) | 1.8 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
36 | if (needQPEncoding(body)) | 13 | if (needQPEncoding(body)) | |
37 | bodyPart.getHeader().setContentTransferEncoding("quoted-printable"); | 14 | bodyPart.getHeader().setContentTransferEncoding("quoted-printable"); | |
38 | if (charsetName.equalsIgnoreCase("us-ascii")) | 15 | if (charsetName.equalsIgnoreCase("us-ascii")) | |
39 | charsetName = "UTF-8"; | 16 | charsetName = "UTF-8"; | |
40 | LOG.info("Charset was US-ASCII but text has 8-bit chars -> switched to UTF-8"); | 17 | LOG.info("Charset was US-ASCII but text has 8-bit chars -> switched to UTF-8"); |
Row | Violation |
---|