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.writeScript"); String toolTipText = s_stringMgr.getString("PreferencesPanel.writeScriptToolTip"); writeScriptCheckBox = new JCheckBox(cbLabelStr); writeScriptCheckBox.setToolTipText(toolTipText); panel.add(writeScriptCheckBox, 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.copyForeignKeys"); String toolTipText = s_stringMgr.getString("PreferencesPanel.copyForeignKeysToolTip"); copyForeignKeys = new JCheckBox(cbLabelStr); copyForeignKeys.setToolTipText(toolTipText); panel.add(copyForeignKeys, 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 addWriteScriptCheckBox(JPanel, int, int) Method name: void addCopyForeignKeysCheckBox(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.insets = new Insets(10,0,0,0);
5
        c.insets = new Insets(10,0,0,0);
6
        c.anchor = GridBagConstraints.WEST;
6
        c.anchor = GridBagConstraints.WEST;
7
        String cbLabelStr =         
7
        String cbLabelStr =         
8
            s_stringMgr.getString("PreferencesPanel.writeScript");
8
            s_stringMgr.getString("PreferencesPanel.copyForeignKeys");
9
        String toolTipText = 
9
        String toolTipText = 
10
            s_stringMgr.getString("PreferencesPanel.writeScriptToolTip");
10
            s_stringMgr.getString("PreferencesPanel.copyForeignKeysToolTip");
11
        writeScriptCheckBox = new JCheckBox(cbLabelStr);
11
        copyForeignKeys = new JCheckBox(cbLabelStr);
12
        writeScriptCheckBox.setToolTipText(toolTipText);
12
        copyForeignKeys.setToolTipText(toolTipText);
13
        panel.add(writeScriptCheckBox, c);
13
        panel.add(copyForeignKeys, 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, 0, 0, 0);
    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.writeScript");
    7
    String cbLabelStr = s_stringMgr.getString("PreferencesPanel.writeScript");
    7
    String cbLabelStr = s_stringMgr.getString("PreferencesPanel.copyForeignKeys");
    Differences
    Expression1Expression2Difference
    "PreferencesPanel.writeScript""PreferencesPanel.copyForeignKeys"LITERAL_VALUE_MISMATCH
    7
    String cbLabelStr = s_stringMgr.getString("PreferencesPanel.copyForeignKeys");
    8
    String toolTipText = s_stringMgr.getString("PreferencesPanel.writeScriptToolTip");
    8
    String toolTipText = s_stringMgr.getString("PreferencesPanel.writeScriptToolTip");
    8
    String toolTipText = s_stringMgr.getString("PreferencesPanel.copyForeignKeysToolTip");
    Differences
    Expression1Expression2Difference
    "PreferencesPanel.writeScriptToolTip""PreferencesPanel.copyForeignKeysToolTip"LITERAL_VALUE_MISMATCH
    8
    String toolTipText = s_stringMgr.getString("PreferencesPanel.copyForeignKeysToolTip");
    9
    writeScriptCheckBox = new JCheckBox(cbLabelStr);
    9
    writeScriptCheckBox = new JCheckBox(cbLabelStr);
    9
    copyForeignKeys = new JCheckBox(cbLabelStr);
    Differences
    Expression1Expression2Difference
    writeScriptCheckBoxcopyForeignKeysVARIABLE_NAME_MISMATCH
    9
    copyForeignKeys = new JCheckBox(cbLabelStr);
    10
    writeScriptCheckBox.setToolTipText(toolTipText);
    10
    writeScriptCheckBox.setToolTipText(toolTipText);
    10
    copyForeignKeys.setToolTipText(toolTipText);
    Differences
    Expression1Expression2Difference
    writeScriptCheckBoxcopyForeignKeysVARIABLE_NAME_MISMATCH
    10
    copyForeignKeys.setToolTipText(toolTipText);
    11
    panel.add(writeScriptCheckBox, c);
    11
    panel.add(writeScriptCheckBox, c);
    11
    panel.add(copyForeignKeys, c);
    Differences
    Expression1Expression2Difference
    writeScriptCheckBoxcopyForeignKeysVARIABLE_NAME_MISMATCH
    11
    panel.add(copyForeignKeys, c);
    Precondition Violations (0)
    Row Violation