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 } }
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)); }
Clone fragments detected by clone detection tool
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/RedirectCommand.java
Method name: void initMimeHeader(MimePart) Method name: void initMimeHeader(MimePart)
Number of AST nodes: 8 Number of AST nodes: 7
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
		}
6
		}
7
		// Select the charset of the original message
7
		// Select the charset of the original message
8
		String charset = bodyHeader.getContentParameter("charset");
8
		String charset = bodyHeader.getContentParameter("charset");
9
        if (charset != null) {
9
		if (charset != null) {
10
        	try {
11
        		model.setCharset(Charset.forName(charset));
10
			model.setCharset(Charset.forName(charset));
12
        	} catch( UnsupportedCharsetException e ) {
13
        		// Stick with the default charset
14
        	}
15
        }
11
		}
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons2