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;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 39 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 10 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 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 | 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; |
Precondition Violations (0)
Row |
Violation |