MimeHeader bodyHeader = bodyPart.getHeader(); if (bodyHeader.getMimeType().getSubtype().equals("html")) { model.setHtml(true); } else { model.setHtml(false); } // Select the charset of the original message String charset = bodyHeader.getContentParameter("charset"); if (charset != null) { model.setCharset(Charset.forName(charset)); }
MimeHeader bodyHeader = bodyPart.getHeader(); if (bodyHeader.getMimeType().getSubtype().equals("html")) { model.setHtml(true); } else { model.setHtml(false); } // Select the charset of the original message String charset = bodyHeader.getContentParameter("charset"); if (charset != null) { try { model.setCharset(Charset.forName(charset)); } catch( UnsupportedCharsetException e ) { // Stick with the default charset } }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/command/RedirectCommand.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: 7 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
	
10
        	try {
12
		model.setCharset(Charset.forName(charset));
11
        		model.setCharset(Charset.forName(charset));
13
		
12
        	} catch( UnsupportedCharsetException e ) {
13
        		// Stick with the default charset
14
        	}
14
}
15
        }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
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 comparisons2