try { protocol.openSSLPort(); usingSSL = true; } catch (SSLException e) { int result = showErrorDialog(MailResourceLoader.getString( "dialog", "error", "ssl_handshake_error") + ": " + e.getLocalizedMessage() + "\n" + MailResourceLoader.getString("dialog", "error", "ssl_turn_off")); if (result == 1) { throw new CommandCancelledException(); } // turn off SSL for the future item.setBoolean("enable_ssl", false); item.setInteger("port", IMAPProtocol.DEFAULT_PORT); // reopen the port protocol.openPort(); }
try { protocol.openSSLPort(); usingSSL = true; } catch (SSLException e) { int result = showErrorDialog(MailResourceLoader.getString( "dialog", "error", "ssl_handshake_error") + ": " + e.getLocalizedMessage() + "\n" + MailResourceLoader.getString("dialog", "error", "ssl_turn_off")); if (result == JOptionPane.CANCEL_OPTION) { throw new CommandCancelledException(); } // turn off SSL for the future popItem.setBoolean("enable_ssl", false); popItem.setInteger("port", POP3Protocol.DEFAULT_PORT); // reopen the port protocol.openPort(); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/imap/IMAPServer.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/pop3/POP3Store.java
Method name: void openConnection() Method name: void openConnection()
Number of AST nodes: 3 Number of AST nodes: 3
1
try {
1
try {
2
				protocol.openSSLPort();
2
				protocol.openSSLPort();
3
				usingSSL = true;
3
				usingSSL = true;
4
			} catch (SSLException e) {
4
			} catch (SSLException e) {
5
				int result = showErrorDialog(MailResourceLoader.getString(
5
				int result = showErrorDialog(MailResourceLoader.getString(
6
						"dialog", "error", "ssl_handshake_error")
6
						"dialog", "error", "ssl_handshake_error")
7
						+ ": "
7
						+ ": "
8
						+ e.getLocalizedMessage()
8
						+ e.getLocalizedMessage()
9
						+ "\n"
9
						+ "\n"
10
						+ MailResourceLoader.getString("dialog", "error",
10
						+ MailResourceLoader.getString("dialog", "error",
11
								"ssl_turn_off"));
11
								"ssl_turn_off"));
12
				if (result == 1) {
12
				if (result == JOptionPane.CANCEL_OPTION) {
13
					throw new CommandCancelledException();
13
					throw new CommandCancelledException();
14
				}
14
				}
15
				// turn off SSL for the future
15
				// turn off SSL for the future
16
				item.setBoolean("enable_ssl", false);
16
				popItem.setBoolean("enable_ssl", false);
17
				item.setInteger("port", IMAPProtocol.DEFAULT_PORT);
17
				popItem.setInteger("port", POP3Protocol.DEFAULT_PORT);
18
				// reopen the port
18
				// reopen the port
19
				protocol.openPort();
19
				protocol.openPort();
20
			}
20
			}
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)1.0
Clones locationClones are in different classes
Number of node comparisons1