dialogAddressbookListModel[0] = new ContactListModel(); dialogAddressbookListModel[0].setHeaderItemList(toListModel); toList = new ContactDNDListView(dialogAddressbookListModel[0]); toList.setMinimumSize(new Dimension(150, 150)); toList.addMouseListener(new DoubleClickListener() { public void doubleClick(MouseEvent ev) { actionPerformed(new ActionEvent(toList, 0, "TO_REMOVE")); } }); ccLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "cc"));
dialogAddressbookListModel[2] = new ContactListModel(); dialogAddressbookListModel[2].setHeaderItemList(bccListModel); bccList = new ContactDNDListView(dialogAddressbookListModel[2]); bccList.setMinimumSize(new Dimension(150, 150)); bccList.addMouseListener(new DoubleClickListener() { public void doubleClick(MouseEvent ev) { actionPerformed(new ActionEvent(bccList, 0, "BCC_REMOVE")); } }); toButton = new JButton(MailResourceLoader.getString("dialog", "selectaddressdialog", "right_arrow_to"));
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/contact/SelectAddressDialog.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/contact/SelectAddressDialog.java
Method name: void initComponents() Method name: void initComponents()
Number of AST nodes: 6 Number of AST nodes: 6
1
dialogAddressbookListModel[0] = new ContactListModel();
1
dialogAddressbookListModel[2] = new ContactListModel();
2
		dialogAddressbookListModel[0].setHeaderItemList(toListModel);
2
		dialogAddressbookListModel[2].setHeaderItemList(bccListModel);
3
		toList = new ContactDNDListView(dialogAddressbookListModel[0]);
3
		bccList = new ContactDNDListView(dialogAddressbookListModel[2]);
4
		toList.setMinimumSize(new Dimension(150, 150));
4
		bccList.setMinimumSize(new Dimension(150, 150));
5
		toList.addMouseListener(new DoubleClickListener() {
5
		bccList.addMouseListener(new DoubleClickListener() {
6
			public void doubleClick(MouseEvent ev) {
6
			public void doubleClick(MouseEvent ev) {
7
				actionPerformed(new ActionEvent(toList, 0, "TO_REMOVE"));
7
				actionPerformed(new ActionEvent(bccList, 0, "BCC_REMOVE"));
8
			}
8
			}
9
		});
9
		});
10
		ccLabel = new JLabel(MailResourceLoader.getString("dialog",
10
		toButton = new JButton(MailResourceLoader.getString("dialog",
11
				"selectaddressdialog", "cc"));
11
				"selectaddressdialog", "right_arrow_to"));
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 comparisons15
  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
    2
    dialogAddressbookListModel[0] = new ContactListModel();
    2
    dialogAddressbookListModel[0] = new ContactListModel();
    14
    dialogAddressbookListModel[2] = new ContactListModel();
    Differences
    Expression1Expression2Difference
    02LITERAL_VALUE_MISMATCH
    14
    dialogAddressbookListModel[2] = new ContactListModel();
    3
    dialogAddressbookListModel[0].setHeaderItemList(toListModel);
    3
    dialogAddressbookListModel[0].setHeaderItemList(toListModel);
    15
    dialogAddressbookListModel[2].setHeaderItemList(bccListModel);
    Differences
    Expression1Expression2Difference
    toListModelbccListModelVARIABLE_NAME_MISMATCH
    02LITERAL_VALUE_MISMATCH
    15
    dialogAddressbookListModel[2].setHeaderItemList(bccListModel);
    4
    toList = new ContactDNDListView(dialogAddressbookListModel[0]);
    4
    toList = new ContactDNDListView(dialogAddressbookListModel[0]);
    16
    bccList = new ContactDNDListView(dialogAddressbookListModel[2]);
    Differences
    Expression1Expression2Difference
    toListbccListVARIABLE_NAME_MISMATCH
    02LITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression toList is a field being modified, and thus it cannot be parameterized
    Expression bccList is a field being modified, and thus it cannot be parameterized
    16
    bccList = new ContactDNDListView(dialogAddressbookListModel[2]);
    5
    toList.setMinimumSize(new Dimension(150, 150));
    5
    toList.setMinimumSize(new Dimension(150, 150));
    17
    bccList.setMinimumSize(new Dimension(150, 150));
    Differences
    Expression1Expression2Difference
    toListbccListVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression toList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17
    bccList.setMinimumSize(new Dimension(150, 150));
    6
    toList.addMouseListener(new DoubleClickListener() {...});
    6
    toList.addMouseListener(new DoubleClickListener() {...});
    18
    bccList.addMouseListener(new DoubleClickListener() {...});
    Differences
    Expression1Expression2Difference
    toListbccListVARIABLE_NAME_MISMATCH
    "TO_REMOVE""BCC_REMOVE"LITERAL_VALUE_MISMATCH
    toListbccListVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression toList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression toList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    18
    bccList.addMouseListener(new DoubleClickListener() {...});
    7
    ccLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "cc"));
    7
    ccLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "cc"));
    19
    toButton = new JButton(MailResourceLoader.getString("dialog", "selectaddressdialog", "right_arrow_to"));
    Differences
    Expression1Expression2Difference
    ccLabeltoButtonVARIABLE_NAME_MISMATCH
    javax.swing.JLabeljavax.swing.JButtonSUBCLASS_TYPE_MISMATCH
    javax.swing.JLabeljavax.swing.JButtonSUBCLASS_TYPE_MISMATCH
    "cc""right_arrow_to"LITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression ccLabel is a field being modified, and thus it cannot be parameterized
    Expression toButton is a field being modified, and thus it cannot be parameterized
    19
    toButton = new JButton(MailResourceLoader.getString("dialog", "selectaddressdialog", "right_arrow_to"));
    Precondition Violations (10)
    Row Violation
    1Expression toList is a field being modified, and thus it cannot be parameterized
    2Expression bccList is a field being modified, and thus it cannot be parameterized
    3Expression toList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression bccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression toList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression bccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression toList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression bccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression ccLabel is a field being modified, and thus it cannot be parameterized
    10Expression toButton is a field being modified, and thus it cannot be parameterized