personalInfoPanel.add(panel5, cc.xywh(3, 5, 5, 1)); // ---- calendarLabel ---- calendarLabel.setText(bundle .getString("calendarLabel.text")); calendarLabel.setLabelFor(calendarTextField); personalInfoPanel.add(calendarLabel, cc.xywh(1, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ======== panel6 ======== { panel6.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"))); // ---- calendarTextField ---- calendarTextField.setColumns(20); panel6.add(calendarTextField, cc.xy(1, 1)); // ---- calendarButton ---- panel6.add(calendarButton, cc.xy(3, 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));
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)); // ---- weblogLabel ---- weblogLabel.setText(bundle .getString("weblogLabel.text")); weblogLabel.setLabelFor(weblogTextField); personalInfoPanel .add(weblogLabel, cc.xywh(1, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ======== panel5 ======== { panel5.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"))); // ---- weblogTextField ---- weblogTextField.setColumns(20); panel5.add(weblogTextField, cc.xy(1, 1)); // ---- weblogButton ---- panel5.add(weblogButton, cc.xy(3, 1)); } personalInfoPanel.add(panel5, cc.xywh(3, 5, 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: 17 Number of AST nodes: 17
1
personalInfoPanel.add(panel5, cc.xywh(3, 5
1
personalInfoPanel.add(webAddressSeparator, cc.xywh(1,
2
, 5, 1));
2
								1, 7, 1));
3
						// ---- calendarLabel ----
3
						// ---- homepageLabel ----
4
						calendarLabel.setText(bundle
4
						homepageLabel.setText(bundle
5
								.getString("calendarLabel.text"));
5
								.getString("homepageLabel.text"));
6
						calendarLabel.setLabelFor(calendarTextField);
6
						homepageLabel.setLabelFor(homepageTextField);
7
						personalInfoPanel.add(calendarLabel, cc.xywh(1, 7, 1,
7
						personalInfoPanel.add(homepageLabel, cc.xywh(1, 3, 1,
8
								1, CellConstraints.RIGHT,
8
								1, CellConstraints.RIGHT,
9
								CellConstraints.DEFAULT));
9
								CellConstraints.DEFAULT));
10
						// ======== panel6 ========
10
						// ======== panel1 ========
11
						{
11
						{
12
							panel6.setLayout(new FormLayout(new ColumnSpec[] {
12
							panel1.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
									FormFactory.DEFAULT_COLSPEC }, RowSpec
17
									new ColumnSpec(ColumnSpec.CENTER,
18
											Sizes.DEFAULT, FormSpec.NO_GROW) },
18
									.decodeSpecs("fill:default")));
19
									RowSpec.decodeSpecs("fill:default")));
19
							// ---- calendarTextField ----
20
							// ---- homepageTextField ----
20
							calendarTextField.setColumns(20);
21
							homepageTextField.setColumns(20);
21
							panel6.add(calendarTextField, cc.xy(1, 1));
22
							panel1.add(homepageTextField, cc.xy(1, 1));
22
							// ---- calendarButton ----
23
							// ---- homepageButton ----
23
							panel6.add(calendarButton, cc.xy(3, 1));
24
							panel1.add(homepageButton, cc.xy(3, 1));
24
						}
25
						}
25
						personalInfoPanel.add(panel6, cc.xywh(3, 7, 5, 1));
26
						personalInfoPanel.add(panel1, cc.xywh(3, 3, 5, 1));
26
						// ---- freebusyLabel ----
27
						// ---- weblogLabel ----
27
						freebusyLabel.setText(bundle
28
						weblogLabel.setText(bundle
28
								.getString("freebusyLabel.text"));
29
								.getString("weblogLabel.text"));
29
						freebusyLabel.setLabelFor(freebusyTextField);
30
						weblogLabel.setLabelFor(weblogTextField);
30
						personalInfoPanel.add(freebusy
31
						personalInfoPanel
31
Label, cc.xywh(1, 9, 1,
32
								.add(weblogLabel, cc.xywh(1, 5, 1, 1,
32
								1, CellConstraints.RIGHT,
33
										CellConstraints.RIGHT,
33
								CellConstraints.DEFAULT));
34
										CellConstraints.DEFAULT));
34
						// ======== panel8 ========
35
						// ======== panel5 ========
35
						{
36
						{
36
							panel8.setLayout(new FormLayout(new ColumnSpec[] {
37
							panel5.setLayout(new FormLayout(new ColumnSpec[] {
37
									new ColumnSpec(ColumnSpec.FILL,
38
									new ColumnSpec(ColumnSpec.FILL,
38
											Sizes.DEFAULT,
39
											Sizes.DEFAULT,
39
											FormSpec.DEFAULT_GROW),
40
											FormSpec.DEFAULT_GROW),
40
									FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
41
									FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
41
									FormFactory.DEFAULT_COLSPEC }, RowSpec
42
									FormFactory.DEFAULT_COLSPEC }, RowSpec
42
									.decodeSpecs("fill:default")));
43
									.decodeSpecs("fill:default")));
43
							// ---- freebusyTextField ----
44
							// ---- weblogTextField ----
44
							freebusyTextField.setColumns(20);
45
							weblogTextField.setColumns(20);
45
							panel8.add(freebusyTextField, cc.xy(1, 1));
46
							panel5.add(weblogTextField, cc.xy(1, 1));
46
							// ---- freebusyButton ----
47
							// ---- weblogButton ----
47
							panel8.add(freebusyButton, cc.xy(3, 1));
48
							panel5.add(weblogButton, cc.xy(3, 1));
48
						}
49
						}
49
						personalInfoPanel.add(panel8, cc.xywh(3, 9, 5, 1));
50
						personalInfoPanel.add(panel5, cc.xywh(3, 5, 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 comparisons289
  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
    92
    personalInfoPanel.add(panel5, cc.xywh(3, 5, 5, 1));
    92
    personalInfoPanel.add(panel5, cc.xywh(3, 5, 5, 1));
    76
    personalInfoPanel.add(webAddressSeparator, cc.xywh(1, 1, 7, 1));
    Differences
    Expression1Expression2Difference
    panel5webAddressSeparatorVARIABLE_NAME_MISMATCH
    javax.swing.JPaneljavax.swing.JComponentSUBCLASS_TYPE_MISMATCH
    31LITERAL_VALUE_MISMATCH
    51LITERAL_VALUE_MISMATCH
    57LITERAL_VALUE_MISMATCH
    76
    personalInfoPanel.add(webAddressSeparator, cc.xywh(1, 1, 7, 1));
    93
    calendarLabel.setText(bundle.getString("calendarLabel.text"));
    93
    calendarLabel.setText(bundle.getString("calendarLabel.text"));
    77
    homepageLabel.setText(bundle.getString("homepageLabel.text"));
    Differences
    Expression1Expression2Difference
    "calendarLabel.text""homepageLabel.text"LITERAL_VALUE_MISMATCH
    calendarLabelhomepageLabelVARIABLE_NAME_MISMATCH
    77
    homepageLabel.setText(bundle.getString("homepageLabel.text"));
    94
    calendarLabel.setLabelFor(calendarTextField);
    94
    calendarLabel.setLabelFor(calendarTextField);
    78
    homepageLabel.setLabelFor(homepageTextField);
    Differences
    Expression1Expression2Difference
    calendarTextFieldhomepageTextFieldVARIABLE_NAME_MISMATCH
    calendarLabelhomepageLabelVARIABLE_NAME_MISMATCH
    78
    homepageLabel.setLabelFor(homepageTextField);
    95
    personalInfoPanel.add(calendarLabel, cc.xywh(1, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    95
    personalInfoPanel.add(calendarLabel, cc.xywh(1, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    79
    personalInfoPanel.add(homepageLabel, cc.xywh(1, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    Differences
    Expression1Expression2Difference
    calendarLabelhomepageLabelVARIABLE_NAME_MISMATCH
    73LITERAL_VALUE_MISMATCH
    79
    personalInfoPanel.add(homepageLabel, cc.xywh(1, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    96
    panel6.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")));
    96
    panel6.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")));
    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")));
    Differences
    Expression1Expression2Difference
    FormFactory.DEFAULT_COLSPECnew ColumnSpec(ColumnSpec.CENTER,Sizes.DEFAULT,FormSpec.NO_GROW)TYPE_COMPATIBLE_REPLACEMENT
    panel6panel1VARIABLE_NAME_MISMATCH
    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")));
    97
    calendarTextField.setColumns(20);
    97
    calendarTextField.setColumns(20);
    81
    homepageTextField.setColumns(20);
    Differences
    Expression1Expression2Difference
    calendarTextFieldhomepageTextFieldVARIABLE_NAME_MISMATCH
    81
    homepageTextField.setColumns(20);
    98
    panel6.add(calendarTextField, cc.xy(1, 1));
    98
    panel6.add(calendarTextField, cc.xy(1, 1));
    82
    panel1.add(homepageTextField, cc.xy(1, 1));
    Differences
    Expression1Expression2Difference
    calendarTextFieldhomepageTextFieldVARIABLE_NAME_MISMATCH
    panel6panel1VARIABLE_NAME_MISMATCH
    82
    panel1.add(homepageTextField, cc.xy(1, 1));
    99
    panel6.add(calendarButton, cc.xy(3, 1));
    99
    panel6.add(calendarButton, cc.xy(3, 1));
    83
    panel1.add(homepageButton, cc.xy(3, 1));
    Differences
    Expression1Expression2Difference
    calendarButtonhomepageButtonVARIABLE_NAME_MISMATCH
    panel6panel1VARIABLE_NAME_MISMATCH
    83
    panel1.add(homepageButton, cc.xy(3, 1));
    100
    personalInfoPanel.add(panel6, cc.xywh(3, 7, 5, 1));
    100
    personalInfoPanel.add(panel6, cc.xywh(3, 7, 5, 1));
    84
    personalInfoPanel.add(panel1, cc.xywh(3, 3, 5, 1));
    Differences
    Expression1Expression2Difference
    panel6panel1VARIABLE_NAME_MISMATCH
    73LITERAL_VALUE_MISMATCH
    84
    personalInfoPanel.add(panel1, cc.xywh(3, 3, 5, 1));
    101
    freebusyLabel.setText(bundle.getString("freebusyLabel.text"));
    101
    freebusyLabel.setText(bundle.getString("freebusyLabel.text"));
    85
    weblogLabel.setText(bundle.getString("weblogLabel.text"));
    Differences
    Expression1Expression2Difference
    "freebusyLabel.text""weblogLabel.text"LITERAL_VALUE_MISMATCH
    freebusyLabelweblogLabelVARIABLE_NAME_MISMATCH
    85
    weblogLabel.setText(bundle.getString("weblogLabel.text"));
    102
    freebusyLabel.setLabelFor(freebusyTextField);
    102
    freebusyLabel.setLabelFor(freebusyTextField);
    86
    weblogLabel.setLabelFor(weblogTextField);
    Differences
    Expression1Expression2Difference
    freebusyTextFieldweblogTextFieldVARIABLE_NAME_MISMATCH
    freebusyLabelweblogLabelVARIABLE_NAME_MISMATCH
    86
    weblogLabel.setLabelFor(weblogTextField);
    103
    personalInfoPanel.add(freebusyLabel, cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    103
    personalInfoPanel.add(freebusyLabel, cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    87
    personalInfoPanel.add(weblogLabel, cc.xywh(1, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));
    Differences
    Expression1Expression2Difference
    freebusyLabelweblogLabelVARIABLE_NAME_MISMATCH
    95LITERAL_VALUE_MISMATCH
    87
    personalInfoPanel.add(weblogLabel, cc.xywh(1, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.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")));
    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")));
    88
    panel5.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
    panel8panel5VARIABLE_NAME_MISMATCH
    88
    panel5.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")));
    105
    freebusyTextField.setColumns(20);
    105
    freebusyTextField.setColumns(20);
    89
    weblogTextField.setColumns(20);
    Differences
    Expression1Expression2Difference
    freebusyTextFieldweblogTextFieldVARIABLE_NAME_MISMATCH
    89
    weblogTextField.setColumns(20);
    106
    panel8.add(freebusyTextField, cc.xy(1, 1));
    106
    panel8.add(freebusyTextField, cc.xy(1, 1));
    90
    panel5.add(weblogTextField, cc.xy(1, 1));
    Differences
    Expression1Expression2Difference
    freebusyTextFieldweblogTextFieldVARIABLE_NAME_MISMATCH
    panel8panel5VARIABLE_NAME_MISMATCH
    90
    panel5.add(weblogTextField, cc.xy(1, 1));
    107
    panel8.add(freebusyButton, cc.xy(3, 1));
    107
    panel8.add(freebusyButton, cc.xy(3, 1));
    91
    panel5.add(weblogButton, cc.xy(3, 1));
    Differences
    Expression1Expression2Difference
    freebusyButtonweblogButtonVARIABLE_NAME_MISMATCH
    panel8panel5VARIABLE_NAME_MISMATCH
    91
    panel5.add(weblogButton, cc.xy(3, 1));
    108
    personalInfoPanel.add(panel8, cc.xywh(3, 9, 5, 1));
    108
    personalInfoPanel.add(panel8, cc.xywh(3, 9, 5, 1));
    92
    personalInfoPanel.add(panel5, cc.xywh(3, 5, 5, 1));
    Differences
    Expression1Expression2Difference
    panel8panel5VARIABLE_NAME_MISMATCH
    95LITERAL_VALUE_MISMATCH
    92
    personalInfoPanel.add(panel5, cc.xywh(3, 5, 5, 1));
    Precondition Violations (0)
    Row Violation