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[1] = new ContactListModel(); dialogAddressbookListModel[1].setHeaderItemList(ccListModel); ccList = new ContactDNDListView(dialogAddressbookListModel[1]); ccList.setMinimumSize(new Dimension(150, 150)); ccList.addMouseListener(new DoubleClickListener() { public void doubleClick(MouseEvent ev) { actionPerformed(new ActionEvent(ccList, 0, "CC_REMOVE")); } }); bccLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "bcc"));
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[1] = new ContactListModel();
2
		dialogAddressbookListModel[0].setHeaderItemList(toListModel);
2
		dialogAddressbookListModel[1].setHeaderItemList(ccListModel);
3
		toList = new ContactDNDListView(dialogAddressbookListModel[0]);
3
		ccList = new ContactDNDListView(dialogAddressbookListModel[1]);
4
		toList.setMinimumSize(new Dimension(150, 150));
4
		ccList.setMinimumSize(new Dimension(150, 150));
5
		toList.addMouseListener(new DoubleClickListener() {
5
		ccList.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(ccList, 0, "CC_REMOVE"));
8
			}
8
			}
9
		});
9
		});
10
		ccLabel = new JLabel(MailResourceLoader.getString("dialog",
10
		bccLabel = new JLabel(MailResourceLoader.getString("dialog",
11
				"selectaddressdialog", "cc"));
11
				"selectaddressdialog", "bcc"));
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();
    8
    dialogAddressbookListModel[1] = new ContactListModel();
    Differences
    Expression1Expression2Difference
    01LITERAL_VALUE_MISMATCH
    8
    dialogAddressbookListModel[1] = new ContactListModel();
    3
    dialogAddressbookListModel[0].setHeaderItemList(toListModel);
    3
    dialogAddressbookListModel[0].setHeaderItemList(toListModel);
    9
    dialogAddressbookListModel[1].setHeaderItemList(ccListModel);
    Differences
    Expression1Expression2Difference
    toListModelccListModelVARIABLE_NAME_MISMATCH
    01LITERAL_VALUE_MISMATCH
    9
    dialogAddressbookListModel[1].setHeaderItemList(ccListModel);
    4
    toList = new ContactDNDListView(dialogAddressbookListModel[0]);
    4
    toList = new ContactDNDListView(dialogAddressbookListModel[0]);
    10
    ccList = new ContactDNDListView(dialogAddressbookListModel[1]);
    Differences
    Expression1Expression2Difference
    toListccListVARIABLE_NAME_MISMATCH
    01LITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression toList is a field being modified, and thus it cannot be parameterized
    Expression ccList is a field being modified, and thus it cannot be parameterized
    10
    ccList = new ContactDNDListView(dialogAddressbookListModel[1]);
    5
    toList.setMinimumSize(new Dimension(150, 150));
    5
    toList.setMinimumSize(new Dimension(150, 150));
    11
    ccList.setMinimumSize(new Dimension(150, 150));
    Differences
    Expression1Expression2Difference
    toListccListVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression toList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11
    ccList.setMinimumSize(new Dimension(150, 150));
    6
    toList.addMouseListener(new DoubleClickListener() {...});
    6
    toList.addMouseListener(new DoubleClickListener() {...});
    12
    ccList.addMouseListener(new DoubleClickListener() {...});
    Differences
    Expression1Expression2Difference
    toListccListVARIABLE_NAME_MISMATCH
    "TO_REMOVE""CC_REMOVE"LITERAL_VALUE_MISMATCH
    toListccListVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression toList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ccList 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 ccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12
    ccList.addMouseListener(new DoubleClickListener() {...});
    7
    ccLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "cc"));
    7
    ccLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "cc"));
    13
    bccLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "bcc"));
    Differences
    Expression1Expression2Difference
    ccLabelbccLabelVARIABLE_NAME_MISMATCH
    "cc""bcc"LITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression ccLabel is a field being modified, and thus it cannot be parameterized
    Expression bccLabel is a field being modified, and thus it cannot be parameterized
    13
    bccLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "bcc"));
    Precondition Violations (10)
    Row Violation
    1Expression toList is a field being modified, and thus it cannot be parameterized
    2Expression ccList 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 ccList 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 ccList 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 ccList 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 bccLabel is a field being modified, and thus it cannot be parameterized