mainConstraints.insets = new Insets(0, 5, 0, 0); mainLayout.setConstraints(hostLabel, mainConstraints); centerPanel.add(hostLabel); mainConstraints.insets = new Insets(5, 5, 0, 0); mainLayout.setConstraints(passwordField, mainConstraints); centerPanel.add(passwordField); mainConstraints.insets = new Insets(5, 5, 0, 0); mainLayout.setConstraints(checkbox, mainConstraints); centerPanel.add(checkbox); JPanel bottomPanel = new JPanel(); bottomPanel.setLayout(new BorderLayout()); JPanel buttonPanel = createButtonPanel(); bottomPanel.add(buttonPanel, BorderLayout.CENTER); getContentPane().add(bottomPanel, BorderLayout.SOUTH); getRootPane().setDefaultButton(okButton);
mainConstraints.insets = new Insets(0, 5, 0, 0); mainLayout.setConstraints(hostLabel, mainConstraints); centerPanel.add(hostLabel); mainConstraints.insets = new Insets(5, 5, 0, 0); mainLayout.setConstraints(passwordField, mainConstraints); centerPanel.add(passwordField); mainConstraints.insets = new Insets(5, 5, 0, 0); mainLayout.setConstraints(checkbox, mainConstraints); centerPanel.add(checkbox); JPanel bottomPanel = new JPanel(); bottomPanel.setLayout(new BorderLayout()); JPanel buttonPanel = createButtonPanel(); bottomPanel.add(buttonPanel, BorderLayout.CENTER); dialog.getContentPane().add(bottomPanel, BorderLayout.SOUTH); dialog.getRootPane().setDefaultButton(okButton);
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/util/PGPPassphraseDialog.java
Method name: void showDialog(String, String, boolean) Method name: void showDialog(String, String, boolean)
Number of AST nodes: 15 Number of AST nodes: 15
1
mainConstraints.insets = new Insets(0, 5, 0, 0);
1
mainConstraints.insets = new Insets(0, 5, 0, 0);
2
		mainLayout.setConstraints(hostLabel, mainConstraints);
2
		mainLayout.setConstraints(hostLabel, mainConstraints);
3
		centerPanel.add(hostLabel);
3
		centerPanel.add(hostLabel);
4
		mainConstraints.insets = new Insets(5, 5, 0, 0);
4
		mainConstraints.insets = new Insets(5, 5, 0, 0);
5
		mainLayout.setConstraints(passwordField, mainConstraints);
5
		mainLayout.setConstraints(passwordField, mainConstraints);
6
		centerPanel.add(passwordField);
6
		centerPanel.add(passwordField);
7
		mainConstraints.insets = new Insets(5, 5, 0, 0);
7
		mainConstraints.insets = new Insets(5, 5, 0, 0);
8
		mainLayout.setConstraints(checkbox, mainConstraints);
8
		mainLayout.setConstraints(checkbox, mainConstraints);
9
		centerPanel.add(checkbox);
9
		centerPanel.add(checkbox);
10
		JPanel bottomPanel = new JPanel();
10
		JPanel bottomPanel = new JPanel();
11
		bottomPanel.setLayout(new BorderLayout());
11
		bottomPanel.setLayout(new BorderLayout());
12
		JPanel buttonPanel = createButtonPanel();
12
		JPanel buttonPanel = createButtonPanel();
13
		bottomPanel.add(buttonPanel, BorderLayout.CENTER);
13
		bottomPanel.add(buttonPanel, BorderLayout.CENTER);
14
		getContentPane().add(bottomPanel, BorderLayout.SOUTH);
14
		dialog.getContentPane().add(bottomPanel, BorderLayout.SOUTH);
15
		getRootPane().setDefaultButton(okButton);
15
		dialog.getRootPane().setDefaultButton(okButton);
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
Number of node comparisons98
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements15
    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
    23
    mainConstraints.insets = new Insets(0, 5, 0, 0);
    22
    mainConstraints.insets = new Insets(0, 5, 0, 0);
    24
    mainLayout.setConstraints(hostLabel, mainConstraints);
    23
    mainLayout.setConstraints(hostLabel, mainConstraints);
    25
    centerPanel.add(hostLabel);
    24
    centerPanel.add(hostLabel);
    26
    mainConstraints.insets = new Insets(5, 5, 0, 0);
    25
    mainConstraints.insets = new Insets(5, 5, 0, 0);
    27
    mainLayout.setConstraints(passwordField, mainConstraints);
    26
    mainLayout.setConstraints(passwordField, mainConstraints);
    28
    centerPanel.add(passwordField);
    27
    centerPanel.add(passwordField);
    29
    mainConstraints.insets = new Insets(5, 5, 0, 0);
    28
    mainConstraints.insets = new Insets(5, 5, 0, 0);
    30
    mainLayout.setConstraints(checkbox, mainConstraints);
    29
    mainLayout.setConstraints(checkbox, mainConstraints);
    31
    centerPanel.add(checkbox);
    30
    centerPanel.add(checkbox);
    32
    JPanel bottomPanel = new JPanel();
    31
    JPanel bottomPanel = new JPanel();
    33
    bottomPanel.setLayout(new BorderLayout());
    32
    bottomPanel.setLayout(new BorderLayout());
    34
    JPanel buttonPanel = createButtonPanel();
    33
    JPanel buttonPanel = createButtonPanel();
    35
    bottomPanel.add(buttonPanel, BorderLayout.CENTER);
    34
    bottomPanel.add(buttonPanel, BorderLayout.CENTER);
    36
    getContentPane().add(bottomPanel, BorderLayout.SOUTH);
    36
    getContentPane().add(bottomPanel, BorderLayout.SOUTH);
    35
    dialog.getContentPane().add(bottomPanel, BorderLayout.SOUTH);
    Differences
    Expression1Expression2Difference
    dialogMISSING_METHOD_INVOCATION_EXPRESSION
    35
    dialog.getContentPane().add(bottomPanel, BorderLayout.SOUTH);
    37
    getRootPane().setDefaultButton(okButton);
    37
    getRootPane().setDefaultButton(okButton);
    36
    dialog.getRootPane().setDefaultButton(okButton);
    Differences
    Expression1Expression2Difference
    dialogMISSING_METHOD_INVOCATION_EXPRESSION
    36
    dialog.getRootPane().setDefaultButton(okButton);
    Precondition Violations (0)
    Row Violation