JPanel ret = new JPanel(); ret.setLayout(new GridBagLayout()); GridBagConstraints gbc; // i18n[SchemaPropertiesPanel.printCacheFileLocation=Print cache file path to message panel] btnPrintCacheFileLocation = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.printCacheFileLocation")); gbc = new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,5,5), 0,0); ret.add(btnPrintCacheFileLocation, gbc); // i18n[SchemaPropertiesPanel.deleteCache=Delete cache file] btnDeleteCache = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.deleteCache")); gbc = new GridBagConstraints(1,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,5,5,5), 0,0); ret.add(btnDeleteCache, gbc); return ret;
JPanel ret = new JPanel(); ret.setLayout(new GridBagLayout()); GridBagConstraints gbc; gbc = new GridBagConstraints(0,0,1,1,0,0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5,5,5,5), 0,0); btnYes = new JButton(s_stringMgr.getString("SessionStartupTimeHintDlg.yes")); ret.add(btnYes, gbc); gbc = new GridBagConstraints(1,0,1,1,0,0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5,5,5,5), 0,0); btnNo = new JButton(s_stringMgr.getString("SessionStartupTimeHintDlg.no")); ret.add(btnNo, gbc); return ret;
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/SchemaPropertiesPanel.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/desktopcontainer/TabbedStyleHintDlg.java
Method name: JPanel createCacheFilePanel() Method name: JPanel createButtonPanel()
Number of AST nodes: 10 Number of AST nodes: 10
1
JPanel ret = new JPanel();
1
JPanel ret = new JPanel();
2
      ret.setLayout(new GridBagLayout());
2
      ret.setLayout(new GridBagLayout());
3
      GridBagConstraints gbc;
3
      GridBagConstraints gbc;
4
      // i18n[SchemaPropertiesPanel.printCacheFileLocation=Print cache file path to message panel]
5
      btnPrintCacheFileLocation = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.printCacheFileLocation"));
6
      gbc = new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,5,5), 0,0);
4
      gbc = new GridBagConstraints(0,0,1,1,0,0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5,5,5,5), 0,0);
7
      ret.add(btnPrintCacheFileLocation, gbc);
5
      
8
      // i18n[SchemaPropertiesPanel.deleteCache=Delete cache file]
9
      btnDeleteCache = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.deleteCache")
6
btnYes = new JButton(s_stringMgr.getString("SessionStartupTimeHintDlg.yes"));
10
);
7
      ret.add(btnYes, gbc);
11
      gbc = new GridBagConstraints(1,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,5,5,5), 0,0);
8
      gbc = new GridBagConstraints(1,0,1,1,0,0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5,5,5,5), 0,0);
12
      ret.add(btnDeleteCache
9
      btnNo = new JButton(s_stringMgr.getString("SessionStartupTimeHintDlg.no"));
13
, gbc);
10
      ret.add(btnNo, gbc);
14
      return ret;
11
      return ret;
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 comparisons40
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements10
    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
    JPanel ret = new JPanel();
    1
    JPanel ret = new JPanel();
    2
    ret.setLayout(new GridBagLayout());
    2
    ret.setLayout(new GridBagLayout());
    3
    GridBagConstraints gbc;
    3
    GridBagConstraints gbc;
    4
    btnPrintCacheFileLocation = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.printCacheFileLocation"));
    4
    btnPrintCacheFileLocation = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.printCacheFileLocation"));
    5
    btnYes = new JButton(s_stringMgr.getString("SessionStartupTimeHintDlg.yes"));
    Differences
    Expression1Expression2Difference
    btnPrintCacheFileLocationbtnYesVARIABLE_NAME_MISMATCH
    "SchemaPropertiesPanel.printCacheFileLocation""SessionStartupTimeHintDlg.yes"LITERAL_VALUE_MISMATCH
    5
    btnYes = new JButton(s_stringMgr.getString("SessionStartupTimeHintDlg.yes"));
    5
    gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0);
    5
    gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0);
    4
    gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
    Differences
    Expression1Expression2Difference
    WESTNORTHWESTVARIABLE_NAME_MISMATCH
    NONEBOTHVARIABLE_NAME_MISMATCH
    05LITERAL_VALUE_MISMATCH
    05LITERAL_VALUE_MISMATCH
    4
    gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
    6
    ret.add(btnPrintCacheFileLocation, gbc);
    6
    ret.add(btnPrintCacheFileLocation, gbc);
    6
    ret.add(btnYes, gbc);
    Differences
    Expression1Expression2Difference
    btnPrintCacheFileLocationbtnYesVARIABLE_NAME_MISMATCH
    6
    ret.add(btnYes, gbc);
    7
    btnDeleteCache = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.deleteCache"));
    7
    btnDeleteCache = new JButton(s_stringMgr.getString("SchemaPropertiesPanel.deleteCache"));
    8
    btnNo = new JButton(s_stringMgr.getString("SessionStartupTimeHintDlg.no"));
    Differences
    Expression1Expression2Difference
    btnDeleteCachebtnNoVARIABLE_NAME_MISMATCH
    "SchemaPropertiesPanel.deleteCache""SessionStartupTimeHintDlg.no"LITERAL_VALUE_MISMATCH
    8
    btnNo = new JButton(s_stringMgr.getString("SessionStartupTimeHintDlg.no"));
    8
    gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0);
    8
    gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0);
    7
    gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
    Differences
    Expression1Expression2Difference
    WESTNORTHWESTVARIABLE_NAME_MISMATCH
    NONEBOTHVARIABLE_NAME_MISMATCH
    05LITERAL_VALUE_MISMATCH
    7
    gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
    9
    ret.add(btnDeleteCache, gbc);
    9
    ret.add(btnDeleteCache, gbc);
    9
    ret.add(btnNo, gbc);
    Differences
    Expression1Expression2Difference
    btnDeleteCachebtnNoVARIABLE_NAME_MISMATCH
    9
    ret.add(btnNo, gbc);
    10
    return ret;
    10
    return ret;
    Precondition Violations (1)
    Row Violation
    1The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.gui.db.aliasproperties.SchemaPropertiesPanel and net.sourceforge.squirrel_sql.client.gui.desktopcontainer.TabbedStyleHintDlg do not have a common superclass