private JPanel createButtonPanel() { JPanel ret = new JPanel(); GridBagConstraints gbc; // i18n[graphToClipboard.copyButton=Copy image from selected tab] btnSaveToFile = new JButton(s_stringMgr.getString("graphToFile.saveFilesTo")); gbc = new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.SOUTHEAST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0,0); ret.add(btnSaveToFile, gbc); gbc = new GridBagConstraints(1,0,1,1,1,0,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5,5,5,5), 0,0); ret.add(new JPanel(), gbc); // i18n[graphToClipboard.closeButton=Close] btnClose = new JButton(s_stringMgr.getString("graphToClipboard.closeButton")); gbc = new GridBagConstraints(2,0,1,1,0,0,GridBagConstraints.SOUTHWEST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0,0); ret.add(btnClose, gbc); return ret;
private JPanel createJPAPanel() { JPanel ret = new JPanel(new GridBagLayout()); GridBagConstraints gbc; gbc = new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5,0,5,5),0,0); // i18n[HibernateConfigPanel.toObtainSessionFactJPA=Call "javax.persistence.Persistence.createEntityManagerFactory("<persitence-unit name>");"] radJPA = new JRadioButton(s_stringMgr.getString("HibernatePanel.toObtainSessionFactJPA")); ret.add(radJPA, gbc); gbc = new GridBagConstraints(1,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5,5,5,5),0,0); // i18n[HibernateConfigPanel.toObtainSessionFactPersUnit=persitence-unit name:] ret.add(new JLabel(s_stringMgr.getString("HibernatePanel.toObtainSessionFactPersUnit")), gbc); gbc = new GridBagConstraints(2,0,1,1,1,0,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5,0,5,5),0,0); txtPersistenceUnitName = new JTextField(); ret.add(txtPersistenceUnitName, gbc); return ret;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/graph/src/net/sourceforge/squirrel_sql/plugins/graph/graphtofiles/GraphToFilesDlg.java File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/configuration/HibernateConfigPanel.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
private JPanel createButtonPanel()
1
private JPanel createJPAPanel()
2
   {
2
   {
3
      JPanel ret = new JPanel();
3
      JPanel ret = new JPanel(new GridBagLayout());
4
      GridBagConstraints gbc;
4
      GridBagConstraints gbc;
5
      // i18n[graphToClipboard.copyButton=Copy image from selected tab]
6
      btnSaveToFile = new JButton(s_stringMgr.getString("graphToFile.saveFilesTo"));
7
      gbc = new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.SOUTHEAST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0,0);
5
      gbc = new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5,0,5,5),0,0);
8
      ret.add(btnSaveToFile
6
      // i18n[HibernateConfigPanel.toObtainSessionFactJPA=Call "javax.persistence.Persistence.createEntityManagerFactory("<persitence-unit name>");"]
7
      radJPA = new JRadioButton(s_stringMgr.getString("HibernatePanel.toObtainSessionFactJPA"));
9
, gbc);
8
      ret.add(radJPA, gbc);
10
      gbc = new GridBagConstraints(1,0,1,1,1,0,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5,5,5,5), 0,0);
9
      gbc = new GridBagConstraints(1,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5,5,5,5),0,0);
11
      ret.add(new JPanel(), gbc);
10
      
12
      
13
      // i18n[graphToClipboard.closeButton=Close]
14
      btnClose = new JButton(s_stringMgr.getString("graphToClipboard.closeButton"));
11
// i18n[HibernateConfigPanel.toObtainSessionFactPersUnit=persitence-unit name:]
12
      ret.add(new JLabel(s_stringMgr.getString("HibernatePanel.toObtainSessionFactPersUnit")), gbc);
15
      gbc = new GridBagConstraints(2,0,1,1,0,0,GridBagConstraints.SOUTHWEST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0,0);
13
      gbc = new GridBagConstraints(2,0,1,1,1,0,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5,0,5,5),0,0);
16
      ret.add(btnClos
14
      txtPersistenceUnitName = new JTextField();
17
e, gbc);
15
      ret.add(txtPersistenceUnitName, gbc);
18
      return ret;
16
      return ret;
17
   
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0