super.applyChanges();
_ctrl._prefs.setUseTabbedPaneThickBorders(_useThickBordersChk.isSelected());
// Force the LAF to be set even if Tonic is the current one. This
// allows changes to take affect.
return true;
super.applyChanges();
_ctrl._prefs.setThemePackName((String)_themePackCmb.getSelectedItem());
// Force the LAF to be set even if Skin is the current one. This
// allows a change in theme to take affect.
return true;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/laf/src/net/sourceforge/squirrel_sql/plugins/laf/TonicLookAndFeelController.java
|
|
File path: /sql12/plugins/laf/src/net/sourceforge/squirrel_sql/plugins/laf/SkinLookAndFeelController.java
|
Method name: boolean applyChanges()
|
|
Method name: boolean applyChanges()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | super.applyChanges();↵ | | 1 | super.applyChanges();↵
|
2 | _ctrl._prefs.setUseTabbedPaneThickBorders(_useThickBordersChk.isSelected());↵ | | 2 | _ctrl._prefs.setThemePackName((String)_themePackCmb.getSelectedItem());↵
|
3 | ↵ | | 3 | ↵
|
4 | // Force the LAF to be set even if Tonic is the current one. This↵ | | 4 | // Force the LAF to be set even if Skin is the current one. This↵
|
5 | // allows changes to take affect.↵ | | 5 | // allows a change in theme to take affect.↵
|
6 | return true; | | 6 | return true;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
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 | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | super.applyChanges(); | | 1 | super.applyChanges(); |
| | | 2 | _ctrl._prefs.setThemePackName((String)_themePackCmb.getSelectedItem()); |
2 | _ctrl._prefs.setUseTabbedPaneThickBorders(_useThickBordersChk.isSelected()); | | | |
3 | return true; | | 3 | return true; |
Precondition Violations (4)
Row |
Violation |
1 | Super method call super.applyChanges(); cannot be extracted from method |
2 | Super method call super.applyChanges(); cannot be extracted from method |
3 | Unmatched statement _ctrl._prefs.setThemePackName((String)_themePackCmb.getSelectedItem()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement _ctrl._prefs.setUseTabbedPaneThickBorders(_useThickBordersChk.isSelected()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |