homepageLabel = new JLabel(); panel1 = new JPanel(); homepageTextField = new JTextField(); homepageButton = new JButton(ImageLoader .getSmallIcon(IconKeys.INTERNET)); homepageButton.setMargin(new Insets(0, 0, 0, 0)); homepageButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String s = homepageTextField.getText(); try { URL url = new URL(s); ColumbaDesktop.getInstance().browse(url); } catch (MalformedURLException e1) { e1.printStackTrace(); } } }); weblogLabel = new JLabel(); panel5 = new JPanel(); weblogTextField = new JTextField(); weblogButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET)); weblogButton.setMargin(new Insets(0, 0, 0, 0)); weblogButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String s = weblogTextField.getText(); try { URL url = new URL(s); ColumbaDesktop.getInstance().browse(url); } catch (MalformedURLException e1) { e1.printStackTrace(); } } }); calendarLabel = new JLabel(); panel6 = new JPanel(); calendarTextField = new JTextField(); calendarButton = new JButton(ImageLoader .getSmallIcon(IconKeys.INTERNET)); calendarButton.setMargin(new Insets(0, 0, 0, 0)); calendarButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String s = calendarTextField.getText(); try { URL url = new URL(s); ColumbaDesktop.getInstance().browse(url); } catch (MalformedURLException e1) { e1.printStackTrace(); } } });
weblogLabel = new JLabel(); panel5 = new JPanel(); weblogTextField = new JTextField(); weblogButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET)); weblogButton.setMargin(new Insets(0, 0, 0, 0)); weblogButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String s = weblogTextField.getText(); try { URL url = new URL(s); ColumbaDesktop.getInstance().browse(url); } catch (MalformedURLException e1) { e1.printStackTrace(); } } }); calendarLabel = new JLabel(); panel6 = new JPanel(); calendarTextField = new JTextField(); calendarButton = new JButton(ImageLoader .getSmallIcon(IconKeys.INTERNET)); calendarButton.setMargin(new Insets(0, 0, 0, 0)); calendarButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String s = calendarTextField.getText(); try { URL url = new URL(s); ColumbaDesktop.getInstance().browse(url); } catch (MalformedURLException e1) { e1.printStackTrace(); } } }); freebusyLabel = new JLabel(); panel8 = new JPanel(); freebusyTextField = new JTextField(); freebusyButton = new JButton(ImageLoader .getSmallIcon(IconKeys.INTERNET)); freebusyButton.setMargin(new Insets(0, 0, 0, 0)); freebusyButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String s = freebusyTextField.getText(); try { URL url = new URL(s); ColumbaDesktop.getInstance().browse(url); } catch (MalformedURLException e1) { e1.printStackTrace(); } } });
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 initComponents() Method name: void initComponents()
Number of AST nodes: 18 Number of AST nodes: 18
1
homepageLabel = new JLabel();
2
		panel1 = new JPanel();
3
		homepageTextField = new JTextField();
4
		homepageButton = new JButton(ImageLoader
5
				.getSmallIcon(IconKeys.INTERNET));
6
		homepageButton.setMargin(new Insets(0, 0, 0, 0));
7
		homepageButton.addActionListener(new ActionListener() {
8
			public void actionPerformed(ActionEvent e) {
9
				String s = homepageTextField.getText();
10
				try {
11
					URL url = new URL(s);
12
					ColumbaDesktop.getInstance().browse(url);
13
				} catch (MalformedURLException e1) {
14
					e1.printStackTrace();
15
				}
16
			}
17
		});
18
		weblogLabel = new JLabel();
1
weblogLabel = new JLabel();
19
		panel5 = new JPanel();
2
		panel5 = new JPanel();
20
		weblogTextField = new JTextField();
3
		weblogTextField = new JTextField();
21
		weblogButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
4
		weblogButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
22
		weblogButton.setMargin(new Insets(0, 0, 0, 0));
5
		weblogButton.setMargin(new Insets(0, 0, 0, 0));
23
		weblogButton.addActionListener(new ActionListener() {
6
		weblogButton.addActionListener(new ActionListener() {
24
			public void actionPerformed(ActionEvent e) {
7
			public void actionPerformed(ActionEvent e) {
25
				String s = weblogTextField.getText();
8
				String s = weblogTextField.getText();
26
				try {
9
				try {
27
					URL url = new URL(s);
10
					URL url = new URL(s);
28
					ColumbaDesktop.getInstance().browse(url);
11
					ColumbaDesktop.getInstance().browse(url);
29
				} catch (MalformedURLException e1) {
12
				} catch (MalformedURLException e1) {
30
					e1.printStackTrace();
13
					e1.printStackTrace();
31
				}
14
				}
32
			}
15
			}
33
		});
16
		});
34
		calendarLabel = new JLabel();
17
		calendarLabel = new JLabel();
35
		panel6 = new JPanel();
18
		panel6 = new JPanel();
36
		calendarTextField = new JTextField();
19
		calendarTextField = new JTextField();
37
		calendarButton = new JButton(ImageLoader
20
		calendarButton = new JButton(ImageLoader
38
				.getSmallIcon(IconKeys.INTERNET));
21
				.getSmallIcon(IconKeys.INTERNET));
39
		calendarButton.setMargin(new Insets(0, 0, 0, 0));
22
		calendarButton.setMargin(new Insets(0, 0, 0, 0));
40
		calendarButton.addActionListener(new ActionListener() {
23
		calendarButton.addActionListener(new ActionListener() {
41
			public void actionPerformed(ActionEvent e) {
24
			public void actionPerformed(ActionEvent e) {
42
				String s = calendarTextField.getText();
25
				String s = calendarTextField.getText();
43
				try {
26
				try {
44
					URL url = new URL(s);
27
					URL url = new URL(s);
45
					ColumbaDesktop.getInstance().browse(url);
28
					ColumbaDesktop.getInstance().browse(url);
46
				} catch (MalformedURLException e1) {
29
				} catch (MalformedURLException e1) {
47
					e1.printStackTrace();
30
					e1.printStackTrace();
48
				}
31
				}
49
			}
32
			}
50
		});
33
		});
34
		freebusyLabel = new JLabel();
35
		panel8 = new JPanel();
36
		freebusyTextField = new JTextField();
37
		freebusyButton = new JButton(ImageLoader
38
				.getSmallIcon(IconKeys.INTERNET));
39
		freebusyButton.setMargin(new Insets(0, 0, 0, 0));
40
		freebusyButton.addActionListener(new ActionListener() {
41
			public void actionPerformed(ActionEvent e) {
42
				String s = freebusyTextField.getText();
43
				try {
44
					URL url = new URL(s);
45
					ColumbaDesktop.getInstance().browse(url);
46
				} catch (MalformedURLException e1) {
47
					e1.printStackTrace();
48
				}
49
			}
50
		});
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 the same method
Number of node comparisons129
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements18
    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
    57
    homepageLabel = new JLabel();
    57
    homepageLabel = new JLabel();
    63
    weblogLabel = new JLabel();
    Differences
    Expression1Expression2Difference
    homepageLabelweblogLabelVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression homepageLabel is a field being modified, and thus it cannot be parameterized
    Expression weblogLabel is a field being modified, and thus it cannot be parameterized
    63
    weblogLabel = new JLabel();
    58
    panel1 = new JPanel();
    58
    panel1 = new JPanel();
    64
    panel5 = new JPanel();
    Differences
    Expression1Expression2Difference
    panel1panel5VARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression panel1 is a field being modified, and thus it cannot be parameterized
    Expression panel5 is a field being modified, and thus it cannot be parameterized
    64
    panel5 = new JPanel();
    59
    homepageTextField = new JTextField();
    59
    homepageTextField = new JTextField();
    65
    weblogTextField = new JTextField();
    Differences
    Expression1Expression2Difference
    homepageTextFieldweblogTextFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression homepageTextField is a field being modified, and thus it cannot be parameterized
    Expression weblogTextField is a field being modified, and thus it cannot be parameterized
    65
    weblogTextField = new JTextField();
    60
    homepageButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    60
    homepageButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    66
    weblogButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    Differences
    Expression1Expression2Difference
    homepageButtonweblogButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression homepageButton is a field being modified, and thus it cannot be parameterized
    Expression weblogButton is a field being modified, and thus it cannot be parameterized
    66
    weblogButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    61
    homepageButton.setMargin(new Insets(0, 0, 0, 0));
    61
    homepageButton.setMargin(new Insets(0, 0, 0, 0));
    67
    weblogButton.setMargin(new Insets(0, 0, 0, 0));
    Differences
    Expression1Expression2Difference
    homepageButtonweblogButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression homepageButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression weblogButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    67
    weblogButton.setMargin(new Insets(0, 0, 0, 0));
    62
    homepageButton.addActionListener(new ActionListener() {...});
    62
    homepageButton.addActionListener(new ActionListener() {...});
    68
    weblogButton.addActionListener(new ActionListener() {...});
    Differences
    Expression1Expression2Difference
    homepageTextFieldweblogTextFieldVARIABLE_NAME_MISMATCH
    homepageButtonweblogButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression homepageTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression weblogTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression homepageButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression weblogButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    68
    weblogButton.addActionListener(new ActionListener() {...});
    63
    weblogLabel = new JLabel();
    63
    weblogLabel = new JLabel();
    69
    calendarLabel = new JLabel();
    Differences
    Expression1Expression2Difference
    weblogLabelcalendarLabelVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression weblogLabel is a field being modified, and thus it cannot be parameterized
    Expression calendarLabel is a field being modified, and thus it cannot be parameterized
    69
    calendarLabel = new JLabel();
    64
    panel5 = new JPanel();
    64
    panel5 = new JPanel();
    70
    panel6 = new JPanel();
    Differences
    Expression1Expression2Difference
    panel5panel6VARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression panel5 is a field being modified, and thus it cannot be parameterized
    Expression panel6 is a field being modified, and thus it cannot be parameterized
    70
    panel6 = new JPanel();
    65
    weblogTextField = new JTextField();
    65
    weblogTextField = new JTextField();
    71
    calendarTextField = new JTextField();
    Differences
    Expression1Expression2Difference
    weblogTextFieldcalendarTextFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression weblogTextField is a field being modified, and thus it cannot be parameterized
    Expression calendarTextField is a field being modified, and thus it cannot be parameterized
    71
    calendarTextField = new JTextField();
    66
    weblogButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    66
    weblogButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    72
    calendarButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    Differences
    Expression1Expression2Difference
    weblogButtoncalendarButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression weblogButton is a field being modified, and thus it cannot be parameterized
    Expression calendarButton is a field being modified, and thus it cannot be parameterized
    72
    calendarButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    67
    weblogButton.setMargin(new Insets(0, 0, 0, 0));
    67
    weblogButton.setMargin(new Insets(0, 0, 0, 0));
    73
    calendarButton.setMargin(new Insets(0, 0, 0, 0));
    Differences
    Expression1Expression2Difference
    weblogButtoncalendarButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression weblogButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression calendarButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    73
    calendarButton.setMargin(new Insets(0, 0, 0, 0));
    68
    weblogButton.addActionListener(new ActionListener() {...});
    68
    weblogButton.addActionListener(new ActionListener() {...});
    74
    calendarButton.addActionListener(new ActionListener() {...});
    Differences
    Expression1Expression2Difference
    weblogTextFieldcalendarTextFieldVARIABLE_NAME_MISMATCH
    weblogButtoncalendarButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression weblogTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression calendarTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression weblogButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression calendarButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    74
    calendarButton.addActionListener(new ActionListener() {...});
    69
    calendarLabel = new JLabel();
    69
    calendarLabel = new JLabel();
    75
    freebusyLabel = new JLabel();
    Differences
    Expression1Expression2Difference
    calendarLabelfreebusyLabelVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression calendarLabel is a field being modified, and thus it cannot be parameterized
    Expression freebusyLabel is a field being modified, and thus it cannot be parameterized
    75
    freebusyLabel = new JLabel();
    70
    panel6 = new JPanel();
    70
    panel6 = new JPanel();
    76
    panel8 = new JPanel();
    Differences
    Expression1Expression2Difference
    panel6panel8VARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression panel6 is a field being modified, and thus it cannot be parameterized
    Expression panel8 is a field being modified, and thus it cannot be parameterized
    76
    panel8 = new JPanel();
    71
    calendarTextField = new JTextField();
    71
    calendarTextField = new JTextField();
    77
    freebusyTextField = new JTextField();
    Differences
    Expression1Expression2Difference
    calendarTextFieldfreebusyTextFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression calendarTextField is a field being modified, and thus it cannot be parameterized
    Expression freebusyTextField is a field being modified, and thus it cannot be parameterized
    77
    freebusyTextField = new JTextField();
    72
    calendarButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    72
    calendarButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    78
    freebusyButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    Differences
    Expression1Expression2Difference
    calendarButtonfreebusyButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression calendarButton is a field being modified, and thus it cannot be parameterized
    Expression freebusyButton is a field being modified, and thus it cannot be parameterized
    78
    freebusyButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    73
    calendarButton.setMargin(new Insets(0, 0, 0, 0));
    73
    calendarButton.setMargin(new Insets(0, 0, 0, 0));
    79
    freebusyButton.setMargin(new Insets(0, 0, 0, 0));
    Differences
    Expression1Expression2Difference
    calendarButtonfreebusyButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression calendarButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression freebusyButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    79
    freebusyButton.setMargin(new Insets(0, 0, 0, 0));
    74
    calendarButton.addActionListener(new ActionListener() {...});
    74
    calendarButton.addActionListener(new ActionListener() {...});
    80
    freebusyButton.addActionListener(new ActionListener() {...});
    Differences
    Expression1Expression2Difference
    calendarTextFieldfreebusyTextFieldVARIABLE_NAME_MISMATCH
    calendarButtonfreebusyButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression calendarTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression freebusyTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression calendarButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression freebusyButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    80
    freebusyButton.addActionListener(new ActionListener() {...});
    Precondition Violations (42)
    Row Violation
    1Expression homepageLabel is a field being modified, and thus it cannot be parameterized
    2Expression weblogLabel is a field being modified, and thus it cannot be parameterized
    3Expression panel1 is a field being modified, and thus it cannot be parameterized
    4Expression panel5 is a field being modified, and thus it cannot be parameterized
    5Expression homepageTextField is a field being modified, and thus it cannot be parameterized
    6Expression weblogTextField is a field being modified, and thus it cannot be parameterized
    7Expression homepageButton is a field being modified, and thus it cannot be parameterized
    8Expression weblogButton is a field being modified, and thus it cannot be parameterized
    9Expression homepageButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression weblogButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression homepageTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression weblogTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression homepageButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression weblogButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression weblogLabel is a field being modified, and thus it cannot be parameterized
    16Expression calendarLabel is a field being modified, and thus it cannot be parameterized
    17Expression panel5 is a field being modified, and thus it cannot be parameterized
    18Expression panel6 is a field being modified, and thus it cannot be parameterized
    19Expression weblogTextField is a field being modified, and thus it cannot be parameterized
    20Expression calendarTextField is a field being modified, and thus it cannot be parameterized
    21Expression weblogButton is a field being modified, and thus it cannot be parameterized
    22Expression calendarButton is a field being modified, and thus it cannot be parameterized
    23Expression weblogButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    24Expression calendarButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25Expression weblogTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    26Expression calendarTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    27Expression weblogButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    28Expression calendarButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    29Expression calendarLabel is a field being modified, and thus it cannot be parameterized
    30Expression freebusyLabel is a field being modified, and thus it cannot be parameterized
    31Expression panel6 is a field being modified, and thus it cannot be parameterized
    32Expression panel8 is a field being modified, and thus it cannot be parameterized
    33Expression calendarTextField is a field being modified, and thus it cannot be parameterized
    34Expression freebusyTextField is a field being modified, and thus it cannot be parameterized
    35Expression calendarButton is a field being modified, and thus it cannot be parameterized
    36Expression freebusyButton is a field being modified, and thus it cannot be parameterized
    37Expression calendarButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    38Expression freebusyButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    39Expression calendarTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    40Expression freebusyTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    41Expression calendarButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    42Expression freebusyButton cannot be parameterized, because it has dependencies to/from statements that will be extracted