try { PropertyDescriptor[] result = new PropertyDescriptor[2]; result[0] = new PropertyDescriptor(IPropertyNames.ID, AliasGroup.class, "getIdentifier", "setIdentifier"); result[0] = new PropertyDescriptor(IPropertyNames.NAME, AliasGroup.class, "getName", "setName"); 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/db/AliasGroupBeanInfo.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(IPropertyNames.ID, AliasGroup.class, "getIdentifier", "setIdentifier
5
				new PropertyDescriptor(
6
					PointWrapper.IPropertyNames.X,
7
					PointWrapper.class,
8
					"getX",
6
");
9
					"setX");
7
			result[0] = 
10
			result[1] =
8
new PropertyDescriptor(IPropertyNames.NAME, AliasGroup.class, "getName", "setName
11
				new PropertyDescriptor(
12
					PointWrapper.IPropertyNames.Y,
13
					PointWrapper.class,
14
					"getY",
9
");
15
					"setY");
10
			return result;
16
			return result;
11
		}
17
		}
12
		catch (IntrospectionException e)
18
 catch (IntrospectionException e)
13
		{
19
 {
14
			throw new Error(e);
20
			throw new Error(e);
15
		}
21
		}
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons25
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)2.2
    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(PointWrapper.IPropertyNames.X, PointWrapper.class, "getX", "setX");
    Preondition Violations
    Unmatched statement result[0]=new PropertyDescriptor(PointWrapper.IPropertyNames.X,PointWrapper.class,"getX","setX"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched statement result[0]=new PropertyDescriptor(PointWrapper.IPropertyNames.X,PointWrapper.class,"getX","setX"); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    3
    result[0] = new PropertyDescriptor(PointWrapper.IPropertyNames.X, PointWrapper.class, "getX", "setX");
    3
    result[0] = new PropertyDescriptor(IPropertyNames.ID, AliasGroup.class, "getIdentifier", "setIdentifier");
    3
    result[0] = new PropertyDescriptor(IPropertyNames.ID, AliasGroup.class, "getIdentifier", "setIdentifier");
    Preondition Violations
    Unmatched statement result[0]=new PropertyDescriptor(IPropertyNames.ID,AliasGroup.class,"getIdentifier","setIdentifier"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched statement result[0]=new PropertyDescriptor(IPropertyNames.ID,AliasGroup.class,"getIdentifier","setIdentifier"); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
                                                                                                                                                                                                                    
                                                                                                                                                                                                            
    4
    result[1] = new PropertyDescriptor(PointWrapper.IPropertyNames.Y, PointWrapper.class, "getY", "setY");
    Preondition Violations
    Unmatched statement result[1]=new PropertyDescriptor(PointWrapper.IPropertyNames.Y,PointWrapper.class,"getY","setY"); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    4
    result[1] = new PropertyDescriptor(PointWrapper.IPropertyNames.Y, PointWrapper.class, "getY", "setY");
    4
    result[0] = new PropertyDescriptor(IPropertyNames.NAME, AliasGroup.class, "getName", "setName");
    4
    result[0] = new PropertyDescriptor(IPropertyNames.NAME, AliasGroup.class, "getName", "setName");
    Preondition Violations
    Unmatched statement result[0]=new PropertyDescriptor(IPropertyNames.NAME,AliasGroup.class,"getName","setName"); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
                                                                                                                                                                                                
    5
    return result;
    5
    return result;
    Precondition Violations (6)
    Row Violation
    1Unmatched statement result[0]=new PropertyDescriptor(PointWrapper.IPropertyNames.X,PointWrapper.class,"getX","setX"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement result[0]=new PropertyDescriptor(PointWrapper.IPropertyNames.X,PointWrapper.class,"getX","setX"); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    3Unmatched statement result[0]=new PropertyDescriptor(IPropertyNames.ID,AliasGroup.class,"getIdentifier","setIdentifier"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement result[0]=new PropertyDescriptor(IPropertyNames.ID,AliasGroup.class,"getIdentifier","setIdentifier"); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    5Unmatched statement result[1]=new PropertyDescriptor(PointWrapper.IPropertyNames.Y,PointWrapper.class,"getY","setY"); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    6Unmatched statement result[0]=new PropertyDescriptor(IPropertyNames.NAME,AliasGroup.class,"getName","setName"); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted