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.ipadx = 40; c.insets = new Insets(10,25,0,0); c.anchor = GridBagConstraints.WEST; String cbLabelStr = s_stringMgr.getString("PreferencesPanel.commitAfterCreateTable"); String toolTipText = s_stringMgr.getString("PreferencesPanel.commitAfterCreateTableToolTip"); commitAfterCreateTableCheckBox = new JCheckBox(cbLabelStr); commitAfterCreateTableCheckBox.setToolTipText(toolTipText); panel.add(commitAfterCreateTableCheckBox, 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 addCommitAfterCreateTableCheckBox(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;
5
        c.insets = new Insets(10,0,0,0);
6
        c.insets = new Insets(10,25,0,0);
6
        c.anchor = GridBagConstraints.WEST;
7
        c.anchor = GridBagConstraints.WEST;
7
        String cbLabelStr =         
8
        String cbLabelStr =         
8
            s_stringMgr.getString("PreferencesPanel.writeScript");
9
            s_stringMgr.getString("PreferencesPanel.commitAfterCreateTable");
9
        String toolTipText = 
10
        String toolTipText = 
10
            s_stringMgr.getString("PreferencesPanel.writeScriptToolTip");
11
            s_stringMgr.getString("PreferencesPanel.
11
        writeScript
12
commitAfterCreateTableToolTip");
12
CheckBox = new JCheckBox(cbLabelStr);
13
        commitAfterCreateTableCheckBox = new JCheckBox(cbLabelStr);
13
        writeScriptCheckBox.setToolTipText(toolTipText);
14
        commitAfterCreateTableCheckBox.setToolTipText(toolTipText);
14
        panel.add(writeScriptCheckBox, c);
15
        panel.add(commitAfterCreateTableCheckBox, 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);
    5
    c.insets = new Insets(10, 25, 0, 0);
    Differences
    Expression1Expression2Difference
    025LITERAL_VALUE_MISMATCH
    5
    c.insets = new Insets(10, 25, 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.commitAfterCreateTable");
    Differences
    Expression1Expression2Difference
    "PreferencesPanel.writeScript""PreferencesPanel.commitAfterCreateTable"LITERAL_VALUE_MISMATCH
    7
    String cbLabelStr = s_stringMgr.getString("PreferencesPanel.commitAfterCreateTable");
    8
    String toolTipText = s_stringMgr.getString("PreferencesPanel.writeScriptToolTip");
    8
    String toolTipText = s_stringMgr.getString("PreferencesPanel.writeScriptToolTip");
    8
    String toolTipText = s_stringMgr.getString("PreferencesPanel.commitAfterCreateTableToolTip");
    Differences
    Expression1Expression2Difference
    "PreferencesPanel.writeScriptToolTip""PreferencesPanel.commitAfterCreateTableToolTip"LITERAL_VALUE_MISMATCH
    8
    String toolTipText = s_stringMgr.getString("PreferencesPanel.commitAfterCreateTableToolTip");
    9
    writeScriptCheckBox = new JCheckBox(cbLabelStr);
    9
    writeScriptCheckBox = new JCheckBox(cbLabelStr);
    9
    commitAfterCreateTableCheckBox = new JCheckBox(cbLabelStr);
    Differences
    Expression1Expression2Difference
    writeScriptCheckBoxcommitAfterCreateTableCheckBoxVARIABLE_NAME_MISMATCH
    9
    commitAfterCreateTableCheckBox = new JCheckBox(cbLabelStr);
    10
    writeScriptCheckBox.setToolTipText(toolTipText);
    10
    writeScriptCheckBox.setToolTipText(toolTipText);
    10
    commitAfterCreateTableCheckBox.setToolTipText(toolTipText);
    Differences
    Expression1Expression2Difference
    writeScriptCheckBoxcommitAfterCreateTableCheckBoxVARIABLE_NAME_MISMATCH
    10
    commitAfterCreateTableCheckBox.setToolTipText(toolTipText);
    11
    panel.add(writeScriptCheckBox, c);
    11
    panel.add(writeScriptCheckBox, c);
    11
    panel.add(commitAfterCreateTableCheckBox, c);
    Differences
    Expression1Expression2Difference
    writeScriptCheckBoxcommitAfterCreateTableCheckBoxVARIABLE_NAME_MISMATCH
    11
    panel.add(commitAfterCreateTableCheckBox, c);
    Precondition Violations (0)
    Row Violation