FormLayout layout = new FormLayout("pref, 6dlu, pref", // columns
"pref, 3dlu, pref"); // rows
CellConstraints cc = new CellConstraints();
JPanel panelMain = new JPanel(layout);
panelMain.setBorder(BorderFactory.createEmptyBorder(12,12,12,12));
panelMain.add(createInputPanel(),cc.xy(1,1));
panelMain.add(createButtonPanel(),cc.xywh(3,1,1,3));
panelMain.add(createOptionPanel(),cc.xy(1,3));
getContentPane().add(panelMain,BorderLayout.SOUTH);
getContentPane().add(
new DialogHeaderPanel(GlobalResourceLoader.getString(RESOURCE_PATH,
"find", "header_title"), GlobalResourceLoader
.getString(RESOURCE_PATH, "find", "header_description"),
ImageLoader.getIcon(IconKeys.SEARCH)),
BorderLayout.NORTH);
FormLayout layout = new FormLayout("pref, 6dlu, pref", // columns
"pref, 3dlu, pref"); // rows
CellConstraints cc = new CellConstraints();
createComponents();
JPanel panelMain = new JPanel(layout);
panelMain.setBorder(BorderFactory.createEmptyBorder(12,12,12,12));
panelMain.add(createInputPanel(), cc.xy(1,1));
panelMain.add(createButtonPanel(),cc.xywh(3,1,1,3));
panelMain.add(createOptionPanel(),cc.xy(1,3));
getContentPane().add(panelMain,BorderLayout.SOUTH);
getContentPane().add(
new DialogHeaderPanel(GlobalResourceLoader.getString(RESOURCE_PATH,
"findreplace", "header_title"), GlobalResourceLoader
.getString(RESOURCE_PATH, "findreplace", "header_description"),
ImageLoader.getIcon(IconKeys.SEARCH)),
BorderLayout.NORTH);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/util/FindDialog.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/util/FindReplaceDialog.java
|
Method name: void initComponents()
|
|
Method name: void initComponents()
|
Number of AST nodes: 9
|
|
Number of AST nodes: 10
|
|
1 | FormLayout layout = new FormLayout("pref, 6dlu, pref", // columns ↵ | | 1 | FormLayout layout = new FormLayout("pref, 6dlu, pref", // columns ↵
|
2 | "pref, 3dlu, pref"); // rows↵ | | 2 | "pref, 3dlu, pref"); // rows↵
|
3 | ↵ | | 3 | ↵
|
4 | CellConstraints cc = new CellConstraints();↵ | | 4 | CellConstraints cc = new CellConstraints();↵
|
5 | ↵ | | 5 | ↵
|
6 | ↵ | | 6 | createComponents();↵
|
| | | 7 | ↵
|
7 | JPanel panelMain = new JPanel(layout);↵ | | 8 | JPanel panelMain = new JPanel(layout);↵
|
8 | panelMain.setBorder(BorderFactory.createEmptyBorder(12,12,12,12));↵ | | 9 | panelMain.setBorder(BorderFactory.createEmptyBorder(12,12,12,12));↵
|
9 | ↵ | | 10 | ↵
|
|
10 | panelMain.add(createInputPanel(),cc.xy(1,1));↵ | | 11 | panelMain.add(createInputPanel(), cc.xy(1,1));↵
|
11 | panelMain.add(createButtonPanel(),cc.xywh(3,1,1,3));↵ | | 12 | panelMain.add(createButtonPanel(),cc.xywh(3,1,1,3));↵
|
12 | panelMain.add(createOptionPanel(),cc.xy(1,3));↵ | | 13 | panelMain.add(createOptionPanel(),cc.xy(1,3));↵
|
13 | ↵ | | 14 | ↵
|
14 | getContentPane().add(panelMain,BorderLayout.SOUTH);↵ | | 15 | getContentPane().add(panelMain,BorderLayout.SOUTH);↵
|
15 | getContentPane().add(↵ | | 16 | getContentPane().add(↵
|
16 | new DialogHeaderPanel(GlobalResourceLoader.getString(RESOURCE_PATH,↵ | | 17 | new DialogHeaderPanel(GlobalResourceLoader.getString(RESOURCE_PATH,↵
|
17 | "find", "header_title"), GlobalResourceLoader↵ | | 18 | "findreplace", "header_title"), GlobalResourceLoader↵
|
18 | .getString(RESOURCE_PATH, "find", "header_description"),↵ | | 19 | .getString(RESOURCE_PATH, "findreplace", "header_description"),↵
|
19 | ImageLoader.getIcon(IconKeys.SEARCH)),↵ | | 20 | ImageLoader.getIcon(IconKeys.SEARCH)),↵
|
20 | BorderLayout.NORTH); | | 21 | BorderLayout.NORTH);
|
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 in different classes having the same super class |
Number of node comparisons | 44 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | FormLayout layout = new FormLayout("pref, 6dlu, pref", "pref, 3dlu, pref"); | | 1 | FormLayout layout = new FormLayout("pref, 6dlu, pref", "pref, 3dlu, pref"); |
2 | CellConstraints cc = new CellConstraints(); | | 2 | CellConstraints cc = new CellConstraints(); |
| | | 3 | createComponents(); |
3 | JPanel panelMain = new JPanel(layout); | | 4 | JPanel panelMain = new JPanel(layout); |
4 | panelMain.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); | | 5 | panelMain.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); |
5 | panelMain.add(createInputPanel(), cc.xy(1, 1)); | | 6 | panelMain.add(createInputPanel(), cc.xy(1, 1)); |
6 | panelMain.add(createButtonPanel(), cc.xywh(3, 1, 1, 3)); | | 7 | panelMain.add(createButtonPanel(), cc.xywh(3, 1, 1, 3)); |
7 | panelMain.add(createOptionPanel(), cc.xy(1, 3)); | | 8 | panelMain.add(createOptionPanel(), cc.xy(1, 3)); |
8 | getContentPane().add(panelMain, BorderLayout.SOUTH); | | 9 | getContentPane().add(panelMain, BorderLayout.SOUTH); |
9 | getContentPane().add(new DialogHeaderPanel(GlobalResourceLoader.getString(RESOURCE_PATH, "find", "header_title"), GlobalResourceLoader.getString(RESOURCE_PATH, "find", "header_description"), ImageLoader.getIcon(IconKeys.SEARCH)), BorderLayout.NORTH); | | 10 | getContentPane().add(new DialogHeaderPanel(GlobalResourceLoader.getString(RESOURCE_PATH, "findreplace", "header_title"), GlobalResourceLoader.getString(RESOURCE_PATH, "findreplace", "header_description"), ImageLoader.getIcon(IconKeys.SEARCH)), BorderLayout.NORTH); |
Precondition Violations (0)
Row |
Violation |