JPanel ret = new JPanel(new GridBagLayout()); GridBagConstraints gbc; txtCommand = new JTextField(); gbc = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 5), 0, 0); ret.add(txtCommand, gbc); LibraryResources rsrc = new LibraryResources(); btnCommandFile = new JButton(rsrc.getIcon(LibraryResources.IImageNames.OPEN)); gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0); ret.add(btnCommandFile, gbc); return ret;
JPanel ret = new JPanel(new GridBagLayout()); GridBagConstraints gbc; txtFile = new JTextField(); gbc = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 5), 0, 0); ret.add(txtFile, gbc); LibraryResources rsrc = new LibraryResources(); btnFile = new JButton(rsrc.getIcon(LibraryResources.IImageNames.OPEN)); gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0); ret.add(btnFile, gbc); return ret;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/action/TableExportCsvDlg.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/action/TableExportCsvDlg.java
Method name: Component getCommandPanel() Method name: Component getFilePanel()
Number of AST nodes: 10 Number of AST nodes: 10
1
JPanel ret = new JPanel(new GridBagLayout());
1
JPanel ret = new JPanel(new GridBagLayout());
2
      GridBagConstraints gbc;
2
      GridBagConstraints gbc;
3
      txtCommand = new JTextField();
3
      txtFile = new JTextField();
4
      gbc = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 5), 0, 0);
4
      gbc = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 5), 0, 0);
5
      ret.add(txtCommand, gbc);
5
      ret.add(txtFile, gbc);
6
      LibraryResources rsrc = new LibraryResources();
6
      LibraryResources rsrc = new LibraryResources();
7
      btnCommandFile = new JButton(rsrc.getIcon(LibraryResources.IImageNames.OPEN));
7
      btnFile = new JButton(rsrc.getIcon(LibraryResources.IImageNames.OPEN));
8
      gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
8
      gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
9
      ret.add(btnCommandFile, gbc);
9
      ret.add(btnFile, gbc);
10
      return ret;
10
      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 declared in the same class
Number of node comparisons39
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements10
    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
    txtCommand = new JTextField();
    3
    txtCommand = new JTextField();
    3
    txtFile = new JTextField();
    Differences
    Expression1Expression2Difference
    txtCommandtxtFileVARIABLE_NAME_MISMATCH
    3
    txtFile = new JTextField();
    4
    gbc = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 5), 0, 0);
    4
    gbc = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 5), 0, 0);
    5
    ret.add(txtCommand, gbc);
    5
    ret.add(txtCommand, gbc);
    5
    ret.add(txtFile, gbc);
    Differences
    Expression1Expression2Difference
    txtCommandtxtFileVARIABLE_NAME_MISMATCH
    5
    ret.add(txtFile, gbc);
    6
    LibraryResources rsrc = new LibraryResources();
    6
    LibraryResources rsrc = new LibraryResources();
    7
    btnCommandFile = new JButton(rsrc.getIcon(LibraryResources.IImageNames.OPEN));
    7
    btnCommandFile = new JButton(rsrc.getIcon(LibraryResources.IImageNames.OPEN));
    7
    btnFile = new JButton(rsrc.getIcon(LibraryResources.IImageNames.OPEN));
    Differences
    Expression1Expression2Difference
    btnCommandFilebtnFileVARIABLE_NAME_MISMATCH
    7
    btnFile = new JButton(rsrc.getIcon(LibraryResources.IImageNames.OPEN));
    8
    gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
    8
    gbc = new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
    9
    ret.add(btnCommandFile, gbc);
    9
    ret.add(btnCommandFile, gbc);
    9
    ret.add(btnFile, gbc);
    Differences
    Expression1Expression2Difference
    btnCommandFilebtnFileVARIABLE_NAME_MISMATCH
    9
    ret.add(btnFile, gbc);
    10
    return ret;
    10
    return ret;
    Precondition Violations (0)
    Row Violation