try { // substitute special characters like: <,>,&,\t,\n body = HtmlParser.substituteSpecialCharacters(decodedBody); // parse for urls / email adr. and substite with HTML-code body = HtmlParser.substituteURL(body); body = HtmlParser.substituteEmailAddress(body); // mark quotings with special font body = DocumentParser.markQuotings(body); } catch (Exception e) { LOG.severe("Error parsing body: " + e.getMessage()); body = "<em>Error parsing body!!!</em>"; }
try { charset = Charset.forName(charsetName); } catch (UnsupportedCharsetException e) { charsetName = System.getProperty("file.encoding"); charset = Charset.forName(charsetName); } catch (IllegalCharsetNameException e) { charsetName = System.getProperty("file.encoding"); charset = Charset.forName(charsetName); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/command/SaveMessageBodyAsCommand.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/MessageParser.java
Method name: void saveMsgBodyAsHtml(boolean, File) Method name: Charset extractCharset(Charset, MimePart)
Number of AST nodes: 5 Number of AST nodes: 2
1
try {
1
try {
2
                // substitute special characters like: <,>,&,\t,\n
3
                body = HtmlParser.substituteSpecialCharacters(decodedBody);
4
                // parse for urls / email adr. and substite with HTML-code
5
                body = HtmlParser.substituteURL(body);
6
                body = HtmlParser.substituteEmailAddress(body);
7
                // mark quotings with special font
8
                body = DocumentParser.markQuotings(body);
9
            } catch (Exception e) {
10
                LOG.severe("Error parsing body: " +  e.getMessage());
11
                body = "<em>Error parsing body!!!</em>";
12
            
2
					charset = Charset.forName(charsetName);
3
				} catch (UnsupportedCharsetException e) {
4
					charsetName = System.getProperty("file.encoding");
5
					charset = Charset.forName(charsetName);
6
				} catch (IllegalCharsetNameException e) {
7
					charsetName = System.getProperty("file.encoding");
8
					charset = Charset.forName(charsetName);
13
}
9
				}
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
Number of node comparisons1