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(DimensionWrapper.IPropertyNames.WIDTH, DimensionWrapper.class, "getWidth",
"setWidth");
result[1] =
new PropertyDescriptor(DimensionWrapper.IPropertyNames.HEIGHT, DimensionWrapper.class,
"getHeight", "setHeight");
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/DimensionWrapperBeanInfo.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(DimensionWrapper.IPropertyNames.↵
|
6 | MainFrameWindowState.class, "getAliasesWindowState", "setAliasesWindowState↵ | | 6 | WIDTH, DimensionWrapper.class, "getWidth",↵
|
7 | ");↵ | | 7 | "setWidth");↵
|
8 | result[1] =↵ | | 8 | result[1] =↵
|
9 | new PropertyDescriptor(MainFrameWindowState.IPropertyNames.DRIVERS_WINDOW_STATE,↵ | | 9 | new PropertyDescriptor(↵
|
10 | MainFrameWindowState.class, "getDriversWindowState", "setDriversWindowState↵ | | 10 | DimensionWrapper.IPropertyNames.HEIGHT, DimensionWrapper.class,↵
|
11 | ");↵ | | 11 | "getHeight", "setHeight");↵
|
12 | return result;↵ | | 12 | return result;↵
|
13 | }↵ | | 13 | }↵
|
14 | catch (IntrospectionException e)↵ | | 14 | catch (IntrospectionException e)↵
|
15 | {↵ | | 15 | {↵
|
16 | throw new Error(e);↵ | | 16 | throw new Error(e);↵
|
17 | } | | 17 | }
|
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 25 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 3.3 |
Clone type | Type 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(DimensionWrapper.IPropertyNames.WIDTH, DimensionWrapper.class, "getWidth", "setWidth"); |
4 | result[1] = new PropertyDescriptor(MainFrameWindowState.IPropertyNames.DRIVERS_WINDOW_STATE, MainFrameWindowState.class, "getDriversWindowState", "setDriversWindowState"); | | 4 | result[1] = new PropertyDescriptor(DimensionWrapper.IPropertyNames.HEIGHT, DimensionWrapper.class, "getHeight", "setHeight"); |
5 | | | 5 | |
Precondition Violations (4)
Row |
Violation |
1 | Type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState does not match with type net.sourceforge.squirrel_sql.fw.util.beanwrapper.DimensionWrapper |
2 | Type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState.IPropertyNames does not match with type net.sourceforge.squirrel_sql.fw.util.beanwrapper.DimensionWrapper.IPropertyNames |
3 | Type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState does not match with type net.sourceforge.squirrel_sql.fw.util.beanwrapper.DimensionWrapper |
4 | Type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameWindowState.IPropertyNames does not match with type net.sourceforge.squirrel_sql.fw.util.beanwrapper.DimensionWrapper.IPropertyNames |