_prefs = new TonicPreferences(); try { cache.add(_prefs); } catch (DuplicateObjectException ex) { s_log.error("TonicPreferences object already in XMLObjectCache", ex); }
_prefs = new OyoahaPreferences(); try { cache.add(_prefs); } catch (DuplicateObjectException ex) { s_log.error("OyoahaPreferences 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/OyoahaLookAndFeelController.java
Method name: void TonicLookAndFeelController(LAFPlugin) Method name: void OyoahaLookAndFeelController(LAFPlugin)
Number of AST nodes: 3 Number of AST nodes: 3
1
_prefs = new TonicPreferences();
1
_prefs = new OyoahaPreferences();
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("OyoahaPreferences object already in XMLObjectCache", ex);
9
			}
9
			}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are in different classes having the same super class
Number of node comparisons6
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    _prefs = new TonicPreferences();
    6
    _prefs = new TonicPreferences();
    6
    _prefs = new OyoahaPreferences();
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.laf.TonicLookAndFeelController.TonicPreferencesnet.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelController.OyoahaPreferencesSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.laf.TonicLookAndFeelController.TonicPreferencesnet.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelController.OyoahaPreferencesSUBCLASS_TYPE_MISMATCH
    6
    _prefs = new OyoahaPreferences();
    7
    try
    7
    try
    7
    try
    Differences
    Expression1Expression2Difference
    "TonicPreferences object already in XMLObjectCache""OyoahaPreferences object already in XMLObjectCache"LITERAL_VALUE_MISMATCH
    7
    try
    8
    cache.add(_prefs);
    8
    cache.add(_prefs);
    8
    cache.add(_prefs);
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.laf.TonicLookAndFeelController.TonicPreferencesnet.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelController.OyoahaPreferencesSUBCLASS_TYPE_MISMATCH
    8
    cache.add(_prefs);
    Precondition Violations (0)
    Row Violation