closeButton.setDefaultCapable(true); closeButton.setMnemonic('C'); closeButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { setVisible(false); } });
closeButton.setDefaultCapable(true); closeButton.setMnemonic('C'); closeButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { toggleAttachmentPopupVisibility(); } });
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/AddressListDialog.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/HeaderViewer.java
Method name: void initComponents() Method name: JPanel createAttachmentViewerPanel()
Number of AST nodes: 3 Number of AST nodes: 3
1
closeButton.setDefaultCapable(true);
1
closeButton.setDefaultCapable(true);
2
		closeButton.setMnemonic('C');
2
		closeButton.setMnemonic('C');
3
		closeButton.addActionListener(new ActionListener() {
3
		closeButton.addActionListener(new ActionListener() {
4
			public void actionPerformed(ActionEvent event) {
4
			public void actionPerformed(ActionEvent event) {
5
				setVisible(false);
5
				toggleAttachmentPopupVisibility();
6
			}
6
			}
7
		});
7
		});
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 different classes having the same super class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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
    8
    closeButton.setDefaultCapable(true);
    8
    closeButton.setDefaultCapable(true);
    9
    closeButton.setMnemonic('C');
    9
    closeButton.setMnemonic('C');
    10
    closeButton.addActionListener(new ActionListener() {...});
    10
    closeButton.addActionListener(new ActionListener() {...});
    10
    closeButton.addActionListener(new ActionListener() {...});
    Differences
    Expression1Expression2Difference
    setVisibletoggleAttachmentPopupVisibilityMETHOD_INVOCATION_NAME_MISMATCH
    setVisible(false)toggleAttachmentPopupVisibility()ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression toggleAttachmentPopupVisibility() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method toggleAttachmentPopupVisibility
    Expression setVisible(false) is a void method call, and thus it cannot be parameterized
    Expression toggleAttachmentPopupVisibility() is a void method call, and thus it cannot be parameterized
    Expression toggleAttachmentPopupVisibility() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method toggleAttachmentPopupVisibility
    Expression setVisible(false) is a void method call, and thus it cannot be parameterized
    Expression toggleAttachmentPopupVisibility() is a void method call, and thus it cannot be parameterized
    10
    closeButton.addActionListener(new ActionListener() {...});
    Precondition Violations (6)
    Row Violation
    1Expression toggleAttachmentPopupVisibility() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression setVisible(false) is a void method call, and thus it cannot be parameterized
    3Expression toggleAttachmentPopupVisibility() is a void method call, and thus it cannot be parameterized
    4Expression toggleAttachmentPopupVisibility() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression setVisible(false) is a void method call, and thus it cannot be parameterized
    6Expression toggleAttachmentPopupVisibility() is a void method call, and thus it cannot be parameterized