File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/pgp/MultipartEncryptedRenderer.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/pgp/MultipartSignedRenderer.java | |||
Method name: InputStream render(MimePart)
|
Method name: InputStream render(MimePart)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | Vector streams = new Vector((2 * 2) + 3);↵ | 1 | Vector streams = new Vector((2 * 2) + 3);↵ | |
2 | MimeHeader header = part.getHeader();↵ | 2 | MimeHeader header = part.getHeader();↵ | |
3 | // Create boundary to separate the mime-parts↵ | 3 | // Create boundary to separate the mime-parts↵ | |
4 | String boundary = createUniqueBoundary().toString();↵ | 4 | String boundary = createUniqueBoundary().toString();↵ | |
5 | header.putContentParameter("boundary", boundary);↵ | 5 | header.putContentParameter("boundary", boundary);↵ | |
6 | byte[] startBoundary = ("\r\n--" + boundary + "\r\n").getBytes();↵ | 6 | byte[] startBoundary = ("\r\n--" + boundary + "\r\n").getBytes();↵ | |
7 | byte[] endBoundary = ("\r\n--" + boundary + "--\r\n").getBytes();↵ | 7 | byte[] endBoundary = ("\r\n--" + boundary + "--\r\n").getBytes();↵ | |
8 | // Add pgp-specific content-parameters↵ | 8 | // Add pgp-specific content-parameters↵ | |
9 | header.putContentParameter("protocol", "application/pgp-encrypted↵ | 9 | // we take as default hash-algo SHA1↵ | |
10 | "); | 10 | header.putContentParameter("micalg", "pgp-sha1"); | |
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 37 |
Number of mapped statements | 7 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Vector streams = new Vector((2 * 2) + 3); | 1 | Vector streams = new Vector((2 * 2) + 3); | ||||||||||||||
2 | MimeHeader header = part.getHeader(); | 2 | MimeHeader header = part.getHeader(); | ||||||||||||||
3 | String boundary = createUniqueBoundary().toString(); | 3 | String boundary = createUniqueBoundary().toString(); | ||||||||||||||
4 | header.putContentParameter("boundary", boundary); | 4 | header.putContentParameter("boundary", boundary); | ||||||||||||||
5 | byte[] startBoundary = ("\r\n--" + boundary + "\r\n").getBytes(); | 5 | byte[] startBoundary = ("\r\n--" + boundary + "\r\n").getBytes(); | ||||||||||||||
6 | byte[] endBoundary = ("\r\n--" + boundary + "--\r\n").getBytes(); | 6 | byte[] endBoundary = ("\r\n--" + boundary + "--\r\n").getBytes(); | ||||||||||||||
7 | header.putContentParameter("protocol", "application/pgp-encrypted"); |
| 7 | header.putContentParameter("micalg", "pgp-sha1"); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables streams, header, startBoundary, endBoundary , while Clone fragment #2 returns variables header, streams, startBoundary, endBoundary |