public final class SerializableProxy implements Serializable { private String entityName; private Class persistentClass; private Class[] interfaces; private Serializable id; private Class getIdentifierMethodClass; private Class setIdentifierMethodClass; private String getIdentifierMethodName; private String setIdentifierMethodName; private Class[] setIdentifierMethodParams; private AbstractComponentType componentIdType; public SerializableProxy() {} public SerializableProxy( final String entityName, final Class persistentClass, final Class[] interfaces, final Serializable id, final Method getIdentifierMethod, final Method setIdentifierMethod, AbstractComponentType componentIdType ) { this.entityName = entityName; this.persistentClass = persistentClass; this.interfaces = interfaces; this.id = id; if (getIdentifierMethod!=null) { getIdentifierMethodClass = getIdentifierMethod.getDeclaringClass(); getIdentifierMethodName = getIdentifierMethod.getName(); } if (setIdentifierMethod!=null) { setIdentifierMethodClass = setIdentifierMethod.getDeclaringClass(); setIdentifierMethodName = setIdentifierMethod.getName(); setIdentifierMethodParams = setIdentifierMethod.getParameterTypes(); } this.componentIdType = componentIdType; } private Object readResolve() { 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);
public final class SerializableProxy implements Serializable { private String entityName; private Class persistentClass; private Class[] interfaces; private Serializable id; private Class getIdentifierMethodClass; private Class setIdentifierMethodClass; private String getIdentifierMethodName; private String setIdentifierMethodName; private Class[] setIdentifierMethodParams; private AbstractComponentType componentIdType; public SerializableProxy() {} public SerializableProxy( final String entityName, final Class persistentClass, final Class[] interfaces, final Serializable id, final Method getIdentifierMethod, final Method setIdentifierMethod, AbstractComponentType componentIdType ) { this.entityName = entityName; this.persistentClass = persistentClass; this.interfaces = interfaces; this.id = id; if (getIdentifierMethod!=null) { getIdentifierMethodClass = getIdentifierMethod.getDeclaringClass(); getIdentifierMethodName = getIdentifierMethod.getName(); } if (setIdentifierMethod!=null) { setIdentifierMethodClass = setIdentifierMethod.getDeclaringClass(); setIdentifierMethodName = setIdentifierMethod.getName(); setIdentifierMethodParams = setIdentifierMethod.getParameterTypes(); } this.componentIdType = componentIdType; } private Object readResolve() { 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: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public final class SerializableProxy implements Serializable {
1
public final class SerializableProxy implements Serializable {
2
	private String entityName;
2
	private String entityName;
3
	private Class persistentClass;
3
	private Class persistentClass;
4
	private Class[] interfaces;
4
	private Class[] interfaces;
5
	private Serializable id;
5
	private Serializable id;
6
	private Class getIdentifierMethodClass;
6
	private Class getIdentifierMethodClass;
7
	private Class setIdentifierMethodClass;
7
	private Class setIdentifierMethodClass;
8
	private String getIdentifierMethodName;
8
	private String getIdentifierMethodName;
9
	private String setIdentifierMethodName;
9
	private String setIdentifierMethodName;
10
	private Class[] setIdentifierMethodParams;
10
	private Class[] setIdentifierMethodParams;
11
	private AbstractComponentType componentIdType;
11
	private AbstractComponentType componentIdType;
12
	public SerializableProxy() {}
12
	public SerializableProxy() {}
13
	public SerializableProxy(
13
	public SerializableProxy(
14
		final String entityName,
14
		final String entityName,
15
		final Class persistentClass,
15
	    final Class persistentClass,
16
		final Class[] interfaces,
16
	    final Class[] interfaces,
17
		final Serializable id,
17
	    final Serializable id,
18
		final Method getIdentifierMethod,
18
	    final Method getIdentifierMethod,
19
		final Method setIdentifierMethod,
19
	    final Method setIdentifierMethod,
20
		AbstractComponentType componentIdType
20
	    AbstractComponentType componentIdType
21
	) {
21
	) {
22
		this.entityName = entityName;
22
		this.entityName = entityName;
23
		this.persistentClass = persistentClass;
23
		this.persistentClass = persistentClass;
24
		this.interfaces = interfaces;
24
		this.interfaces = interfaces;
25
		this.id = id;
25
		this.id = id;
26
		if (getIdentifierMethod!=null) {
26
		if (getIdentifierMethod!=null) {
27
			getIdentifierMethodClass = getIdentifierMethod.getDeclaringClass();
27
			getIdentifierMethodClass = getIdentifierMethod.getDeclaringClass();
28
			getIdentifierMethodName = getIdentifierMethod.getName();
28
			getIdentifierMethodName = getIdentifierMethod.getName();
29
		}
29
		}
30
		if (setIdentifierMethod!=null) {
30
		if (setIdentifierMethod!=null) {
31
			setIdentifierMethodClass = setIdentifierMethod.getDeclaringClass();
31
			setIdentifierMethodClass = setIdentifierMethod.getDeclaringClass();
32
			setIdentifierMethodName = setIdentifierMethod.getName();
32
			setIdentifierMethodName = setIdentifierMethod.getName();
33
			setIdentifierMethodParams = setIdentifierMethod.getParameterTypes();
33
			setIdentifierMethodParams = setIdentifierMethod.getParameterTypes();
34
		}
34
		}
35
		this.componentIdType = componentIdType;
35
		this.componentIdType = componentIdType;
36
	}
36
	}
37
	private Object readResolve() {
37
	private Object readResolve() {
38
		try {
38
		try {
39
			return CGLIBLazyInitializer.getProxy(
39
			return JavassistLazyInitializer.getProxy(
40
				entityName,
40
				entityName,
41
				persistentClass,
41
				persistentClass,
42
				interfaces,
42
				interfaces,
43
				getIdentifierMethodName==null ?
43
				getIdentifierMethodName==null ?
44
					null :
44
					null :
45
					getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null),
45
					getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null),
46
				setIdentifierMethodName==null ?
46
				setIdentifierMethodName==null ?
47
					null :
47
					null :
48
					setIdentifierMethodClass.getDeclaredMethod(setIdentifierMethodName, setIdentifierMethodParams),
48
					setIdentifierMethodClass.getDeclaredMethod(setIdentifierMethodName, setIdentifierMethodParams),
49
					componentIdType,
49
					componentIdType,
50
				id,
50
				id,
51
				null
51
				null
52
			);
52
			);
53
		}
53
		}
54
		catch (NoSuchMethodException nsme) {
54
		catch (NoSuchMethodException nsme) {
55
			throw new HibernateException("could not create proxy for entity: " + entityName, nsme);
55
			throw new HibernateException("could not create proxy for entity: " + entityName, nsme);
56
		
56
		
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0