try { return CGLIBLazyInitializer.getProxy( entityName, persistentClass, interfaces, getIdentifierMethodName==null ? null : getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null), setIdentifierMethodName==null ? null : setIdentifierMethodClass.getDeclaredMethod(setIdentifierMethodName, setIdentifierMethodParams), componentIdType, id, null ); } catch (NoSuchMethodException nsme) { throw new HibernateException("could not create proxy for entity: " + entityName, nsme); }
try { return JavassistLazyInitializer.getProxy( entityName, persistentClass, interfaces, getIdentifierMethodName==null ? null : getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null), setIdentifierMethodName==null ? null : setIdentifierMethodClass.getDeclaredMethod(setIdentifierMethodName, setIdentifierMethodParams), componentIdType, id, null ); } catch (NoSuchMethodException nsme) { throw new HibernateException("could not create proxy for entity: " + entityName, nsme); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/proxy/pojo/cglib/SerializableProxy.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/proxy/pojo/javassist/SerializableProxy.java
Method name: Object readResolve() Method name: Object readResolve()
Number of AST nodes: 2 Number of AST nodes: 2
1
try {
1
try {
2
			return CGLIBLazyInitializer.getProxy(
2
			return JavassistLazyInitializer.getProxy(
3
				entityName,
3
				entityName,
4
				persistentClass,
4
				persistentClass,
5
				interfaces,
5
				interfaces,
6
				getIdentifierMethodName==null ?
6
				getIdentifierMethodName==null ?
7
					null :
7
					null :
8
					getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null),
8
					getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null),
9
				setIdentifierMethodName==null ?
9
				setIdentifierMethodName==null ?
10
					null :
10
					null :
11
					setIdentifierMethodClass.getDeclaredMethod(setIdentifierMethodName, setIdentifierMethodParams),
11
					setIdentifierMethodClass.getDeclaredMethod(setIdentifierMethodName, setIdentifierMethodParams),
12
					componentIdType,
12
					componentIdType,
13
				id,
13
				id,
14
				null
14
				null
15
			);
15
			);
16
		}
16
		}
17
		catch (NoSuchMethodException nsme) {
17
		catch (NoSuchMethodException nsme) {
18
			throw new HibernateException("could not create proxy for entity: " + entityName, nsme);
18
			throw new HibernateException("could not create proxy for entity: " + entityName, nsme);
19
		}
19
		}
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
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    2
    return CGLIBLazyInitializer.getProxy(entityName, persistentClass, interfaces, getIdentifierMethodName == null ? null : getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null), setIdentifierMethodName == null ? null : setIdentifierMethodClass.getDeclaredMethod(setIdentifierMethodName, setIdentifierMethodParams), componentIdType, id, null);
    2
    return CGLIBLazyInitializer.getProxy(entityName, persistentClass, interfaces, getIdentifierMethodName == null ? null : getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null), setIdentifierMethodName == null ? null : setIdentifierMethodClass.getDeclaredMethod(setIdentifierMethodName, setIdentifierMethodParams), componentIdType, id, null);
    2
    return JavassistLazyInitializer.getProxy(entityName, persistentClass, interfaces, getIdentifierMethodName == null ? null : getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null), setIdentifierMethodName == null ? null : setIdentifierMethodClass.getDeclaredMethod(setIdentifierMethodName, setIdentifierMethodParams), componentIdType, id, null);
    Differences
    Expression1Expression2Difference
    org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializerorg.hibernate.proxy.pojo.javassist.JavassistLazyInitializerSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression CGLIBLazyInitializer cannot be unified with expression JavassistLazyInitializer , because common superclass org.hibernate.proxy.pojo.BasicLazyInitializer does not declare member(s) static org.hibernate.proxy.HibernateProxy getProxy(java.lang.String, Class#RAW, Class#RAW[], java.lang.reflect.Method, java.lang.reflect.Method, org.hibernate.type.AbstractComponentType, java.io.Serializable, org.hibernate.engine.SessionImplementor) throws org.hibernate.HibernateException
    2
    return JavassistLazyInitializer.getProxy(entityName, persistentClass, interfaces, getIdentifierMethodName == null ? null : getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null), setIdentifierMethodName == null ? null : setIdentifierMethodClass.getDeclaredMethod(setIdentifierMethodName, setIdentifierMethodParams), componentIdType, id, null);
    Precondition Violations (1)
    Row Violation
    1Expression CGLIBLazyInitializer cannot be unified with expression JavassistLazyInitializer , because common superclass org.hibernate.proxy.pojo.BasicLazyInitializer does not declare member(s) static org.hibernate.proxy.HibernateProxy getProxy(java.lang.String, Class#RAW, Class#RAW[], java.lang.reflect.Method, java.lang.reflect.Method, org.hibernate.type.AbstractComponentType, java.io.Serializable, org.hibernate.engine.SessionImplementor) throws org.hibernate.HibernateException