Dimension size = getSize(); Preferences.userRoot().putInt(PREF_KEY_ALIAS_PROPS_SHEET_WIDTH, size.width); Preferences.userRoot().putInt(PREF_KEY_ALIAS_PROPS_SHEET_HEIGHT, size.height); super.dispose();
Dimension size = getSize(); Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_WIDTH, size.width); Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_HEIGHT, size.height); Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_DIV_LOC, splSpilt.getDividerLocation());
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/AliasPropertiesInternalFrame.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/SQLHistoryDlg.java
Method name: void dispose() Method name: void onWindowClosed()
Number of AST nodes: 4 Number of AST nodes: 4
1
Dimension size = getSize();
1
Dimension size = getSize();
2
      Preferences.userRoot().putInt(PREF_KEY_ALIAS_PROPS_SHEET_WIDTH, size.width);
2
      Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_WIDTH, size.width);
3
      Preferences.userRoot().putInt(PREF_KEY_ALIAS_PROPS_SHEET_HEIGHT, size.height);
3
      Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_HEIGHT, size.height);
4
      super.dispose();
4
      Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_DIV_LOC, splSpilt.getDividerLocation());
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 comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    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
    1
    Dimension size = getSize();
    1
    Dimension size = getSize();
    2
    Preferences.userRoot().putInt(PREF_KEY_ALIAS_PROPS_SHEET_WIDTH, size.width);
    2
    Preferences.userRoot().putInt(PREF_KEY_ALIAS_PROPS_SHEET_WIDTH, size.width);
    2
    Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_WIDTH, size.width);
    Differences
    Expression1Expression2Difference
    PREF_KEY_ALIAS_PROPS_SHEET_WIDTHPREF_KEY_SQL_HISTORY_DLG_WIDTHVARIABLE_NAME_MISMATCH
    2
    Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_WIDTH, size.width);
    3
    Preferences.userRoot().putInt(PREF_KEY_ALIAS_PROPS_SHEET_HEIGHT, size.height);
    3
    Preferences.userRoot().putInt(PREF_KEY_ALIAS_PROPS_SHEET_HEIGHT, size.height);
    3
    Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_HEIGHT, size.height);
    Differences
    Expression1Expression2Difference
    PREF_KEY_ALIAS_PROPS_SHEET_HEIGHTPREF_KEY_SQL_HISTORY_DLG_HEIGHTVARIABLE_NAME_MISMATCH
    3
    Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_HEIGHT, size.height);
    4
    super.dispose();
    4
    super.dispose();
    4
    Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_DIV_LOC, splSpilt.getDividerLocation());
    Differences
    Expression1Expression2Difference
    super.dispose()Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_DIV_LOC,splSpilt.getDividerLocation())TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression super.dispose() is a void method call, and thus it cannot be parameterized
    Expression Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_DIV_LOC,splSpilt.getDividerLocation()) is a void method call, and thus it cannot be parameterized
    Super method call super.dispose(); cannot be extracted from method
    4
    Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_DIV_LOC, splSpilt.getDividerLocation());
    Precondition Violations (4)
    Row Violation
    1Expression super.dispose() is a void method call, and thus it cannot be parameterized
    2Expression Preferences.userRoot().putInt(PREF_KEY_SQL_HISTORY_DLG_DIV_LOC,splSpilt.getDividerLocation()) is a void method call, and thus it cannot be parameterized
    3Super method call super.dispose(); cannot be extracted from method
    4The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.gui.db.aliasproperties.AliasPropertiesInternalFrame and net.sourceforge.squirrel_sql.client.session.mainpanel.SQLHistoryDlg do not have a common superclass