cutAction.setEnabled(false); copyAction.setEnabled(false); pasteAction.setEnabled(false); deleteAction.setEnabled(false); undoAction.setEnabled(false); redoAction.setEnabled(false); selectAllAction.setEnabled(false); return;
if (playsoundCheckBox.isSelected()) { defaultRadioButton.setEnabled(true); chooseRadioButton.setEnabled(true); chooseButton.setEnabled(true); } else { defaultRadioButton.setEnabled(false); chooseRadioButton.setEnabled(false); chooseButton.setEnabled(false); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/focus/FocusManager.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/account/ReceiveOptionsPanel.java
Method name: void enableActions(FocusOwner) Method name: void updateComponents(boolean)
Number of AST nodes: 8 Number of AST nodes: 7
1
cutAction.setEnabled(false);
2
			copyActi
1
if (playsoundCheckBox.isSelected()) {
3
on.setEnabled(false);
2
				defaultRadioButton.setEnabled(true);
4
			pasteAction.setEnabled(false);
3
				chooseRadioButton.setEnabled(true);
5
			deleteAction.setEnabled(fa
4
				chooseButton.setEnabled(true);
6
lse);
5
			} else {
7
			undoAction.setEnabled(false);
6
				defaultRadioButton.setEnabled(false);
8
			redoAction.setEnabled(false);
7
				chooseRadioButton.setEnabled(false);
9
			selectAllAction.setEnabled(false);
8
				chooseButton.setEnabled(false);
10
			return;
9
			}
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
Number of node comparisons48
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    2
    cutAction.setEnabled(false);
    2
    cutAction.setEnabled(false);
    24
    defaultRadioButton.setEnabled(true);
    Differences
    Expression1Expression2Difference
    falsetrueLITERAL_VALUE_MISMATCH
    cutActiondefaultRadioButtonVARIABLE_NAME_MISMATCH
    org.columba.core.gui.action.AbstractColumbaActionjavax.swing.JRadioButtonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.core.gui.action.AbstractColumbaAction of variable cutAction does not match with type javax.swing.JRadioButton of variable defaultRadioButton
    • Make classes org.columba.core.gui.action.AbstractColumbaAction and javax.swing.JRadioButton extend a common superclass
    24
    defaultRadioButton.setEnabled(true);
    3
    copyAction.setEnabled(false);
    3
    copyAction.setEnabled(false);
    25
    chooseRadioButton.setEnabled(true);
    Differences
    Expression1Expression2Difference
    falsetrueLITERAL_VALUE_MISMATCH
    copyActionchooseRadioButtonVARIABLE_NAME_MISMATCH
    org.columba.core.gui.action.AbstractColumbaActionjavax.swing.JRadioButtonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.core.gui.action.AbstractColumbaAction of variable copyAction does not match with type javax.swing.JRadioButton of variable chooseRadioButton
    • Make classes org.columba.core.gui.action.AbstractColumbaAction and javax.swing.JRadioButton extend a common superclass
    25
    chooseRadioButton.setEnabled(true);
    4
    pasteAction.setEnabled(false);
    4
    pasteAction.setEnabled(false);
    26
    chooseButton.setEnabled(true);
    Differences
    Expression1Expression2Difference
    falsetrueLITERAL_VALUE_MISMATCH
    pasteActionchooseButtonVARIABLE_NAME_MISMATCH
    org.columba.core.gui.action.AbstractColumbaActionjavax.swing.JButtonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.core.gui.action.AbstractColumbaAction of variable pasteAction does not match with type javax.swing.JButton of variable chooseButton
    • Make classes org.columba.core.gui.action.AbstractColumbaAction and javax.swing.JButton extend a common superclass
    26
    chooseButton.setEnabled(true);
    5
    deleteAction.setEnabled(false);
    5
    deleteAction.setEnabled(false);
    27
    defaultRadioButton.setEnabled(false);
    Differences
    Expression1Expression2Difference
    deleteActiondefaultRadioButtonVARIABLE_NAME_MISMATCH
    org.columba.core.gui.action.AbstractColumbaActionjavax.swing.JRadioButtonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.core.gui.action.AbstractColumbaAction of variable deleteAction does not match with type javax.swing.JRadioButton of variable defaultRadioButton
    • Make classes org.columba.core.gui.action.AbstractColumbaAction and javax.swing.JRadioButton extend a common superclass
    27
    defaultRadioButton.setEnabled(false);
    6
    undoAction.setEnabled(false);
    6
    undoAction.setEnabled(false);
    28
    chooseRadioButton.setEnabled(false);
    Differences
    Expression1Expression2Difference
    undoActionchooseRadioButtonVARIABLE_NAME_MISMATCH
    org.columba.core.gui.action.AbstractColumbaActionjavax.swing.JRadioButtonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.core.gui.action.AbstractColumbaAction of variable undoAction does not match with type javax.swing.JRadioButton of variable chooseRadioButton
    • Make classes org.columba.core.gui.action.AbstractColumbaAction and javax.swing.JRadioButton extend a common superclass
    28
    chooseRadioButton.setEnabled(false);
    7
    redoAction.setEnabled(false);
    7
    redoAction.setEnabled(false);
    29
    chooseButton.setEnabled(false);
    Differences
    Expression1Expression2Difference
    redoActionchooseButtonVARIABLE_NAME_MISMATCH
    org.columba.core.gui.action.AbstractColumbaActionjavax.swing.JButtonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.core.gui.action.AbstractColumbaAction of variable redoAction does not match with type javax.swing.JButton of variable chooseButton
    • Make classes org.columba.core.gui.action.AbstractColumbaAction and javax.swing.JButton extend a common superclass
    29
    chooseButton.setEnabled(false);
    8
    selectAllAction.setEnabled(false);
    8
    selectAllAction.setEnabled(false);
    Preondition Violations
    Unmatched statement selectAllAction.setEnabled(false); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                              
    9
    return;
    9
    return;
    Preondition Violations
    Unmatched return;
                        
    Precondition Violations (8)
    Row Violation
    1Type org.columba.core.gui.action.AbstractColumbaAction of variable cutAction does not match with type javax.swing.JRadioButton of variable defaultRadioButton
    2Type org.columba.core.gui.action.AbstractColumbaAction of variable copyAction does not match with type javax.swing.JRadioButton of variable chooseRadioButton
    3Type org.columba.core.gui.action.AbstractColumbaAction of variable pasteAction does not match with type javax.swing.JButton of variable chooseButton
    4Type org.columba.core.gui.action.AbstractColumbaAction of variable deleteAction does not match with type javax.swing.JRadioButton of variable defaultRadioButton
    5Type org.columba.core.gui.action.AbstractColumbaAction of variable undoAction does not match with type javax.swing.JRadioButton of variable chooseRadioButton
    6Type org.columba.core.gui.action.AbstractColumbaAction of variable redoAction does not match with type javax.swing.JButton of variable chooseButton
    7Unmatched statement selectAllAction.setEnabled(false); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    8Unmatched return;