GridBagConstraints c = new GridBagConstraints(); c.gridx = col; c.gridy = row; c.gridwidth = 2; // Span across two columns //c.ipadx = 40; c.insets = new Insets(10,25,0,0); c.anchor = GridBagConstraints.WEST; String cbLabelStr = s_stringMgr.getString("PreferencesPanel.pruneDuplicateIndexDefs"); String toolTipText = s_stringMgr.getString("PreferencesPanel.pruneDuplicateIndexDefsToolTip"); pruneDuplicateIndexDefs = new JCheckBox(cbLabelStr); pruneDuplicateIndexDefs.setToolTipText(toolTipText); panel.add(pruneDuplicateIndexDefs, c);
GridBagConstraints c = new GridBagConstraints(); c.gridx = col; c.gridy = row; c.gridwidth = 2; // Span across two columns c.insets = new Insets(10,0,0,0); c.anchor = GridBagConstraints.WEST; String cbLabelStr = s_stringMgr.getString("PreferencesPanel.copyPrimaryKeys"); String toolTipText = s_stringMgr.getString("PreferencesPanel.copyPrimaryKeysToolTip"); copyPrimaryKeys = new JCheckBox(cbLabelStr); copyPrimaryKeys.setToolTipText(toolTipText); panel.add(copyPrimaryKeys, c);
Clone fragments detected by clone detection tool
File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/gui/PreferencesPanel.java File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/gui/PreferencesPanel.java
Method name: void addPruneDuplicateIndexDefsCheckBox(JPanel, int, int) Method name: void addCopyPrimaryKeysCheckBox(JPanel, int, int)
Number of AST nodes: 11 Number of AST nodes: 11
1
GridBagConstraints c = new GridBagConstraints();
1
GridBagConstraints c = new GridBagConstraints();
2
        c.gridx = col;
2
        c.gridx = col;
3
        c.gridy = row;
3
        c.gridy = row;
4
        c.gridwidth = 2;  // Span across two columns
4
        c.gridwidth = 2;  // Span across two columns
5
        //c.ipadx = 40;
6
        c.insets = new Insets(10,25,0,0);
5
        c.insets = new Insets(10,0,0,0);
7
        c.anchor = GridBagConstraints.WEST;
6
        c.anchor = GridBagConstraints.WEST;
8
        String cbLabelStr =         
7
        String cbLabelStr =         
9
            s_stringMgr.getString("PreferencesPanel.pruneDuplicateIndexDefs");
8
            s_stringMgr.getString("PreferencesPanel.copyPrimaryKeys");
10
        String toolTipText = 
9
        String toolTipText = 
11
            s_stringMgr.getString("PreferencesPanel.pruneDuplicateIndexDefsToolTip");
10
            s_stringMgr.getString("PreferencesPanel.
12
        pruneDuplicateIndexDef
11
copyPrimaryKeysToolTip");
13
s = new JCheckBox(cbLabelStr);
12
        copyPrimaryKeys = new JCheckBox(cbLabelStr);
14
        pruneDuplicateIndexDefs.setToolTipText(toolTipText);
13
        copyPrimaryKeys.setToolTipText(toolTipText);
15
        panel.add(pruneDuplicateIndexDefs, c);
14
        panel.add(copyPrimaryKeys, c);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons59
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements11
    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
    GridBagConstraints c = new GridBagConstraints();
    1
    GridBagConstraints c = new GridBagConstraints();
    2
    c.gridx = col;
    2
    c.gridx = col;
    3
    c.gridy = row;
    3
    c.gridy = row;
    4
    c.gridwidth = 2;
    4
    c.gridwidth = 2;
    5
    c.insets = new Insets(10, 25, 0, 0);
    5
    c.insets = new Insets(10, 25, 0, 0);
    5
    c.insets = new Insets(10, 0, 0, 0);
    Differences
    Expression1Expression2Difference
    250LITERAL_VALUE_MISMATCH
    5
    c.insets = new Insets(10, 0, 0, 0);
    6
    c.anchor = GridBagConstraints.WEST;
    6
    c.anchor = GridBagConstraints.WEST;
    7
    String cbLabelStr = s_stringMgr.getString("PreferencesPanel.pruneDuplicateIndexDefs");
    7
    String cbLabelStr = s_stringMgr.getString("PreferencesPanel.pruneDuplicateIndexDefs");
    7
    String cbLabelStr = s_stringMgr.getString("PreferencesPanel.copyPrimaryKeys");
    Differences
    Expression1Expression2Difference
    "PreferencesPanel.pruneDuplicateIndexDefs""PreferencesPanel.copyPrimaryKeys"LITERAL_VALUE_MISMATCH
    7
    String cbLabelStr = s_stringMgr.getString("PreferencesPanel.copyPrimaryKeys");
    8
    String toolTipText = s_stringMgr.getString("PreferencesPanel.pruneDuplicateIndexDefsToolTip");
    8
    String toolTipText = s_stringMgr.getString("PreferencesPanel.pruneDuplicateIndexDefsToolTip");
    8
    String toolTipText = s_stringMgr.getString("PreferencesPanel.copyPrimaryKeysToolTip");
    Differences
    Expression1Expression2Difference
    "PreferencesPanel.pruneDuplicateIndexDefsToolTip""PreferencesPanel.copyPrimaryKeysToolTip"LITERAL_VALUE_MISMATCH
    8
    String toolTipText = s_stringMgr.getString("PreferencesPanel.copyPrimaryKeysToolTip");
    9
    pruneDuplicateIndexDefs = new JCheckBox(cbLabelStr);
    9
    pruneDuplicateIndexDefs = new JCheckBox(cbLabelStr);
    9
    copyPrimaryKeys = new JCheckBox(cbLabelStr);
    Differences
    Expression1Expression2Difference
    pruneDuplicateIndexDefscopyPrimaryKeysVARIABLE_NAME_MISMATCH
    9
    copyPrimaryKeys = new JCheckBox(cbLabelStr);
    10
    pruneDuplicateIndexDefs.setToolTipText(toolTipText);
    10
    pruneDuplicateIndexDefs.setToolTipText(toolTipText);
    10
    copyPrimaryKeys.setToolTipText(toolTipText);
    Differences
    Expression1Expression2Difference
    pruneDuplicateIndexDefscopyPrimaryKeysVARIABLE_NAME_MISMATCH
    10
    copyPrimaryKeys.setToolTipText(toolTipText);
    11
    panel.add(pruneDuplicateIndexDefs, c);
    11
    panel.add(pruneDuplicateIndexDefs, c);
    11
    panel.add(copyPrimaryKeys, c);
    Differences
    Expression1Expression2Difference
    pruneDuplicateIndexDefscopyPrimaryKeysVARIABLE_NAME_MISMATCH
    11
    panel.add(copyPrimaryKeys, c);
    Precondition Violations (0)
    Row Violation