getContentPane().setLayout(new BorderLayout()); JPanel mainPanel = new JPanel(new BorderLayout()); mainPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); FormLayout layout = new FormLayout("fill:default:grow", //$NON-NLS-1$ "default, 12px, fill:default:grow"); //$NON-NLS-1$ CellConstraints cc = new CellConstraints(); mainPanel.setLayout(layout); mainPanel.add(createGroupNamePanel(), cc.xy(1, 1)); mainPanel.add(createGroupPanel(), cc.xy(1, 3)); getContentPane().add(mainPanel, BorderLayout.CENTER); JPanel bottomPanel = new JPanel(new BorderLayout()); bottomPanel.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP)); JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 6, 0)); buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); buttonPanel.add(okButton); buttonPanel.add(cancelButton); bottomPanel.add(buttonPanel, BorderLayout.EAST); getContentPane().add(bottomPanel, BorderLayout.SOUTH);
getContentPane().setLayout(new BorderLayout()); JPanel mainPanel = new JPanel(new BorderLayout()); mainPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); FormLayout layout = new FormLayout( "fill:default:grow, 12px, fill:default:grow", //$NON-NLS-1$ "fill:default:grow"); //$NON-NLS-1$ CellConstraints cc = new CellConstraints(); mainPanel.setLayout(layout); mainPanel.add(createAddressbookPanel(), cc.xy(1, 1)); mainPanel.add(createRecipientsPanel(), cc.xy(3, 1)); getContentPane().add(mainPanel, BorderLayout.CENTER); JPanel bottomPanel = new JPanel(new BorderLayout()); bottomPanel.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP)); JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 6, 0)); buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); buttonPanel.add(okButton); buttonPanel.add(cancelButton); bottomPanel.add(buttonPanel, BorderLayout.EAST); getContentPane().add(bottomPanel, BorderLayout.SOUTH);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/group/EditGroupDialog.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/contact/SelectAddressDialog.java
Method name: void layoutComponents() Method name: void layoutComponents()
Number of AST nodes: 17 Number of AST nodes: 17
1
getContentPane().setLayout(new BorderLayout());
1
getContentPane().setLayout(new BorderLayout());
2
		JPanel mainPanel = new JPanel(new BorderLayout());
2
		JPanel mainPanel = new JPanel(new BorderLayout());
3
		mainPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
3
		mainPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
4
		FormLayout layout = new FormLayout("
4
		FormLayout layout = new FormLayout(
5
fill:default:grow", //$NON-NLS-1$
5
				"fill:default:grow, 12px, fill:default:grow", //$NON-NLS-1$
6
				"default, 12px, fill:default:grow"); //$NON-NLS-1$
6
				"fill:default:grow"); //$NON-NLS-1$
7
		CellConstraints cc = new CellConstraints();
7
		CellConstraints cc = new CellConstraints();
8
		mainPanel.setLayout(layout);
8
		mainPanel.setLayout(layout);
9
		mainPanel.add(createGroupNamePanel(), cc.xy(1, 1));
9
		mainPanel.add(createAddressbookPanel(), cc.xy(1, 1));
10
		mainPanel.add(createGroupPanel(), cc.xy(1, 3));
10
		mainPanel.add(createRecipientsPanel(), cc.xy(3, 1));
11
		getContentPane().add(mainPanel, BorderLayout.CENTER);
11
		getContentPane().add(mainPanel, BorderLayout.CENTER);
12
		JPanel bottomPanel = new JPanel(new BorderLayout());
12
		JPanel bottomPanel = new JPanel(new BorderLayout());
13
		bottomPanel.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP));
13
		bottomPanel.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP));
14
		JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 6, 0));
14
		JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 6, 0));
15
		buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
15
		buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
16
		buttonPanel.add(okButton);
16
		buttonPanel.add(okButton);
17
		buttonPanel.add(cancelButton);
17
		buttonPanel.add(cancelButton);
18
		bottomPanel.add(buttonPanel, BorderLayout.EAST);
18
		bottomPanel.add(buttonPanel, BorderLayout.EAST);
19
		getContentPane().add(bottomPanel, BorderLayout.SOUTH);
19
		getContentPane().add(bottomPanel, BorderLayout.SOUTH);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
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 comparisons133
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements17
    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 2
    Mapped Statements
    ID Statement ID Statement
    1
    getContentPane().setLayout(new BorderLayout());
    1
    getContentPane().setLayout(new BorderLayout());
    2
    JPanel mainPanel = new JPanel(new BorderLayout());
    2
    JPanel mainPanel = new JPanel(new BorderLayout());
    3
    mainPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
    3
    mainPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
    4
    FormLayout layout = new FormLayout("fill:default:grow", "default, 12px, fill:default:grow");
    4
    FormLayout layout = new FormLayout("fill:default:grow", "default, 12px, fill:default:grow");
    4
    FormLayout layout = new FormLayout("fill:default:grow, 12px, fill:default:grow", "fill:default:grow");
    Differences
    Expression1Expression2Difference
    "fill:default:grow""fill:default:grow, 12px, fill:default:grow"LITERAL_VALUE_MISMATCH
    "default, 12px, fill:default:grow""fill:default:grow"LITERAL_VALUE_MISMATCH
    4
    FormLayout layout = new FormLayout("fill:default:grow, 12px, fill:default:grow", "fill:default:grow");
    5
    CellConstraints cc = new CellConstraints();
    5
    CellConstraints cc = new CellConstraints();
    6
    mainPanel.setLayout(layout);
    6
    mainPanel.setLayout(layout);
    7
    mainPanel.add(createGroupNamePanel(), cc.xy(1, 1));
    7
    mainPanel.add(createGroupNamePanel(), cc.xy(1, 1));
    7
    mainPanel.add(createAddressbookPanel(), cc.xy(1, 1));
    Differences
    Expression1Expression2Difference
    createGroupNamePanelcreateAddressbookPanelMETHOD_INVOCATION_NAME_MISMATCH
    7
    mainPanel.add(createAddressbookPanel(), cc.xy(1, 1));
    8
    mainPanel.add(createGroupPanel(), cc.xy(1, 3));
    8
    mainPanel.add(createGroupPanel(), cc.xy(1, 3));
    8
    mainPanel.add(createRecipientsPanel(), cc.xy(3, 1));
    Differences
    Expression1Expression2Difference
    createGroupPanelcreateRecipientsPanelMETHOD_INVOCATION_NAME_MISMATCH
    13LITERAL_VALUE_MISMATCH
    31LITERAL_VALUE_MISMATCH
    8
    mainPanel.add(createRecipientsPanel(), cc.xy(3, 1));
    9
    getContentPane().add(mainPanel, BorderLayout.CENTER);
    9
    getContentPane().add(mainPanel, BorderLayout.CENTER);
    10
    JPanel bottomPanel = new JPanel(new BorderLayout());
    10
    JPanel bottomPanel = new JPanel(new BorderLayout());
    11
    bottomPanel.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP));
    11
    bottomPanel.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP));
    12
    JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 6, 0));
    12
    JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 6, 0));
    13
    buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
    13
    buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
    14
    buttonPanel.add(okButton);
    14
    buttonPanel.add(okButton);
    15
    buttonPanel.add(cancelButton);
    15
    buttonPanel.add(cancelButton);
    16
    bottomPanel.add(buttonPanel, BorderLayout.EAST);
    16
    bottomPanel.add(buttonPanel, BorderLayout.EAST);
    17
    getContentPane().add(bottomPanel, BorderLayout.SOUTH);
    17
    getContentPane().add(bottomPanel, BorderLayout.SOUTH);
    Precondition Violations (0)
    Row Violation