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: 5 | Number of AST nodes: 5 | |||
1 | if (sslEnabled && sslType == IncomingItem.IMAPS_POP3S) {↵ | 1 | if (sslEnabled && sslType == IncomingItem.IMAPS_POP3S) {↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | protocol.openSSLPort();↵ | 3 | protocol.openSSLPort();↵ | |
4 | usingSSL = true;↵ | 4 | usingSSL = true;↵ | |
5 | } catch (SSLException e) {↵ | 5 | } catch (SSLException e) {↵ | |
6 | int result = showErrorDialog(MailResourceLoader.getString(↵ | 6 | int result = showErrorDialog(MailResourceLoader.getString(↵ | |
7 | "dialog", "error", "ssl_handshake_error")↵ | 7 | "dialog", "error", "ssl_handshake_error")↵ | |
8 | + ": "↵ | 8 | + ": "↵ | |
9 | + e.getLocalizedMessage()↵ | 9 | + e.getLocalizedMessage()↵ | |
10 | + "\n"↵ | 10 | + "\n"↵ | |
11 | + MailResourceLoader.getString("dialog", "error",↵ | 11 | + MailResourceLoader.getString("dialog", "error",↵ | |
12 | "ssl_turn_off"));↵ | 12 | "ssl_turn_off"));↵ | |
13 | if (result == 1) {↵ | 13 | if (result == JOptionPane.CANCEL_OPTION) {↵ | |
14 | throw new CommandCancelledException();↵ | 14 | throw new CommandCancelledException();↵ | |
15 | }↵ | 15 | }↵ | |
16 | // turn off SSL for the future↵ | 16 | // turn off SSL for the future↵ | |
17 | item.setBoolean("enable_ssl", false);↵ | 17 | popItem.setBoolean("enable_ssl", false);↵ | |
18 | item.setInteger("port", IMAPProtocol.DEFAULT_PORT);↵ | 18 | popItem.setInteger("port", POP3Protocol.DEFAULT_PORT);↵ | |
19 | // reopen the port↵ | 19 | // reopen the port↵ | |
20 | protocol.openPort();↵ | 20 | protocol.openPort();↵ | |
21 | }↵ | 21 | }↵ | |
22 | } else {↵ | 22 | } else {↵ | |
23 | protocol.openPort();↵ | 23 | protocol.openPort();↵ | |
24 | } | 24 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 2.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 13 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 4.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | if (sslEnabled && sslType == IncomingItem.IMAPS_POP3S) | 3 | if (sslEnabled && sslType == IncomingItem.IMAPS_POP3S) | |||||||||||||||||||||||||||||||
5 | try |
| 4 | try | ||||||||||||||||||||||||||||||
6 | protocol.openSSLPort(); |
| 5 | protocol.openSSLPort(); | ||||||||||||||||||||||||||||||
7 | usingSSL = true; | 6 | usingSSL = true; | |||||||||||||||||||||||||||||||
else | else | |||||||||||||||||||||||||||||||||
8 | protocol.openPort(); |
| 7 | protocol.openPort(); |
Row | Violation |
---|---|
1 | Expression IMAPProtocol cannot be unified with expression POP3Protocol , because common superclass org.columba.ristretto.auth.AuthenticationServer does not declare member(s) public void openPort() throws java.io.IOException, org.columba.ristretto.imap.IMAPException, public static final int DEFAULT_PORT |
2 | Expression protocol cannot be unified with expression protocol , because common superclass org.columba.ristretto.auth.AuthenticationServer does not declare member(s) public void openPort() throws java.io.IOException, org.columba.ristretto.imap.IMAPException, public static final int DEFAULT_PORT |
3 | Expression protocol cannot be unified with expression protocol , because common superclass org.columba.ristretto.auth.AuthenticationServer does not declare member(s) public void openSSLPort() throws java.io.IOException, javax.net.ssl.SSLException, org.columba.ristretto.imap.IMAPException |
4 | Expression protocol cannot be unified with expression protocol , because common superclass org.columba.ristretto.auth.AuthenticationServer does not declare member(s) public void openPort() throws java.io.IOException, org.columba.ristretto.imap.IMAPException |