FormLayout layout = new FormLayout("3dlu, left:pref, 30dlu, right:pref, 3dlu", // columns
"pref, 3dlu, pref"); // rows
CellConstraints cc = new CellConstraints();
JPanel optionPanel = new JPanel(layout);
optionPanel.setBorder(BorderFactory.createTitledBorder(GlobalResourceLoader.getString(RESOURCE_PATH,"findreplace","options")));
optionPanel.add(caseSensCheckBox,cc.xy(2,1));
optionPanel.add(wholeWordCheckBox,cc.xywh(2,3,3,1));
optionPanel.add(findBackCheckBox,cc.xy(4,1));
return optionPanel;
FormLayout layout = new FormLayout("3dlu, left:pref, 30dlu, right:pref, 3dlu", // columns
"pref, 3dlu, pref"); // rows
CellConstraints cc = new CellConstraints();
JPanel optionPanel = new JPanel(layout);
optionPanel.setBorder(BorderFactory.createTitledBorder(GlobalResourceLoader.getString(RESOURCE_PATH,"findreplace","options")));
optionPanel.add(caseSensCheckBox,cc.xy(2,1));
optionPanel.add(wholeWordCheckBox,cc.xywh(2,3,3,1));
optionPanel.add(findBackCheckBox,cc.xy(4,1));
return optionPanel;
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: JPanel createOptionPanel()
|
|
Method name: JPanel createOptionPanel()
|
Number of AST nodes: 8
|
|
Number of AST nodes: 8
|
|
1 | FormLayout layout = new FormLayout("3dlu, left:pref, 30dlu, right:pref, 3dlu", // columns ↵ | | 1 | FormLayout layout = new FormLayout("3dlu, left:pref, 30dlu, right:pref, 3dlu", // 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 | JPanel optionPanel = new JPanel(layout);↵ | | 6 | JPanel optionPanel = new JPanel(layout);↵
|
7 | optionPanel.setBorder(BorderFactory.createTitledBorder(GlobalResourceLoader.getString(RESOURCE_PATH,"findreplace","options")));↵ | | 7 | optionPanel.setBorder(BorderFactory.createTitledBorder(GlobalResourceLoader.getString(RESOURCE_PATH,"findreplace","options")));↵
|
8 | ↵ | | 8 | ↵
|
9 | optionPanel.add(caseSensCheckBox,cc.xy(2,1));↵ | | 9 | optionPanel.add(caseSensCheckBox,cc.xy(2,1));↵
|
10 | optionPanel.add(wholeWordCheckBox,cc.xywh(2,3,3,1));↵ | | 10 | optionPanel.add(wholeWordCheckBox,cc.xywh(2,3,3,1));↵
|
11 | optionPanel.add(findBackCheckBox,cc.xy(4,1));↵ | | 11 | optionPanel.add(findBackCheckBox,cc.xy(4,1));↵
|
12 | ↵ | | 12 | ↵
|
13 | return optionPanel; | | 13 | return optionPanel;
|
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 | 39 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 8 |
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 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | FormLayout layout = new FormLayout("3dlu, left:pref, 30dlu, right:pref, 3dlu", "pref, 3dlu, pref"); | | 1 | FormLayout layout = new FormLayout("3dlu, left:pref, 30dlu, right:pref, 3dlu", "pref, 3dlu, pref"); |
2 | CellConstraints cc = new CellConstraints(); | | 2 | CellConstraints cc = new CellConstraints(); |
3 | JPanel optionPanel = new JPanel(layout); | | 3 | JPanel optionPanel = new JPanel(layout); |
4 | optionPanel.setBorder(BorderFactory.createTitledBorder(GlobalResourceLoader.getString(RESOURCE_PATH, "findreplace", "options"))); | | 4 | optionPanel.setBorder(BorderFactory.createTitledBorder(GlobalResourceLoader.getString(RESOURCE_PATH, "findreplace", "options"))); |
5 | optionPanel.add(caseSensCheckBox, cc.xy(2, 1)); | | 5 | optionPanel.add(caseSensCheckBox, cc.xy(2, 1)); |
6 | optionPanel.add(wholeWordCheckBox, cc.xywh(2, 3, 3, 1)); | | 6 | optionPanel.add(wholeWordCheckBox, cc.xywh(2, 3, 3, 1)); |
7 | optionPanel.add(findBackCheckBox, cc.xy(4, 1)); | | 7 | optionPanel.add(findBackCheckBox, cc.xy(4, 1)); |
8 | return optionPanel; | | 8 | return optionPanel; |
Precondition Violations (0)
Row |
Violation |