try { PropertyDescriptor[] s_descriptors = new PropertyDescriptor[1]; s_descriptors[0] = new PropertyDescriptor(URLWrapper.IURLWrapperPropertyNames.URL, URLWrapper.class, "getExternalForm", "setExternalForm"); return s_descriptors; } catch (IntrospectionException e) { throw new Error(e); }
try { PropertyDescriptor[] result = new PropertyDescriptor[1]; result[0] = new PropertyDescriptor( UidIdentifier.IPropertyNames.STRING, UidIdentifier.class, "toString", "setString"); return result; } catch (IntrospectionException e) { throw new Error(e); }
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/util/beanwrapper/URLWrapperBeanInfo.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/id/UidIdentifierBeanInfo.java
Method name: PropertyDescriptor[] getPropertyDescriptors() Method name: PropertyDescriptor[] getPropertyDescriptors()
Number of AST nodes: 4 Number of AST nodes: 4
1
try
1
try
2
		{
2
		{
3
			PropertyDescriptor[] s_descriptors = new PropertyDescriptor[1];
3
			PropertyDescriptor[] result = new PropertyDescriptor[1];
4
			s_descriptors[0] =
4
			result[0] =
5
				new PropertyDescriptor(URLWrapper.IURLWrapperPropertyNames.URL, URLWrapper.class,
5
				new PropertyDescriptor(
6
					"getExternalForm", "setExternalForm
6
					UidIdentifier.IPropertyNames.STRING,
7
					UidIdentifier.class,
8
					"toString",
7
");
9
					"setString");
8
			
10
			
9
return s_descriptors;
11
			return result;
10
		}
12
		}
11
		catch (IntrospectionException e)
13
		catch (IntrospectionException e)
12
		{
14
		{
13
			throw new Error(e);
15
			throw new Error(e);
14
		}
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    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.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    2
    PropertyDescriptor[] s_descriptors = new PropertyDescriptor[1];
    2
    PropertyDescriptor[] s_descriptors = new PropertyDescriptor[1];
    2
    PropertyDescriptor[] result = new PropertyDescriptor[1];
    Differences
    Expression1Expression2Difference
    s_descriptorsresultVARIABLE_NAME_MISMATCH
    2
    PropertyDescriptor[] result = new PropertyDescriptor[1];
    3
    s_descriptors[0] = new PropertyDescriptor(URLWrapper.IURLWrapperPropertyNames.URL, URLWrapper.class, "getExternalForm", "setExternalForm");
    3
    s_descriptors[0] = new PropertyDescriptor(URLWrapper.IURLWrapperPropertyNames.URL, URLWrapper.class, "getExternalForm", "setExternalForm");
    3
    result[0] = new PropertyDescriptor(UidIdentifier.IPropertyNames.STRING, UidIdentifier.class, "toString", "setString");
    Differences
    Expression1Expression2Difference
    s_descriptorsresultVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.util.beanwrapper.URLWrappernet.sourceforge.squirrel_sql.fw.id.UidIdentifierVARIABLE_TYPE_MISMATCH
    IURLWrapperPropertyNamesIPropertyNamesVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.util.beanwrapper.URLWrapper.IURLWrapperPropertyNamesnet.sourceforge.squirrel_sql.fw.id.UidIdentifier.IPropertyNamesVARIABLE_TYPE_MISMATCH
    URLSTRINGVARIABLE_NAME_MISMATCH
    URLWrapper.classUidIdentifier.classLITERAL_VALUE_MISMATCH
    "getExternalForm""toString"LITERAL_VALUE_MISMATCH
    "setExternalForm""setString"LITERAL_VALUE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.fw.util.beanwrapper.URLWrapper does not match with type net.sourceforge.squirrel_sql.fw.id.UidIdentifier
    • Make classes net.sourceforge.squirrel_sql.fw.util.beanwrapper.URLWrapper and net.sourceforge.squirrel_sql.fw.id.UidIdentifier extend a common superclass
    Type net.sourceforge.squirrel_sql.fw.util.beanwrapper.URLWrapper.IURLWrapperPropertyNames does not match with type net.sourceforge.squirrel_sql.fw.id.UidIdentifier.IPropertyNames
    • Make classes net.sourceforge.squirrel_sql.fw.util.beanwrapper.URLWrapper.IURLWrapperPropertyNames and net.sourceforge.squirrel_sql.fw.id.UidIdentifier.IPropertyNames extend a common superclass
    3
    result[0] = new PropertyDescriptor(UidIdentifier.IPropertyNames.STRING, UidIdentifier.class, "toString", "setString");
    4
    return s_descriptors;
    4
    return s_descriptors;
    4
    return result;
    Differences
    Expression1Expression2Difference
    s_descriptorsresultVARIABLE_NAME_MISMATCH
    4
    return result;
    Precondition Violations (2)
    Row Violation
    1Type net.sourceforge.squirrel_sql.fw.util.beanwrapper.URLWrapper does not match with type net.sourceforge.squirrel_sql.fw.id.UidIdentifier
    2Type net.sourceforge.squirrel_sql.fw.util.beanwrapper.URLWrapper.IURLWrapperPropertyNames does not match with type net.sourceforge.squirrel_sql.fw.id.UidIdentifier.IPropertyNames