try { PropertyDescriptor[] result = new PropertyDescriptor[2]; result[0] = new PropertyDescriptor(MainFrameWindowState.IPropertyNames.ALIASES_WINDOW_STATE, MainFrameWindowState.class, "getAliasesWindowState", "setAliasesWindowState"); result[1] = new PropertyDescriptor(MainFrameWindowState.IPropertyNames.DRIVERS_WINDOW_STATE, MainFrameWindowState.class, "getDriversWindowState", "setDriversWindowState"); return result; } catch (IntrospectionException e) { throw new Error(e); }
try { PropertyDescriptor[] result = new PropertyDescriptor[2]; result[0] = new PropertyDescriptor( PointWrapper.IPropertyNames.X, PointWrapper.class, "getX", "setX"); result[1] = new PropertyDescriptor( PointWrapper.IPropertyNames.Y, PointWrapper.class, "getY", "setY"); return result; } catch (IntrospectionException e) { throw new Error(e); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/mainframe/MainFrameWindowStateBeanInfo.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/util/beanwrapper/PointWrapperBeanInfo.java
Method name: PropertyDescriptor[] getPropertyDescriptors() Method name: PropertyDescriptor[] getPropertyDescriptors()
Number of AST nodes: 5 Number of AST nodes: 5
1
try
1
try
2
		{
2
 {
3
			PropertyDescriptor[] result = new PropertyDescriptor[2];
3
			PropertyDescriptor[] result = new PropertyDescriptor[2];
4
			result[0] =
4
			result[0] =
5
				new PropertyDescriptor(MainFrameWindowState.IPropertyNames.ALIASES_WINDOW_STATE,
5
				new PropertyDescriptor(
6
					MainFrameWindowState.class, "getAliasesWindowState", "setAliasesWindowState");
7
			result[1] =
8
				new PropertyDescriptor(MainFrameWindowState.IPropertyNames.DRIVERS_WINDOW_STATE,
9
					MainFrameWindowState.class, "getDriversWindowState", "setDriversWindowState
6
					PointWrapper.IPropertyNames.X,
7
					PointWrapper.class,
8
					"getX",
9
					"setX");
10
			result[1] =
11
				new PropertyDescriptor(
12
					PointWrapper.IPropertyNames.Y,
13
					PointWrapper.class,
14
					"getY",
10
");
15
					"setY");
11
			return result;
16
			return result;
12
		}
17
		}
13
		catch (IntrospectionException e)
18
 catch (IntrospectionException e)
14
		{
19
 {
15
			throw new Error(e);
20
			throw new Error(e);
16
		}
21
		}
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons25
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    2
    PropertyDescriptor[] result = new PropertyDescriptor[2];
    2
    PropertyDescriptor[] result = new PropertyDescriptor[2];
    3
    result[0] = new PropertyDescriptor(MainFrameWindowState.IPropertyNames.ALIASES_WINDOW_STATE, MainFrameWindowState.class, "getAliasesWindowState", "setAliasesWindowState");
    3
    result[0] = new PropertyDescriptor(MainFrameWindowState.IPropertyNames.ALIASES_WINDOW_STATE, MainFrameWindowState.class, "getAliasesWindowState", "setAliasesWindowState");
    3
    result[0] = new PropertyDescriptor(PointWrapper.IPropertyNames.X, PointWrapper.class, "getX", "setX");
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowStatenet.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapperVARIABLE_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState.IPropertyNamesnet.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper.IPropertyNamesVARIABLE_TYPE_MISMATCH
    ALIASES_WINDOW_STATEXVARIABLE_NAME_MISMATCH
    MainFrameWindowState.classPointWrapper.classLITERAL_VALUE_MISMATCH
    "getAliasesWindowState""getX"LITERAL_VALUE_MISMATCH
    "setAliasesWindowState""setX"LITERAL_VALUE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState does not match with type net.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper
    • Make classes net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState and net.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper extend a common superclass
    Type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState.IPropertyNames does not match with type net.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper.IPropertyNames
    • Make classes net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState.IPropertyNames and net.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper.IPropertyNames extend a common superclass
    3
    result[0] = new PropertyDescriptor(PointWrapper.IPropertyNames.X, PointWrapper.class, "getX", "setX");
    4
    result[1] = new PropertyDescriptor(MainFrameWindowState.IPropertyNames.DRIVERS_WINDOW_STATE, MainFrameWindowState.class, "getDriversWindowState", "setDriversWindowState");
    4
    result[1] = new PropertyDescriptor(MainFrameWindowState.IPropertyNames.DRIVERS_WINDOW_STATE, MainFrameWindowState.class, "getDriversWindowState", "setDriversWindowState");
    4
    result[1] = new PropertyDescriptor(PointWrapper.IPropertyNames.Y, PointWrapper.class, "getY", "setY");
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowStatenet.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapperVARIABLE_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState.IPropertyNamesnet.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper.IPropertyNamesVARIABLE_TYPE_MISMATCH
    DRIVERS_WINDOW_STATEYVARIABLE_NAME_MISMATCH
    MainFrameWindowState.classPointWrapper.classLITERAL_VALUE_MISMATCH
    "getDriversWindowState""getY"LITERAL_VALUE_MISMATCH
    "setDriversWindowState""setY"LITERAL_VALUE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState does not match with type net.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper
    • Make classes net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState and net.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper extend a common superclass
    Type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState.IPropertyNames does not match with type net.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper.IPropertyNames
    • Make classes net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState.IPropertyNames and net.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper.IPropertyNames extend a common superclass
    4
    result[1] = new PropertyDescriptor(PointWrapper.IPropertyNames.Y, PointWrapper.class, "getY", "setY");
    5
    return result;
    5
    return result;
    Precondition Violations (4)
    Row Violation
    1Type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState does not match with type net.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper
    2Type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState.IPropertyNames does not match with type net.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper.IPropertyNames
    3Type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState does not match with type net.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper
    4Type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState.IPropertyNames does not match with type net.sourceforge.squirrel_sql.fw.util.beanwrapper.PointWrapper.IPropertyNames