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(); } } });
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(); } } });
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: 12 Number of AST nodes: 12
1
calendarLabel = new JLabel();
1
homepageLabel = new JLabel();
2
		panel6 = new JPanel();
2
		panel1 = new JPanel();
3
		calendarTextField = new JTextField();
3
		homepageTextField = new JTextField();
4
		calendarButton = new JButton(ImageLoader
4
		homepageButton = new JButton(ImageLoader
5
				.getSmallIcon(IconKeys.INTERNET));
5
				.getSmallIcon(IconKeys.INTERNET));
6
		calendarButton.setMargin(new Insets(0, 0, 0, 0));
6
		homepageButton.setMargin(new Insets(0, 0, 0, 0));
7
		calendarButton.addActionListener(new ActionListener() {
7
		homepageButton.addActionListener(new ActionListener() {
8
			public void actionPerformed(ActionEvent e) {
8
			public void actionPerformed(ActionEvent e) {
9
				String s = calendarTextField.getText();
9
				String s = homepageTextField.getText();
10
				try {
10
				try {
11
					URL url = new URL(s);
11
					URL url = new URL(s);
12
					ColumbaDesktop.getInstance().browse(url);
12
					ColumbaDesktop.getInstance().browse(url);
13
				} catch (MalformedURLException e1) {
13
				} catch (MalformedURLException e1) {
14
					e1.printStackTrace();
14
					e1.printStackTrace();
15
				}
15
				}
16
			}
16
			}
17
		});
17
		});
18
		freebusyLabel = new JLabel();
18
		weblogLabel = new JLabel();
19
		panel8 = new JPanel();
19
		panel5 = new JPanel();
20
		freebusyTextField = new JTextField();
20
		weblogTextField = new JTextField();
21
		freebusyButton = new JButton(ImageLoader
21
		weblogButton = new JButton(ImageLoader
22
				.getSmallIcon(IconKeys.INTERNET));
22
.getSmallIcon(IconKeys.INTERNET));
23
		freebusyButton.setMargin(new Insets(0, 0, 0, 0));
23
		weblogButton.setMargin(new Insets(0, 0, 0, 0));
24
		freebusyButton.addActionListener(new ActionListener() {
24
		weblogButton.addActionListener(new ActionListener() {
25
			public void actionPerformed(ActionEvent e) {
25
			public void actionPerformed(ActionEvent e) {
26
				String s = freebusyTextField.getText();
26
				String s = weblogTextField.getText();
27
				try {
27
				try {
28
					URL url = new URL(s);
28
					URL url = new URL(s);
29
					ColumbaDesktop.getInstance().browse(url);
29
					ColumbaDesktop.getInstance().browse(url);
30
				} catch (MalformedURLException e1) {
30
				} catch (MalformedURLException e1) {
31
					e1.printStackTrace();
31
					e1.printStackTrace();
32
				}
32
				}
33
			}
33
			}
34
		});
34
		});
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 comparisons59
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements12
    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
    69
    calendarLabel = new JLabel();
    69
    calendarLabel = new JLabel();
    63
    weblogLabel = new JLabel();
    Differences
    Expression1Expression2Difference
    calendarLabelweblogLabelVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression calendarLabel 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();
    70
    panel6 = new JPanel();
    70
    panel6 = new JPanel();
    64
    panel5 = new JPanel();
    Differences
    Expression1Expression2Difference
    panel6panel5VARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression panel6 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();
    71
    calendarTextField = new JTextField();
    71
    calendarTextField = new JTextField();
    65
    weblogTextField = new JTextField();
    Differences
    Expression1Expression2Difference
    calendarTextFieldweblogTextFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression calendarTextField 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();
    72
    calendarButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    72
    calendarButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    66
    weblogButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    Differences
    Expression1Expression2Difference
    calendarButtonweblogButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression calendarButton 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));
    73
    calendarButton.setMargin(new Insets(0, 0, 0, 0));
    73
    calendarButton.setMargin(new Insets(0, 0, 0, 0));
    67
    weblogButton.setMargin(new Insets(0, 0, 0, 0));
    Differences
    Expression1Expression2Difference
    calendarButtonweblogButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression calendarButton 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));
    74
    calendarButton.addActionListener(new ActionListener() {...});
    74
    calendarButton.addActionListener(new ActionListener() {...});
    68
    weblogButton.addActionListener(new ActionListener() {...});
    Differences
    Expression1Expression2Difference
    calendarTextFieldweblogTextFieldVARIABLE_NAME_MISMATCH
    calendarButtonweblogButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression calendarTextField 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 calendarButton 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() {...});
    75
    freebusyLabel = new JLabel();
    75
    freebusyLabel = new JLabel();
    57
    homepageLabel = new JLabel();
    Differences
    Expression1Expression2Difference
    freebusyLabelhomepageLabelVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression freebusyLabel is a field being modified, and thus it cannot be parameterized
    Expression homepageLabel is a field being modified, and thus it cannot be parameterized
    57
    homepageLabel = new JLabel();
    76
    panel8 = new JPanel();
    76
    panel8 = new JPanel();
    58
    panel1 = new JPanel();
    Differences
    Expression1Expression2Difference
    panel8panel1VARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression panel8 is a field being modified, and thus it cannot be parameterized
    Expression panel1 is a field being modified, and thus it cannot be parameterized
    58
    panel1 = new JPanel();
    77
    freebusyTextField = new JTextField();
    77
    freebusyTextField = new JTextField();
    59
    homepageTextField = new JTextField();
    Differences
    Expression1Expression2Difference
    freebusyTextFieldhomepageTextFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression freebusyTextField is a field being modified, and thus it cannot be parameterized
    Expression homepageTextField is a field being modified, and thus it cannot be parameterized
    59
    homepageTextField = new JTextField();
    78
    freebusyButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    78
    freebusyButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    60
    homepageButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    Differences
    Expression1Expression2Difference
    freebusyButtonhomepageButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression freebusyButton is a field being modified, and thus it cannot be parameterized
    Expression homepageButton is a field being modified, and thus it cannot be parameterized
    60
    homepageButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    79
    freebusyButton.setMargin(new Insets(0, 0, 0, 0));
    79
    freebusyButton.setMargin(new Insets(0, 0, 0, 0));
    61
    homepageButton.setMargin(new Insets(0, 0, 0, 0));
    Differences
    Expression1Expression2Difference
    freebusyButtonhomepageButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression freebusyButton 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
    61
    homepageButton.setMargin(new Insets(0, 0, 0, 0));
    80
    freebusyButton.addActionListener(new ActionListener() {...});
    80
    freebusyButton.addActionListener(new ActionListener() {...});
    62
    homepageButton.addActionListener(new ActionListener() {...});
    Differences
    Expression1Expression2Difference
    freebusyTextFieldhomepageTextFieldVARIABLE_NAME_MISMATCH
    freebusyButtonhomepageButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression freebusyTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression homepageTextField 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
    Expression homepageButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    62
    homepageButton.addActionListener(new ActionListener() {...});
    Precondition Violations (28)
    Row Violation
    1Expression calendarLabel 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 panel6 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 calendarTextField 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 calendarButton 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 calendarButton 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 calendarTextField 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 calendarButton 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 freebusyLabel is a field being modified, and thus it cannot be parameterized
    16Expression homepageLabel is a field being modified, and thus it cannot be parameterized
    17Expression panel8 is a field being modified, and thus it cannot be parameterized
    18Expression panel1 is a field being modified, and thus it cannot be parameterized
    19Expression freebusyTextField is a field being modified, and thus it cannot be parameterized
    20Expression homepageTextField is a field being modified, and thus it cannot be parameterized
    21Expression freebusyButton is a field being modified, and thus it cannot be parameterized
    22Expression homepageButton is a field being modified, and thus it cannot be parameterized
    23Expression freebusyButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    24Expression homepageButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25Expression freebusyTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    26Expression homepageTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    27Expression freebusyButton cannot be parameterized, because it has dependencies to/from statements that will be extracted
    28Expression homepageButton cannot be parameterized, because it has dependencies to/from statements that will be extracted