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(); } } });
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: 6 Number of AST nodes: 6
1
homepageLabel = new JLabel();
1
freebusyLabel = new JLabel();
2
		panel1 = new JPanel();
2
		panel8 = new JPanel();
3
		homepageTextField = new JTextField();
3
		freebusyTextField = new JTextField();
4
		homepageButton = new JButton(ImageLoader
4
		freebusyButton = new JButton(ImageLoader
5
				.getSmallIcon(IconKeys.INTERNET));
5
				.getSmallIcon(IconKeys.INTERNET));
6
		homepageButton.setMargin(new Insets(0, 0, 0, 0));
6
		freebusyButton.setMargin(new Insets(0, 0, 0, 0));
7
		homepageButton.addActionListener(new ActionListener() {
7
		freebusyButton.addActionListener(new ActionListener() {
8
			public void actionPerformed(ActionEvent e) {
8
			public void actionPerformed(ActionEvent e) {
9
				String s = homepageTextField.getText();
9
				String s = freebusyTextField.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
		});
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 comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    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();
    75
    freebusyLabel = new JLabel();
    Differences
    Expression1Expression2Difference
    homepageLabelfreebusyLabelVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression homepageLabel 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();
    58
    panel1 = new JPanel();
    58
    panel1 = new JPanel();
    76
    panel8 = new JPanel();
    Differences
    Expression1Expression2Difference
    panel1panel8VARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression panel1 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();
    59
    homepageTextField = new JTextField();
    59
    homepageTextField = new JTextField();
    77
    freebusyTextField = new JTextField();
    Differences
    Expression1Expression2Difference
    homepageTextFieldfreebusyTextFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression homepageTextField 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();
    60
    homepageButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    60
    homepageButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    78
    freebusyButton = new JButton(ImageLoader.getSmallIcon(IconKeys.INTERNET));
    Differences
    Expression1Expression2Difference
    homepageButtonfreebusyButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression homepageButton 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));
    61
    homepageButton.setMargin(new Insets(0, 0, 0, 0));
    61
    homepageButton.setMargin(new Insets(0, 0, 0, 0));
    79
    freebusyButton.setMargin(new Insets(0, 0, 0, 0));
    Differences
    Expression1Expression2Difference
    homepageButtonfreebusyButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression homepageButton 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));
    62
    homepageButton.addActionListener(new ActionListener() {...});
    62
    homepageButton.addActionListener(new ActionListener() {...});
    80
    freebusyButton.addActionListener(new ActionListener() {...});
    Differences
    Expression1Expression2Difference
    homepageTextFieldfreebusyTextFieldVARIABLE_NAME_MISMATCH
    homepageButtonfreebusyButtonVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression homepageTextField 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 homepageButton 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 (14)
    Row Violation
    1Expression homepageLabel is a field being modified, and thus it cannot be parameterized
    2Expression freebusyLabel 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 panel8 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 freebusyTextField 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 freebusyButton 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 freebusyButton 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 freebusyTextField 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 freebusyButton cannot be parameterized, because it has dependencies to/from statements that will be extracted