try { PropertyDescriptor[] s_dscrs = new PropertyDescriptor[3]; s_dscrs[0] = new PropertyDescriptor(WindowState.IPropertyNames.BOUNDS, WindowState.class, "getBounds", "setBounds"); s_dscrs[1] = new PropertyDescriptor(WindowState.IPropertyNames.VISIBLE, WindowState.class, "isVisible", "setVisible"); s_dscrs[2] = new PropertyDescriptor(WindowState.IPropertyNames.FRAME_EXTENDED_STATE, WindowState.class, "getFrameExtendedState", "setFrameExtendedState"); return s_dscrs; } catch (IntrospectionException e) { throw new Error(e); }
try { PropertyDescriptor[] s_descriptors = new PropertyDescriptor[3]; s_descriptors[0] = new PropertyDescriptor(Folder.IPropertyNames.ID, Folder.class, "getIdentifier", "setIdentifier"); s_descriptors[1] = new PropertyDescriptor(Folder.IPropertyNames.NAME, Folder.class, "getName", "setName"); s_descriptors[2] = new IndexedPropertyDescriptor(Folder.IPropertyNames.SUB_FOLDERS, Folder.class, "getSubFolders", "setSubFolders", "getSubFolder", "setSubFolder"); return s_descriptors; } catch (IntrospectionException e) { throw new Error(e); }
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/WindowStateBeanInfo.java File path: /sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs/FolderBeanInfo.java
Method name: PropertyDescriptor[] getPropertyDescriptors() Method name: PropertyDescriptor[] getPropertyDescriptors()
Number of AST nodes: 6 Number of AST nodes: 6
1
try
1
try
2
		{
2
		{
3
			PropertyDescriptor[] s_dscrs = new PropertyDescriptor[3];
3
			PropertyDescriptor[] s_descriptors = new PropertyDescriptor[3];
4
			s_dscrs[0] = new PropertyDescriptor(WindowState.IPropertyNames.BOUNDS,
4
			s_descriptors[0] = new PropertyDescriptor(Folder.IPropertyNames.
5
												WindowState.class,
6
												"getBounds", "setBounds");
5
ID, Folder.class, "getIdentifier", "setIdentifier");
7
			s_dscrs[1] = new PropertyDescriptor(WindowState.IPropertyNames.VISIBLE,
6
			s_descriptors[1] = new PropertyDescriptor(Folder.IPropertyNames.
8
												WindowState.class,
9
												"isVisible", "setVisible");
7
NAME, Folder.class, "getName", "setName");
10
			s_dscrs[2] = new PropertyDescriptor(WindowState.IPropertyNames.FRAME_EXTENDED_STATE,
8
			s_descriptors[2] = new IndexedPropertyDescriptor(Folder.IPropertyNames.
11
					WindowState.class,
9
SUB_FOLDERS, Folder.class,
12
					"getFrameExtendedState", "setFrameExtendedState");
10
 "getSubFolders", "setSubFolders", "getSubFolder", "setSubFolder");
13
			
14
			return s_dscrs;
11
			return s_descriptors;
15
		}
12
		}
16
		catch (IntrospectionException e)
13
		catch (IntrospectionException e)
17
		{
14
		{
18
			throw new Error(e);
15
			throw new Error(e);
19
		}
16
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes having the same super class
Number of node comparisons36
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)6.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    2
    PropertyDescriptor[] s_dscrs = new PropertyDescriptor[3];
    2
    PropertyDescriptor[] s_dscrs = new PropertyDescriptor[3];
    2
    PropertyDescriptor[] s_descriptors = new PropertyDescriptor[3];
    Differences
    Expression1Expression2Difference
    s_dscrss_descriptorsVARIABLE_NAME_MISMATCH
    2
    PropertyDescriptor[] s_descriptors = new PropertyDescriptor[3];
    3
    s_dscrs[0] = new PropertyDescriptor(WindowState.IPropertyNames.BOUNDS, WindowState.class, "getBounds", "setBounds");
    3
    s_dscrs[0] = new PropertyDescriptor(WindowState.IPropertyNames.BOUNDS, WindowState.class, "getBounds", "setBounds");
    3
    s_descriptors[0] = new PropertyDescriptor(Folder.IPropertyNames.ID, Folder.class, "getIdentifier", "setIdentifier");
    Differences
    Expression1Expression2Difference
    s_dscrss_descriptorsVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.gui.WindowStatenet.sourceforge.squirrel_sql.plugins.favs.FolderVARIABLE_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.fw.gui.WindowState.IPropertyNamesnet.sourceforge.squirrel_sql.plugins.favs.Folder.IPropertyNamesVARIABLE_TYPE_MISMATCH
    BOUNDSIDVARIABLE_NAME_MISMATCH
    WindowState.classFolder.classLITERAL_VALUE_MISMATCH
    "getBounds""getIdentifier"LITERAL_VALUE_MISMATCH
    "setBounds""setIdentifier"LITERAL_VALUE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.fw.gui.WindowState does not match with type net.sourceforge.squirrel_sql.plugins.favs.Folder
    • Make classes net.sourceforge.squirrel_sql.fw.gui.WindowState and net.sourceforge.squirrel_sql.plugins.favs.Folder extend a common superclass
    Type net.sourceforge.squirrel_sql.fw.gui.WindowState.IPropertyNames does not match with type net.sourceforge.squirrel_sql.plugins.favs.Folder.IPropertyNames
    • Make classes net.sourceforge.squirrel_sql.fw.gui.WindowState.IPropertyNames and net.sourceforge.squirrel_sql.plugins.favs.Folder.IPropertyNames extend a common superclass
    3
    s_descriptors[0] = new PropertyDescriptor(Folder.IPropertyNames.ID, Folder.class, "getIdentifier", "setIdentifier");
    4
    s_dscrs[1] = new PropertyDescriptor(WindowState.IPropertyNames.VISIBLE, WindowState.class, "isVisible", "setVisible");
    4
    s_dscrs[1] = new PropertyDescriptor(WindowState.IPropertyNames.VISIBLE, WindowState.class, "isVisible", "setVisible");
    4
    s_descriptors[1] = new PropertyDescriptor(Folder.IPropertyNames.NAME, Folder.class, "getName", "setName");
    Differences
    Expression1Expression2Difference
    s_dscrss_descriptorsVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.gui.WindowStatenet.sourceforge.squirrel_sql.plugins.favs.FolderVARIABLE_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.fw.gui.WindowState.IPropertyNamesnet.sourceforge.squirrel_sql.plugins.favs.Folder.IPropertyNamesVARIABLE_TYPE_MISMATCH
    VISIBLENAMEVARIABLE_NAME_MISMATCH
    WindowState.classFolder.classLITERAL_VALUE_MISMATCH
    "isVisible""getName"LITERAL_VALUE_MISMATCH
    "setVisible""setName"LITERAL_VALUE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.fw.gui.WindowState does not match with type net.sourceforge.squirrel_sql.plugins.favs.Folder
    • Make classes net.sourceforge.squirrel_sql.fw.gui.WindowState and net.sourceforge.squirrel_sql.plugins.favs.Folder extend a common superclass
    Type net.sourceforge.squirrel_sql.fw.gui.WindowState.IPropertyNames does not match with type net.sourceforge.squirrel_sql.plugins.favs.Folder.IPropertyNames
    • Make classes net.sourceforge.squirrel_sql.fw.gui.WindowState.IPropertyNames and net.sourceforge.squirrel_sql.plugins.favs.Folder.IPropertyNames extend a common superclass
    4
    s_descriptors[1] = new PropertyDescriptor(Folder.IPropertyNames.NAME, Folder.class, "getName", "setName");
    5
    s_dscrs[2] = new PropertyDescriptor(WindowState.IPropertyNames.FRAME_EXTENDED_STATE, WindowState.class, "getFrameExtendedState", "setFrameExtendedState");
    5
    s_dscrs[2] = new PropertyDescriptor(WindowState.IPropertyNames.FRAME_EXTENDED_STATE, WindowState.class, "getFrameExtendedState", "setFrameExtendedState");
    5
    s_descriptors[2] = new IndexedPropertyDescriptor(Folder.IPropertyNames.SUB_FOLDERS, Folder.class, "getSubFolders", "setSubFolders", "getSubFolder", "setSubFolder");
    Differences
    Expression1Expression2Difference
    s_dscrss_descriptorsVARIABLE_NAME_MISMATCH
    java.beans.PropertyDescriptorjava.beans.IndexedPropertyDescriptorSUBCLASS_TYPE_MISMATCH
    new PropertyDescriptor(WindowState.IPropertyNames.FRAME_EXTENDED_STATE,WindowState.class,"getFrameExtendedState","setFrameExtendedState")new IndexedPropertyDescriptor(Folder.IPropertyNames.SUB_FOLDERS,Folder.class,"getSubFolders","setSubFolders","getSubFolder","setSubFolder")ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression new PropertyDescriptor(WindowState.IPropertyNames.FRAME_EXTENDED_STATE,WindowState.class,"getFrameExtendedState","setFrameExtendedState") is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression new IndexedPropertyDescriptor(Folder.IPropertyNames.SUB_FOLDERS,Folder.class,"getSubFolders","setSubFolders","getSubFolder","setSubFolder") is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression new PropertyDescriptor(WindowState.IPropertyNames.FRAME_EXTENDED_STATE,WindowState.class,"getFrameExtendedState","setFrameExtendedState") is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression new IndexedPropertyDescriptor(Folder.IPropertyNames.SUB_FOLDERS,Folder.class,"getSubFolders","setSubFolders","getSubFolder","setSubFolder") is a method call throwing exception(s) that should be caught by a try block that will be extracted
    5
    s_descriptors[2] = new IndexedPropertyDescriptor(Folder.IPropertyNames.SUB_FOLDERS, Folder.class, "getSubFolders", "setSubFolders", "getSubFolder", "setSubFolder");
    6
    return s_dscrs;
    6
    return s_dscrs;
    6
    return s_descriptors;
    Differences
    Expression1Expression2Difference
    s_dscrss_descriptorsVARIABLE_NAME_MISMATCH
    6
    return s_descriptors;
    Precondition Violations (8)
    Row Violation
    1Type net.sourceforge.squirrel_sql.fw.gui.WindowState does not match with type net.sourceforge.squirrel_sql.plugins.favs.Folder
    2Type net.sourceforge.squirrel_sql.fw.gui.WindowState.IPropertyNames does not match with type net.sourceforge.squirrel_sql.plugins.favs.Folder.IPropertyNames
    3Type net.sourceforge.squirrel_sql.fw.gui.WindowState does not match with type net.sourceforge.squirrel_sql.plugins.favs.Folder
    4Type net.sourceforge.squirrel_sql.fw.gui.WindowState.IPropertyNames does not match with type net.sourceforge.squirrel_sql.plugins.favs.Folder.IPropertyNames
    5Expression new PropertyDescriptor(WindowState.IPropertyNames.FRAME_EXTENDED_STATE,WindowState.class,"getFrameExtendedState","setFrameExtendedState") is a method call throwing exception(s) that should be caught by a try block that will be extracted
    6Expression new IndexedPropertyDescriptor(Folder.IPropertyNames.SUB_FOLDERS,Folder.class,"getSubFolders","setSubFolders","getSubFolder","setSubFolder") is a method call throwing exception(s) that should be caught by a try block that will be extracted
    7Expression new PropertyDescriptor(WindowState.IPropertyNames.FRAME_EXTENDED_STATE,WindowState.class,"getFrameExtendedState","setFrameExtendedState") is a method call throwing exception(s) that should be caught by a try block that will be extracted
    8Expression new IndexedPropertyDescriptor(Folder.IPropertyNames.SUB_FOLDERS,Folder.class,"getSubFolders","setSubFolders","getSubFolder","setSubFolder") is a method call throwing exception(s) that should be caught by a try block that will be extracted