boolean enabled = useProxyRadioButton.isSelected(); proxyHostLabel.setEnabled(enabled); proxyHostField.setEnabled(enabled); proxyPortLabel.setEnabled(enabled); proxyPortField.setEnabled(enabled); updateOkButton();
boolean playSound = playsoundCheckBox.isSelected(); defaultRadioButton.setEnabled(playSound); chooseButton.setEnabled(playSound); chooseRadioButton.setEnabled(playSound);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/config/ProxyConfigurationDialog.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/account/ReceiveOptionsPanel.java
Method name: void updateProxyDataPanel() Method name: void actionPerformed(ActionEvent)
Number of AST nodes: 6 Number of AST nodes: 4
1
boolean enabled = useProxyRadioButton.isSelected();
1
boolean 
2
        proxyHostLabel.setEnabled(enabled);
3
        proxyHostField.setEnabled(enabled);
4
        proxyPortLabel.setEnabled(enabled);
5
        proxyPortField.setEnabled(enabled);
6
        updateOkButton(
2
playSound = playsoundCheckBox.isSelected();
3
			defaultRadioButton.setEnabled(playSound);
4
			chooseButton.setEnabled(playSound);
7
);
5
			chooseRadioButton.setEnabled(playSound);
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 comparisons24
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    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
    1
    boolean enabled = useProxyRadioButton.isSelected();
    1
    boolean enabled = useProxyRadioButton.isSelected();
    16
    boolean playSound = playsoundCheckBox.isSelected();
    Differences
    Expression1Expression2Difference
    enabledplaySoundVARIABLE_NAME_MISMATCH
    useProxyRadioButtonplaysoundCheckBoxVARIABLE_NAME_MISMATCH
    javax.swing.JRadioButtonjavax.swing.JCheckBoxSUBCLASS_TYPE_MISMATCH
    16
    boolean playSound = playsoundCheckBox.isSelected();
    2
    proxyHostLabel.setEnabled(enabled);
    2
    proxyHostLabel.setEnabled(enabled);
    17
    defaultRadioButton.setEnabled(playSound);
    Differences
    Expression1Expression2Difference
    enabledplaySoundVARIABLE_NAME_MISMATCH
    proxyHostLabeldefaultRadioButtonVARIABLE_NAME_MISMATCH
    javax.swing.JLabeljavax.swing.JRadioButtonSUBCLASS_TYPE_MISMATCH
    17
    defaultRadioButton.setEnabled(playSound);
    3
    proxyHostField.setEnabled(enabled);
    3
    proxyHostField.setEnabled(enabled);
    18
    chooseButton.setEnabled(playSound);
    Differences
    Expression1Expression2Difference
    enabledplaySoundVARIABLE_NAME_MISMATCH
    proxyHostFieldchooseButtonVARIABLE_NAME_MISMATCH
    javax.swing.JTextFieldjavax.swing.JButtonSUBCLASS_TYPE_MISMATCH
    18
    chooseButton.setEnabled(playSound);
    4
    proxyPortLabel.setEnabled(enabled);
    4
    proxyPortLabel.setEnabled(enabled);
    19
    chooseRadioButton.setEnabled(playSound);
    Differences
    Expression1Expression2Difference
    enabledplaySoundVARIABLE_NAME_MISMATCH
    proxyPortLabelchooseRadioButtonVARIABLE_NAME_MISMATCH
    javax.swing.JLabeljavax.swing.JRadioButtonSUBCLASS_TYPE_MISMATCH
    19
    chooseRadioButton.setEnabled(playSound);
    5
    proxyPortField.setEnabled(enabled);
    5
    proxyPortField.setEnabled(enabled);
    Preondition Violations
    Unmatched statement proxyPortField.setEnabled(enabled); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                
    6
    updateOkButton();
                                            
    Precondition Violations (2)
    Row Violation
    1Unmatched statement proxyPortField.setEnabled(enabled); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2The refactoring of the clones is infeasible, because classes org.columba.core.gui.config.ProxyConfigurationDialog and org.columba.mail.gui.config.account.ReceiveOptionsPanel do not have a common superclass