ccLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "cc")); //$NON-NLS-1$ 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")); //$NON-NLS-1$ 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")); } });
toLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "to")); //$NON-NLS-1$ 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")); //$NON-NLS-1$ 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")); } });
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: 12 Number of AST nodes: 12
1
ccLabel = new JLabel(MailResourceLoader.getString("dialog",
1
toLabel = new JLabel(MailResourceLoader.getString("dialog",
2
				"selectaddressdialog", "cc")); //$NON-NLS-1$
2
				"selectaddressdialog", "to")); //$NON-NLS-1$
3
		dialogAddressbookListModel[1] = new ContactListModel();
3
		dialogAddressbookListModel[0] = new ContactListModel();
4
		dialogAddressbookListModel[1].setHeaderItemList(ccListModel);
4
		dialogAddressbookListModel[0].setHeaderItemList(toListModel);
5
		ccList = new ContactDNDListView(dialogAddressbookListModel[1]);
5
		toList = new ContactDNDListView(dialogAddressbookListModel[0]);
6
		ccList.setMinimumSize(new Dimension(150, 150));
6
		toList.setMinimumSize(new Dimension(150, 150));
7
		ccList.addMouseListener(new DoubleClickListener() {
7
		toList.addMouseListener(new DoubleClickListener() {
8
			public void doubleClick(MouseEvent ev) {
8
			public void doubleClick(MouseEvent ev) {
9
				actionPerformed(new ActionEvent(ccList, 0, "CC_REMOVE"));
9
				actionPerformed(new ActionEvent(toList, 0, "TO_REMOVE"));
10
			}
10
			}
11
		});
11
		});
12
		bccLabel = new JLabel(MailResourceLoader.getString("dialog",
12
		ccLabel = new JLabel(MailResourceLoader.getString("dialog",
13
				"selectaddressdialog", "bcc")); //$NON-NLS-1$
13
				"selectaddressdialog", "cc")); //$NON-NLS-1$
14
		dialogAddressbookListModel[2] = new ContactListModel();
14
		dialogAddressbookListModel[1] = new ContactListModel();
15
		dialogAddressbookListModel[2].setHeaderItemList(bccListModel);
15
		dialogAddressbookListModel[1].setHeaderItemList(ccListModel);
16
		bccList = new ContactDNDListView(dialogAddressbookListModel[2]);
16
		ccList = new ContactDNDListView(dialogAddressbookListModel[1]);
17
		bccList.setMinimumSize(new Dimension(150, 150));
17
		ccList.setMinimumSize(new Dimension(150, 150));
18
		bccList.addMouseListener(new DoubleClickListener() {
18
		ccList.addMouseListener(new DoubleClickListener() {
19
			public void doubleClick(MouseEvent ev) {
19
			public void doubleClick(MouseEvent ev) {
20
				actionPerformed(new ActionEvent(bccList, 0, "BCC_REMOVE"));
20
				actionPerformed(new ActionEvent(ccList, 0, "CC_REMOVE"));
21
			}
21
			}
22
		});
22
		});
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 comparisons58
  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
    7
    ccLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "cc"));
    7
    ccLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "cc"));
    8
    dialogAddressbookListModel[1] = new ContactListModel();
    8
    dialogAddressbookListModel[1] = new ContactListModel();
    2
    dialogAddressbookListModel[0] = new ContactListModel();
    Differences
    Expression1Expression2Difference
    10LITERAL_VALUE_MISMATCH
    2
    dialogAddressbookListModel[0] = new ContactListModel();
    9
    dialogAddressbookListModel[1].setHeaderItemList(ccListModel);
    9
    dialogAddressbookListModel[1].setHeaderItemList(ccListModel);
    10
    ccList = new ContactDNDListView(dialogAddressbookListModel[1]);
    10
    ccList = new ContactDNDListView(dialogAddressbookListModel[1]);
    11
    ccList.setMinimumSize(new Dimension(150, 150));
    11
    ccList.setMinimumSize(new Dimension(150, 150));
    12
    ccList.addMouseListener(new DoubleClickListener() {...});
    12
    ccList.addMouseListener(new DoubleClickListener() {...});
    6
    toList.addMouseListener(new DoubleClickListener() {...});
    Differences
    Expression1Expression2Difference
    ccListtoListVARIABLE_NAME_MISMATCH
    "CC_REMOVE""TO_REMOVE"LITERAL_VALUE_MISMATCH
    ccListtoListVARIABLE_NAME_MISMATCH
    Preondition Violations
    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
    Expression toList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    toList.addMouseListener(new DoubleClickListener() {...});
    13
    bccLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "bcc"));
    13
    bccLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "bcc"));
    1
    toLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "to"));
    Differences
    Expression1Expression2Difference
    bccLabeltoLabelVARIABLE_NAME_MISMATCH
    "bcc""to"LITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression bccLabel is a field being modified, and thus it cannot be parameterized
    Expression toLabel is a field being modified, and thus it cannot be parameterized
    1
    toLabel = new JLabel(MailResourceLoader.getString("dialog", "selectaddressdialog", "to"));
    14
    dialogAddressbookListModel[2] = new ContactListModel();
    14
    dialogAddressbookListModel[2] = new ContactListModel();
    8
    dialogAddressbookListModel[1] = new ContactListModel();
    Differences
    Expression1Expression2Difference
    21LITERAL_VALUE_MISMATCH
    8
    dialogAddressbookListModel[1] = new ContactListModel();
    15
    dialogAddressbookListModel[2].setHeaderItemList(bccListModel);
    15
    dialogAddressbookListModel[2].setHeaderItemList(bccListModel);
    3
    dialogAddressbookListModel[0].setHeaderItemList(toListModel);
    Differences
    Expression1Expression2Difference
    bccListModeltoListModelVARIABLE_NAME_MISMATCH
    20LITERAL_VALUE_MISMATCH
    3
    dialogAddressbookListModel[0].setHeaderItemList(toListModel);
    16
    bccList = new ContactDNDListView(dialogAddressbookListModel[2]);
    16
    bccList = new ContactDNDListView(dialogAddressbookListModel[2]);
    4
    toList = new ContactDNDListView(dialogAddressbookListModel[0]);
    Differences
    Expression1Expression2Difference
    bccListtoListVARIABLE_NAME_MISMATCH
    20LITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression bccList is a field being modified, and thus it cannot be parameterized
    Expression toList is a field being modified, and thus it cannot be parameterized
    4
    toList = new ContactDNDListView(dialogAddressbookListModel[0]);
    17
    bccList.setMinimumSize(new Dimension(150, 150));
    17
    bccList.setMinimumSize(new Dimension(150, 150));
    5
    toList.setMinimumSize(new Dimension(150, 150));
    Differences
    Expression1Expression2Difference
    bccListtoListVARIABLE_NAME_MISMATCH
    Preondition Violations
    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
    5
    toList.setMinimumSize(new Dimension(150, 150));
    18
    bccList.addMouseListener(new DoubleClickListener() {...});
    18
    bccList.addMouseListener(new DoubleClickListener() {...});
    12
    ccList.addMouseListener(new DoubleClickListener() {...});
    Differences
    Expression1Expression2Difference
    bccListccListVARIABLE_NAME_MISMATCH
    "BCC_REMOVE""CC_REMOVE"LITERAL_VALUE_MISMATCH
    bccListccListVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression bccList 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 bccList 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() {...});
    Precondition Violations (14)
    Row Violation
    1Expression ccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression toList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression ccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression toList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression bccLabel is a field being modified, and thus it cannot be parameterized
    6Expression toLabel is a field being modified, and thus it cannot be parameterized
    7Expression bccList is a field being modified, and thus it cannot be parameterized
    8Expression toList is a field being modified, and thus it cannot be parameterized
    9Expression bccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression toList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression bccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression ccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression bccList cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression ccList cannot be parameterized, because it has dependencies to/from statements that will be extracted