JPanel bottom = new JPanel(); bottom.setLayout(new BorderLayout()); bottom.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); ButtonWithMnemonic cancelButton = new ButtonWithMnemonic( MailResourceLoader.getString("global", "cancel")); //$NON-NLS-1$ //$NON-NLS-2$ cancelButton.addActionListener(this); cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$ ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader .getString("global", "ok")); //$NON-NLS-1$ //$NON-NLS-2$ okButton.addActionListener(this); okButton.setActionCommand("OK"); //$NON-NLS-1$ okButton.setDefaultCapable(true); getRootPane().setDefaultButton(okButton); ButtonWithMnemonic helpButton = new ButtonWithMnemonic( MailResourceLoader.getString("global", "help")); // associate with JavaHelp HelpManager.getInstance().enableHelpOnButton(helpButton, "configuring_columba");
JPanel bottom = new JPanel(); bottom.setLayout(new BorderLayout()); bottom.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); ButtonWithMnemonic cancelButton = new ButtonWithMnemonic( MailResourceLoader.getString("global", "cancel")); //$NON-NLS-1$ //$NON-NLS-2$ cancelButton.addActionListener(this); cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$ ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader .getString("global", "ok")); //$NON-NLS-1$ //$NON-NLS-2$ okButton.addActionListener(this); okButton.setActionCommand("OK"); //$NON-NLS-1$ okButton.setDefaultCapable(true); getRootPane().setDefaultButton(okButton); ButtonWithMnemonic helpButton = new ButtonWithMnemonic( MailResourceLoader.getString("global", "help")); // associate with JavaHelp HelpManager.getInstance().enableHelpOnButton(helpButton, "configuring_columba");
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/account/AccountDialog.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/columns/ColumnConfigDialog.java
Method name: JPanel createButtonPanel() Method name: JPanel createButtonPanel()
Number of AST nodes: 13 Number of AST nodes: 13
1
JPanel bottom = new JPanel();
1
JPanel bottom = new JPanel();
2
		bottom.setLayout(new BorderLayout());
2
		bottom.setLayout(new BorderLayout());
3
		bottom.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
3
		bottom.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
4
		ButtonWithMnemonic cancelButton = new ButtonWithMnemonic(
4
		ButtonWithMnemonic cancelButton = new ButtonWithMnemonic(
5
				MailResourceLoader.getString("global", "cancel"));
5
				MailResourceLoader.getString("global", "cancel"));
6
		//$NON-NLS-1$ //$NON-NLS-2$
6
		//$NON-NLS-1$ //$NON-NLS-2$
7
		cancelButton.addActionListener(this);
7
		cancelButton.addActionListener(this);
8
		cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$
8
		cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$
9
		ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader
9
		ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader
10
				.getString("global", "ok"));
10
				.getString("global", "ok"));
11
		//$NON-NLS-1$ //$NON-NLS-2$
11
		//$NON-NLS-1$ //$NON-NLS-2$
12
		okButton.addActionListener(this);
12
		okButton.addActionListener(this);
13
		okButton.setActionCommand("OK"); //$NON-NLS-1$
13
		okButton.setActionCommand("OK"); //$NON-NLS-1$
14
		okButton.setDefaultCapable(true);
14
		okButton.setDefaultCapable(true);
15
		getRootPane().setDefaultButton(okButton);
15
		getRootPane().setDefaultButton(okButton);
16
		ButtonWithMnemonic helpButton = new ButtonWithMnemonic(
16
		ButtonWithMnemonic helpButton = new ButtonWithMnemonic(
17
				MailResourceLoader.getString("global", "help"));
17
				MailResourceLoader.getString("global", "help"));
18
		// associate with JavaHelp
18
		// associate with JavaHelp
19
		HelpManager.getInstance().enableHelpOnButton(helpButton,
19
		HelpManager.getInstance().enableHelpOnButton(helpButton,
20
				"configuring_columba");
20
				"configuring_columba");
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons68
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements13
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    JPanel bottom = new JPanel();
    1
    JPanel bottom = new JPanel();
    2
    bottom.setLayout(new BorderLayout());
    2
    bottom.setLayout(new BorderLayout());
    3
    bottom.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
    3
    bottom.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
    4
    ButtonWithMnemonic cancelButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "cancel"));
    4
    ButtonWithMnemonic cancelButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "cancel"));
    5
    cancelButton.addActionListener(this);
    5
    cancelButton.addActionListener(this);
    6
    cancelButton.setActionCommand("CANCEL");
    6
    cancelButton.setActionCommand("CANCEL");
    7
    ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "ok"));
    7
    ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "ok"));
    8
    okButton.addActionListener(this);
    8
    okButton.addActionListener(this);
    9
    okButton.setActionCommand("OK");
    9
    okButton.setActionCommand("OK");
    10
    okButton.setDefaultCapable(true);
    10
    okButton.setDefaultCapable(true);
    11
    getRootPane().setDefaultButton(okButton);
    11
    getRootPane().setDefaultButton(okButton);
    12
    ButtonWithMnemonic helpButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "help"));
    12
    ButtonWithMnemonic helpButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "help"));
    13
    HelpManager.getInstance().enableHelpOnButton(helpButton, "configuring_columba");
    13
    HelpManager.getInstance().enableHelpOnButton(helpButton, "configuring_columba");
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables okButton, cancelButton, helpButton, bottom , while Clone fragment #2 returns variables okButton, cancelButton, helpButton, bottom