int result = JOptionPane
.showConfirmDialog(
FrameManager.getInstance()
.getActiveFrame(),
new MultiLineLabel(
e.getMessage()
+ "\n"
+ MailResourceLoader
.getString(
"dialog",
"error",
"authentication_fallback_to_default")),
MailResourceLoader.getString("dialog",
"error",
"authentication_process_error"),
JOptionPane.OK_CANCEL_OPTION);
if (result == JOptionPane.OK_OPTION) {
authMethod = AuthenticationManager.SASL_PLAIN;
smtpItem.setString("login_method", Integer
.toString(authMethod));
} else {
throw new CommandCancelledException();
}
int result = JOptionPane
.showConfirmDialog(
FrameManager.getInstance()
.getActiveFrame(),
new MultiLineLabel(
e.getMessage()
+ "\n"
+ MailResourceLoader
.getString(
"dialog",
"error",
"authentication_fallback_to_default")),
MailResourceLoader.getString("dialog",
"error",
"authentication_process_error"),
JOptionPane.OK_CANCEL_OPTION);
if (result == JOptionPane.OK_OPTION) {
loginMethod = AuthenticationManager.USER;
popItem.setString("login_method", Integer
.toString(loginMethod));
} else {
throw new CommandCancelledException();
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/smtp/SMTPServer.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/pop3/POP3Store.java
|
Method name: void ensureAuthenticated()
|
|
Method name: void login()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | int result = JOptionPane↵ | | 1 | int result = JOptionPane↵
|
2 | .showConfirmDialog(↵ | | 2 | .showConfirmDialog(↵
|
3 | FrameManager.getInstance()↵ | | 3 | FrameManager.getInstance()↵
|
4 | .getActiveFrame(),↵ | | 4 | .getActiveFrame(),↵
|
5 | new MultiLineLabel(↵ | | 5 | new MultiLineLabel(↵
|
6 | e.getMessage()↵ | | 6 | e.getMessage()↵
|
7 | + "\n"↵ | | 7 | + "\n"↵
|
8 | + MailResourceLoader↵ | | 8 | + MailResourceLoader↵
|
9 | .getString(↵ | | 9 | .getString(↵
|
10 | "dialog",↵ | | 10 | "dialog",↵
|
11 | "error",↵ | | 11 | "error",↵
|
12 | "authentication_fallback_to_default")),↵ | | 12 | "authentication_fallback_to_default")),↵
|
13 | MailResourceLoader.getString("dialog",↵ | | 13 | MailResourceLoader.getString("dialog",↵
|
14 | "error",↵ | | 14 | "error",↵
|
15 | "authentication_process_error"),↵ | | 15 | "authentication_process_error"),↵
|
16 | JOptionPane.OK_CANCEL_OPTION);↵ | | 16 | JOptionPane.OK_CANCEL_OPTION);↵
|
|
17 | if (result == JOptionPane.OK_OPTION) {↵ | | 17 | if (result == JOptionPane.OK_OPTION) {↵
|
18 | authMethod = AuthenticationManager.SASL_PLAIN;↵ | | 18 | loginMethod = AuthenticationManager.USER;↵
|
19 | smtpItem.setString("login_method", Integer↵ | | 19 | popItem.setString("login_method", Integer↵
|
20 | .toString(authMethod));↵ | | 20 | .toString(loginMethod));↵
|
21 | } else {↵ | | 21 | } else {↵
|
22 | throw new CommandCancelledException();↵ | | 22 | throw new CommandCancelledException();↵
|
23 | } | | 23 | }
|
See real code fragment |
|
See real code fragment |
Summary
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) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 0 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 0 |
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) | 0.0 |
Clone type | Unknown type |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
Precondition Violations (0)
Row |
Violation |