if (action.equals("SAVE")) {
if (!checkbox.isSelected()) {
return;
} else {
File configPath = DefaultConfigDirectory.getInstance().getCurrentPath();
File defaultConfigPath = DefaultConfigDirectory.getDefaultPath();
while (!configPath.equals(defaultConfigPath)) {
configPath = configPath.getParentFile();
if (configPath == null) {
JOptionPane.showMessageDialog(this, MailResourceLoader
.getString("dialog", "password",
"warn_save_msg"), MailResourceLoader
.getString("dialog", "password",
"warn_save_title"),
JOptionPane.WARNING_MESSAGE);
return;
}
}
}
}
if (action.equals("SAVE")) {
if (!storePasswordCheckBox.isSelected()) {
return;
} else {
File configPath = DefaultConfigDirectory.getInstance().getCurrentPath();
File defaultConfigPath = DefaultConfigDirectory.getDefaultPath();
while (!configPath.equals(defaultConfigPath)) {
configPath = configPath.getParentFile();
if (configPath == null) {
JOptionPane
.showMessageDialog(dialog, MailResourceLoader
.getString("dialog",
IncomingItem.PASSWORD,
"warn_save_msg"),
MailResourceLoader.getString("dialog",
IncomingItem.PASSWORD,
"warn_save_title"),
JOptionPane.WARNING_MESSAGE);
return;
}
}
}
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/util/PasswordDialog.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/account/IncomingServerPanel.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 10
|
|
Number of AST nodes: 10
|
|
1 | if (action.equals("SAVE")) {↵ | | 1 | if (action.equals("SAVE")) {↵
|
2 | if (!checkbox.isSelected()) {↵ | | 2 | if (!storePasswordCheckBox.isSelected()) {↵
|
3 | return;↵ | | 3 | return;↵
|
4 | } else {↵ | | 4 | } else {↵
|
5 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath();↵ | | 5 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath();↵
|
6 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath();↵ | | 6 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath();↵
|
7 | while (!configPath.equals(defaultConfigPath)) {↵ | | 7 | while (!configPath.equals(defaultConfigPath)) {↵
|
8 | configPath = configPath.getParentFile();↵ | | 8 | configPath = configPath.getParentFile();↵
|
9 | if (configPath == null) {↵ | | 9 | if (configPath == null) {↵
|
10 | JOptionPane↵ | | 10 | JOptionPane↵
|
11 | .showMessageDialog(this, MailResourceLoader↵ | | 11 | .showMessageDialog(dialog, MailResourceLoader↵
|
12 | .getString("dialog", "password",↵ | | 12 | .getString("dialog",↵
|
|
| | | 13 | IncomingItem.PASSWORD,↵
|
13 | "warn_save_msg"), ↵ | | 14 | "warn_save_msg"),↵
|
14 | MailResourceLoader↵ | | 15 | MailResourceLoader↵
|
15 | .getString("dialog", "password",↵ | | 16 | .getString("dialog",↵
|
|
| | | 17 | IncomingItem.PASSWORD,↵
|
16 | "warn_save_title"),↵ | | 18 | "warn_save_title"),↵
|
17 | JOptionPane.WARNING_MESSAGE);↵ | | 19 | JOptionPane.WARNING_MESSAGE);↵
|
18 | return;↵ | | 20 | return;↵
|
19 | }↵ | | 21 | }↵
|
20 | }↵ | | 22 | }↵
|
21 | }↵ | | 23 | }↵
|
22 | } | | 24 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 0 |