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 statements3
    Number of unmapped statements in the first code fragment5
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    2
    cutAction.setEnabled(false);
                                                                  
    3
    copyAction.setEnabled(false);
                                                                    
    4
    pasteAction.setEnabled(false);
                                                                      
    5
    deleteAction.setEnabled(false);
                                                                        
                                                                                    
    24
    defaultRadioButton.setEnabled(true);
                                                                                  
    25
    chooseRadioButton.setEnabled(true);
                                                                        
    26
    chooseButton.setEnabled(true);
    6
    undoAction.setEnabled(false);
    6
    undoAction.setEnabled(false);
    29
    chooseButton.setEnabled(false);
    Differences
    Expression1Expression2Difference
    undoActionchooseButtonVARIABLE_NAME_MISMATCH
    org.columba.core.gui.action.AbstractColumbaActionjavax.swing.JButtonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.core.gui.action.AbstractColumbaAction of variable undoAction 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);
    7
    redoAction.setEnabled(false);
    7
    redoAction.setEnabled(false);
    28
    chooseRadioButton.setEnabled(false);
    Differences
    Expression1Expression2Difference
    redoActionchooseRadioButtonVARIABLE_NAME_MISMATCH
    org.columba.core.gui.action.AbstractColumbaActionjavax.swing.JRadioButtonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.core.gui.action.AbstractColumbaAction of variable redoAction 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);
    8
    selectAllAction.setEnabled(false);
    8
    selectAllAction.setEnabled(false);
    27
    defaultRadioButton.setEnabled(false);
    Differences
    Expression1Expression2Difference
    selectAllActiondefaultRadioButtonVARIABLE_NAME_MISMATCH
    org.columba.core.gui.action.AbstractColumbaActionjavax.swing.JRadioButtonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.core.gui.action.AbstractColumbaAction of variable selectAllAction 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);
    9
    return;
    9
    return;
    Preondition Violations
    Unmatched return;
                        
    Precondition Violations (4)
    Row Violation
    1Type org.columba.core.gui.action.AbstractColumbaAction of variable undoAction does not match with type javax.swing.JButton of variable chooseButton
    2Type org.columba.core.gui.action.AbstractColumbaAction of variable redoAction does not match with type javax.swing.JRadioButton of variable chooseRadioButton
    3Type org.columba.core.gui.action.AbstractColumbaAction of variable selectAllAction does not match with type javax.swing.JRadioButton of variable defaultRadioButton
    4Unmatched return;