_prefs = new TonicPreferences();
try
{
cache.add(_prefs);
}
catch (DuplicateObjectException ex)
{
s_log.error("TonicPreferences object already in XMLObjectCache", ex);
}
_prefs = new SkinPreferences();
try
{
cache.add(_prefs);
}
catch (DuplicateObjectException ex)
{
s_log.error("SkinPreferences object already in XMLObjectCache", ex);
}
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: void TonicLookAndFeelController(LAFPlugin)
|
|
Method name: void SkinLookAndFeelController(LAFPlugin)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | _prefs = new TonicPreferences();↵ | | 1 | _prefs = new SkinPreferences();↵
|
2 | try↵ | | 2 | try↵
|
3 | {↵ | | 3 | {↵
|
4 | cache.add(_prefs);↵ | | 4 | cache.add(_prefs);↵
|
5 | }↵ | | 5 | }↵
|
6 | catch (DuplicateObjectException ex)↵ | | 6 | catch (DuplicateObjectException ex)↵
|
7 | {↵ | | 7 | {↵
|
8 | s_log.error("TonicPreferences object already in XMLObjectCache", ex);↵ | | 8 | s_log.error("SkinPreferences object already in XMLObjectCache", ex);↵
|
9 | } | | 9 | }
|
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 6 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 1.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
6 | _prefs = new TonicPreferences(); | | 6 | _prefs = new SkinPreferences(); |
7 | try | | 7 | try |
8 | | | 8 | |
Precondition Violations (0)
Row |
Violation |