if (prefs != null) { prefs.applyChanges(); }
if (button != null) { button.setEnabled(true); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/dataimport/src/net/sourceforge/squirrel_sql/plugins/dataimport/gui/DataImportGlobalPreferencesTab.java File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/gui/AbstractRefactoringDialog.java
Method name: void applyChanges() Method name: void enable(JButton)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (prefs != null) {
1
if (button != null)
2
            prefs.applyChanges();
3
        
2
		{
3
			button.setEnabled(true);
4
}
4
		}
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.3
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)14.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (prefs != null)
    1
    if (prefs != null)
    1
    if (button != null)
    Differences
    Expression1Expression2Difference
    prefsbuttonVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.plugins.dataimport.gui.PreferencesPaneljavax.swing.JButtonSUBCLASS_TYPE_MISMATCH
    1
    if (button != null)
    2
    prefs.applyChanges();
    2
    prefs.applyChanges();
    2
    button.setEnabled(true);
    Differences
    Expression1Expression2Difference
    applyChangessetEnabledMETHOD_INVOCATION_NAME_MISMATCH
    prefsbuttonVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.plugins.dataimport.gui.PreferencesPaneljavax.swing.JButtonSUBCLASS_TYPE_MISMATCH
    prefs.applyChanges()button.setEnabled(true)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression prefs.applyChanges() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression button.setEnabled(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression prefs.applyChanges() is a void method call, and thus it cannot be parameterized
    Expression button.setEnabled(true) is a void method call, and thus it cannot be parameterized
    Expression prefs cannot be unified with expression button , because common superclass javax.swing.JComponent does not declare member(s) public void applyChanges()
    Expression prefs.applyChanges() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression button.setEnabled(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression prefs.applyChanges() is a void method call, and thus it cannot be parameterized
    Expression button.setEnabled(true) is a void method call, and thus it cannot be parameterized
    2
    button.setEnabled(true);
    Precondition Violations (10)
    Row Violation
    1Expression prefs.applyChanges() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression button.setEnabled(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression prefs.applyChanges() is a void method call, and thus it cannot be parameterized
    4Expression button.setEnabled(true) is a void method call, and thus it cannot be parameterized
    5Expression prefs cannot be unified with expression button , because common superclass javax.swing.JComponent does not declare member(s) public void applyChanges()
    6Expression prefs.applyChanges() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression button.setEnabled(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression prefs.applyChanges() is a void method call, and thus it cannot be parameterized
    9Expression button.setEnabled(true) is a void method call, and thus it cannot be parameterized
    10The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.dataimport.gui.DataImportGlobalPreferencesTab and net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog do not have a common superclass