Profile p = ProfileManager.getInstance().getProfileForName( selection); if (p != null) { int n = JOptionPane.showConfirmDialog(this, GlobalResourceLoader.getString(RESOURCE_PATH, "profiles", "confirmDelete.msg"), GlobalResourceLoader.getString(RESOURCE_PATH, "profiles", "confirmDelete.title"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (n == JOptionPane.NO_OPTION) { return; } ProfileManager.getInstance().removeProfile(selection); model.removeElement(selection); }
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/core/src/main/java/org/columba/core/gui/profiles/ProfileManagerDialog.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: 7 Number of AST nodes: 7
1
Profile p = ProfileManager.getInstance().getProfileForName(
2
						selection
1
File configPath = DefaultConfigDirectory.getInstance().getCurrentPath();
2
				File defaultConfigPath = DefaultConfigDirectory.getDefaultPath();
3
				while (!configPath.equals(defaultConfigPath)) {
3
);
4
					configPath = configPath.getParentFile();
4
				if (p != null) {
5
					if (configPath == null) {
5
					int n = JOptionPane.showConfirmDialog(this,
6
						JOptionPane
6
							GlobalResourceLoader.getString(RESOURCE_PATH,
7
									"profiles", "confirmDelete.
7
								.showMessageDialog(dialog, MailResourceLoader
8
										.getString("dialog",
9
												IncomingItem.PASSWORD,
8
msg"),
10
												"warn_save_msg"),
9
							GlobalResourceLoader.getString(RESOURCE_PATH,
11
										MailResourceLoader.getString(
10
									"profiles", "confirmDelete.title"),
11
							JOptionPane.YES_NO_OPTION,
12
"dialog",
13
												IncomingItem.PASSWORD,
14
												"warn_save_title"),
12
							JOptionPane.QUESTION_MESSAGE);
15
										JOptionPane.WARNING_MESSAGE);
13
					if (n == JOptionPane.NO_OPTION) {
16
					
14
						return;
15
					}
16
					ProfileManager.getInstance().removeProfile(selection);
17
					model.removeElement(selection);
17
	return;
18
					}
18
				}
19
				}
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons1