personalInfoPanel.add(webAddressSeparator, cc.xywh(1, 1, 7, 1)); // ---- homepageLabel ---- homepageLabel.setText(bundle .getString("homepageLabel.text")); homepageLabel.setLabelFor(homepageTextField); personalInfoPanel.add(homepageLabel, cc.xywh(1, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ======== panel1 ======== { panel1.setLayout(new FormLayout(new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.CENTER, Sizes.DEFAULT, FormSpec.NO_GROW) }, RowSpec.decodeSpecs("fill:default"))); // ---- homepageTextField ---- homepageTextField.setColumns(20); panel1.add(homepageTextField, cc.xy(1, 1)); // ---- homepageButton ---- panel1.add(homepageButton, cc.xy(3, 1)); } personalInfoPanel.add(panel1, cc.xywh(3, 3, 5, 1));
personalInfoPanel.add(panel6, cc.xywh(3, 7, 5, 1)); // ---- freebusyLabel ---- freebusyLabel.setText(bundle .getString("freebusyLabel.text")); freebusyLabel.setLabelFor(freebusyTextField); personalInfoPanel.add(freebusyLabel, cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ======== panel8 ======== { panel8.setLayout(new FormLayout(new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec .decodeSpecs("fill:default"))); // ---- freebusyTextField ---- freebusyTextField.setColumns(20); panel8.add(freebusyTextField, cc.xy(1, 1)); // ---- freebusyButton ---- panel8.add(freebusyButton, cc.xy(3, 1)); } personalInfoPanel.add(panel8, cc.xywh(3, 9, 5, 1));
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/contact/ContactEditorDialog.java File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/contact/ContactEditorDialog.java
Method name: void layoutComponents() Method name: void layoutComponents()
Number of AST nodes: 9 Number of AST nodes: 9
1
personalInfoPanel.add(webAddressSeparator, cc.xywh(1,
1
personalInfoPanel.add(
2
								1, 7, 1));
2
panel6, cc.xywh(3, 7, 5, 1));
3
						// ---- homepageLabel ----
3
						// ---- freebusyLabel ----
4
						homepageLabel.setText(bundle
4
						freebusyLabel.setText(bundle
5
								.getString("homepageLabel.text"));
5
								.getString("freebusyLabel.text"));
6
						homepageLabel.setLabelFor(homepageTextField);
6
						freebusyLabel.setLabelFor(freebusyTextField);
7
						personalInfoPanel.add(homepageLabel, cc.xywh(1, 3, 1,
7
						personalInfoPanel.add(freebusyLabel, cc.xywh(1, 9, 1,
8
								1, CellConstraints.RIGHT,
8
								1, CellConstraints.RIGHT,
9
								CellConstraints.DEFAULT));
9
								CellConstraints.DEFAULT));
10
						// ======== panel1 ========
10
						// ======== panel8 ========
11
						{
11
						{
12
							panel1.setLayout(new FormLayout(new ColumnSpec[] {
12
							panel8.setLayout(new FormLayout(new ColumnSpec[] {
13
									new ColumnSpec(ColumnSpec.FILL,
13
									new ColumnSpec(ColumnSpec.FILL,
14
											Sizes.DEFAULT,
14
											Sizes.DEFAULT,
15
											FormSpec.DEFAULT_GROW),
15
											FormSpec.DEFAULT_GROW),
16
									FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
16
									FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
17
									new ColumnSpec(ColumnSpec.CENTER,
17
									
18
											Sizes.DEFAULT, FormSpec.NO_GROW) },
18
FormFactory.DEFAULT_COLSPEC }, RowSpec
19
									RowSpec.decodeSpecs("fill:default")));
19
									.decodeSpecs("fill:default")));
20
							// ---- homepageTextField ----
20
							// ---- freebusyTextField ----
21
							homepageTextField.setColumns(20);
21
							freebusyTextField.setColumns(20);
22
							panel1.add(homepageTextField, cc.xy(1, 1));
22
							panel8.add(freebusyTextField, cc.xy(1, 1));
23
							// ---- homepageButton ----
23
							// ---- freebusyButton ----
24
							panel1.add(homepageButton, cc.xy(3, 1));
24
							panel8.add(freebusyButton, cc.xy(3, 1));
25
						}
25
						}
26
						personalInfoPanel.add(panel1, cc.xywh(3, 3, 5, 1));
26
						personalInfoPanel.add(panel8, cc.xywh(3, 9, 5, 1));
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 the same method
Number of node comparisons81
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements9
    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
    76
    personalInfoPanel.add(webAddressSeparator, cc.xywh(1, 1, 7, 1));
    76
    personalInfoPanel.add(webAddressSeparator, cc.xywh(1, 1, 7, 1));
    100
    personalInfoPanel.add(panel6, cc.xywh(3, 7, 5, 1));
    Differences
    Expression1Expression2Difference
    webAddressSeparatorpanel6VARIABLE_NAME_MISMATCH
    javax.swing.JComponentjavax.swing.JPanelSUBCLASS_TYPE_MISMATCH
    13LITERAL_VALUE_MISMATCH
    17LITERAL_VALUE_MISMATCH
    75LITERAL_VALUE_MISMATCH
    100
    personalInfoPanel.add(panel6, cc.xywh(3, 7, 5, 1));
    77
    homepageLabel.setText(bundle.getString("homepageLabel.text"));
    77
    homepageLabel.setText(bundle.getString("homepageLabel.text"));
    101
    freebusyLabel.setText(bundle.getString("freebusyLabel.text"));
    Differences
    Expression1Expression2Difference
    "homepageLabel.text""freebusyLabel.text"LITERAL_VALUE_MISMATCH
    homepageLabelfreebusyLabelVARIABLE_NAME_MISMATCH
    101
    freebusyLabel.setText(bundle.getString("freebusyLabel.text"));
    78
    homepageLabel.setLabelFor(homepageTextField);
    78
    homepageLabel.setLabelFor(homepageTextField);
    102
    freebusyLabel.setLabelFor(freebusyTextField);
    Differences
    Expression1Expression2Difference
    homepageTextFieldfreebusyTextFieldVARIABLE_NAME_MISMATCH
    homepageLabelfreebusyLabelVARIABLE_NAME_MISMATCH
    102
    freebusyLabel.setLabelFor(freebusyTextField);
    79
    personalInfoPanel.add(homepageLabel, cc.xywh(1, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    79
    personalInfoPanel.add(homepageLabel, cc.xywh(1, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    103
    personalInfoPanel.add(freebusyLabel, cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    Differences
    Expression1Expression2Difference
    homepageLabelfreebusyLabelVARIABLE_NAME_MISMATCH
    39LITERAL_VALUE_MISMATCH
    103
    personalInfoPanel.add(freebusyLabel, cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    80
    panel1.setLayout(new FormLayout(new ColumnSpec[] {new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.CENTER, Sizes.DEFAULT, FormSpec.NO_GROW)}, RowSpec.decodeSpecs("fill:default")));
    80
    panel1.setLayout(new FormLayout(new ColumnSpec[] {new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.CENTER, Sizes.DEFAULT, FormSpec.NO_GROW)}, RowSpec.decodeSpecs("fill:default")));
    104
    panel8.setLayout(new FormLayout(new ColumnSpec[] {new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC}, RowSpec.decodeSpecs("fill:default")));
    Differences
    Expression1Expression2Difference
    new ColumnSpec(ColumnSpec.CENTER,Sizes.DEFAULT,FormSpec.NO_GROW)FormFactory.DEFAULT_COLSPECTYPE_COMPATIBLE_REPLACEMENT
    panel1panel8VARIABLE_NAME_MISMATCH
    104
    panel8.setLayout(new FormLayout(new ColumnSpec[] {new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC}, RowSpec.decodeSpecs("fill:default")));
    81
    homepageTextField.setColumns(20);
    81
    homepageTextField.setColumns(20);
    105
    freebusyTextField.setColumns(20);
    Differences
    Expression1Expression2Difference
    homepageTextFieldfreebusyTextFieldVARIABLE_NAME_MISMATCH
    105
    freebusyTextField.setColumns(20);
    82
    panel1.add(homepageTextField, cc.xy(1, 1));
    82
    panel1.add(homepageTextField, cc.xy(1, 1));
    106
    panel8.add(freebusyTextField, cc.xy(1, 1));
    Differences
    Expression1Expression2Difference
    homepageTextFieldfreebusyTextFieldVARIABLE_NAME_MISMATCH
    panel1panel8VARIABLE_NAME_MISMATCH
    106
    panel8.add(freebusyTextField, cc.xy(1, 1));
    83
    panel1.add(homepageButton, cc.xy(3, 1));
    83
    panel1.add(homepageButton, cc.xy(3, 1));
    107
    panel8.add(freebusyButton, cc.xy(3, 1));
    Differences
    Expression1Expression2Difference
    homepageButtonfreebusyButtonVARIABLE_NAME_MISMATCH
    panel1panel8VARIABLE_NAME_MISMATCH
    107
    panel8.add(freebusyButton, cc.xy(3, 1));
    84
    personalInfoPanel.add(panel1, cc.xywh(3, 3, 5, 1));
    84
    personalInfoPanel.add(panel1, cc.xywh(3, 3, 5, 1));
    108
    personalInfoPanel.add(panel8, cc.xywh(3, 9, 5, 1));
    Differences
    Expression1Expression2Difference
    panel1panel8VARIABLE_NAME_MISMATCH
    39LITERAL_VALUE_MISMATCH
    108
    personalInfoPanel.add(panel8, cc.xywh(3, 9, 5, 1));
    Precondition Violations (0)
    Row Violation