JPanel ret = new JPanel(new GridBagLayout()); GridBagConstraints gbc; gbc = new GridBagConstraints(0,0,1,1,0,0, GridBagConstraints.WEST,GridBagConstraints.NONE, new Insets(5,5,5,5),0,0); // i18n[HibernateConfigPanel.configName=Configuration name] ret.add(new JLabel(s_stringMgr.getString("HibernatePanel.configName")), gbc); gbc = new GridBagConstraints(1,0,1,1,1,0, GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL, new Insets(5,5,5,5),0,0); txtConfigName = new JTextField(); ret.add(txtConfigName, gbc); return ret;
JPanel ret = new JPanel(new GridBagLayout()); GridBagConstraints gbc; gbc = new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0,0); // i18n[MappedObjectPanel.QualifiedNames=Show qualified names] chkShowQualified = new JCheckBox(s_stringMgr.getString("MappedObjectPanel.QualifiedNames")); ret.add(chkShowQualified, gbc); // dist gbc = new GridBagConstraints(1,0,1,1,1,1,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5,5,5,5), 0,0); ret.add(new JPanel(), gbc); return ret;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/configuration/HibernateConfigPanel.java File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/mapping/MappedObjectPanel.java
Method name: JPanel createConfigNamePanel() Method name: JPanel createTopPanel()
Number of AST nodes: 8 Number of AST nodes: 8
1
JPanel ret = new JPanel(new GridBagLayout());
1
JPanel ret = new JPanel(new GridBagLayout());
2
      GridBagConstraints gbc;
2
      GridBagConstraints gbc;
3
      gbc = new GridBagConstraints(0,0,1,1,0,0, GridBagConstraints.WEST,GridBagConstraints.NONE, new Insets(5,5,5,5),0,0);
3
      gbc = new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0,0);
4
      // i18n[HibernateConfigPanel.configName=Configuration name]
4
      // i18n[MappedObjectPanel.QualifiedNames=Show qualified names]
5
      ret.add(new JLabel(s_stringMgr.getString("HibernatePanel.configName"))
5
      chkShowQualified = new JCheckBox(s_stringMgr.getString("MappedObjectPanel.QualifiedNames"));
6
, gbc);
6
      ret.add(chkShowQualified, gbc);
7
      // dist
7
      gbc = new GridBagConstraints(1,0,1,1,1,0, GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL, new Insets(5,5,5,5),0,0);
8
      gbc = new GridBagConstraints(1,0,1,1,1,1,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5,5,5,5), 0,0);
8
      txtConfigName = new JTextField();
9
      ret.add(new JPanel()
9
      ret.add(txtConfigName, gbc);
10
, gbc);
10
      return ret;
11
      return ret;
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 in different classes having the same super class
Number of node comparisons27
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements8
    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(new GridBagLayout());
    1
    JPanel ret = new JPanel(new GridBagLayout());
    2
    GridBagConstraints gbc;
    2
    GridBagConstraints gbc;
    3
    gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0);
    3
    gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0);
    4
    ret.add(new JLabel(s_stringMgr.getString("HibernatePanel.configName")), gbc);
    4
    ret.add(new JLabel(s_stringMgr.getString("HibernatePanel.configName")), gbc);
    7
    ret.add(new JPanel(), gbc);
    Differences
    Expression1Expression2Difference
    javax.swing.JLabeljavax.swing.JPanelSUBCLASS_TYPE_MISMATCH
    new JLabel(s_stringMgr.getString("HibernatePanel.configName"))new JPanel()ARGUMENT_NUMBER_MISMATCH
    7
    ret.add(new JPanel(), gbc);
    5
    gbc = new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0);
    5
    gbc = new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0);
    6
    gbc = new GridBagConstraints(1, 0, 1, 1, 1, 1, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0);
    Differences
    Expression1Expression2Difference
    01LITERAL_VALUE_MISMATCH
    6
    gbc = new GridBagConstraints(1, 0, 1, 1, 1, 1, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0);
    6
    txtConfigName = new JTextField();
    6
    txtConfigName = new JTextField();
    4
    chkShowQualified = new JCheckBox(s_stringMgr.getString("MappedObjectPanel.QualifiedNames"));
    Differences
    Expression1Expression2Difference
    txtConfigNamechkShowQualifiedVARIABLE_NAME_MISMATCH
    javax.swing.JTextFieldjavax.swing.JCheckBoxSUBCLASS_TYPE_MISMATCH
    javax.swing.JTextFieldjavax.swing.JCheckBoxSUBCLASS_TYPE_MISMATCH
    new JTextField()new JCheckBox(s_stringMgr.getString("MappedObjectPanel.QualifiedNames"))ARGUMENT_NUMBER_MISMATCH
    4
    chkShowQualified = new JCheckBox(s_stringMgr.getString("MappedObjectPanel.QualifiedNames"));
    7
    ret.add(txtConfigName, gbc);
    7
    ret.add(txtConfigName, gbc);
    5
    ret.add(chkShowQualified, gbc);
    Differences
    Expression1Expression2Difference
    txtConfigNamechkShowQualifiedVARIABLE_NAME_MISMATCH
    javax.swing.JTextFieldjavax.swing.JCheckBoxSUBCLASS_TYPE_MISMATCH
    5
    ret.add(chkShowQualified, gbc);
    8
    return ret;
    8
    return ret;
    Precondition Violations (0)
    Row Violation