private Constructor getProperConstructor(Class clazz) { Constructor ctor = null; try { ctor = clazz.getDeclaredConstructor( COMPONENT_TUP_CTOR_SIG ); if ( ! ReflectHelper.isPublic( ctor ) ) { try { // found a ctor, but it was not publicly accessible so try to request accessibility ctor.setAccessible( true ); } catch ( SecurityException e ) { ctor = null; } } } catch ( NoSuchMethodException ignore ) { } return ctor;
private Constructor getProperConstructor(Class clazz) { Constructor ctor = null; try { ctor = clazz.getDeclaredConstructor( ENTITY_TUP_CTOR_SIG ); if ( ! ReflectHelper.isPublic( ctor ) ) { try { // found a ctor, but it was not publicly accessible so try to request accessibility ctor.setAccessible( true ); } catch ( SecurityException e ) { ctor = null; } } } catch ( NoSuchMethodException ignore ) { } return ctor;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/component/ComponentTuplizerFactory.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/EntityTuplizerFactory.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
private Constructor getProperConstructor(Class clazz) {
1
private Constructor getProperConstructor(Class clazz) {
2
		Constructor ctor = null;
2
		Constructor ctor = null;
3
		try {
3
		try {
4
			ctor = clazz.getDeclaredConstructor( COMPONENT_TUP_CTOR_SIG );
4
			ctor = clazz.getDeclaredConstructor( ENTITY_TUP_CTOR_SIG );
5
			if ( ! ReflectHelper.isPublic( ctor ) ) {
5
			if ( ! ReflectHelper.isPublic( ctor ) ) {
6
				try {
6
				try {
7
					// found a ctor, but it was not publicly accessible so try to request accessibility
7
					// found a ctor, but it was not publicly accessible so try to request accessibility
8
					ctor.setAccessible( true );
8
					ctor.setAccessible( true );
9
				}
9
				}
10
				catch ( SecurityException e ) {
10
				catch ( SecurityException e ) {
11
					ctor = null;
11
					ctor = null;
12
				}
12
				}
13
			}
13
			}
14
		}
14
		}
15
		catch ( NoSuchMethodException ignore ) {
15
		catch ( NoSuchMethodException ignore ) {
16
		}
16
		}
17
		return ctor;
17
		return ctor;
18
	
18
	
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