Vector streams = new Vector((2 * 2) + 3); MimeHeader header = part.getHeader(); // Create boundary to separate the mime-parts String boundary = createUniqueBoundary().toString(); header.putContentParameter("boundary", boundary); byte[] startBoundary = ("\r\n--" + boundary + "\r\n").getBytes(); byte[] endBoundary = ("\r\n--" + boundary + "--\r\n").getBytes(); // Add pgp-specific content-parameters // we take as default hash-algo SHA1 header.putContentParameter("micalg", "pgp-sha1");
Vector streams = new Vector((2 * 2) + 3); MimeHeader header = part.getHeader(); // Create boundary to separate the mime-parts String boundary = createUniqueBoundary().toString(); header.putContentParameter("boundary", boundary); byte[] startBoundary = ("\r\n--" + boundary + "\r\n").getBytes(); byte[] endBoundary = ("\r\n--" + boundary + "--\r\n").getBytes(); // Add pgp-specific content-parameters header.putContentParameter("protocol", "application/pgp-encrypted");
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/pgp/MultipartSignedRenderer.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/pgp/MultipartEncryptedRenderer.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
		// we take as default hash-algo SHA1
10
		header.putContentParameter("micalg", "pgp-sha1");
9
        header.putContentParameter("protocol", "application/pgp-encrypted");
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons37
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    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("micalg", "pgp-sha1");
    7
    header.putContentParameter("micalg", "pgp-sha1");
    7
    header.putContentParameter("protocol", "application/pgp-encrypted");
    Differences
    Expression1Expression2Difference
    "micalg""protocol"LITERAL_VALUE_MISMATCH
    "pgp-sha1""application/pgp-encrypted"LITERAL_VALUE_MISMATCH
    7
    header.putContentParameter("protocol", "application/pgp-encrypted");
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables header, streams, startBoundary, endBoundary , while Clone fragment #2 returns variables streams, header, startBoundary, endBoundary