String[] intfs = classfile.getInterfaces(); for ( int i = 0; i < intfs.length; i++ ) { if ( FieldHandled.class.getName().equals( intfs[i] ) ) { return true; } } return false;
final Class[] exceptions = method.getExceptionTypes(); for ( int i = 0; i < exceptions.length; i++ ) { if ( SQLException.class.isAssignableFrom( exceptions[i] ) ) { return true; } } return false;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/bytecode/javassist/JavassistClassTransformer.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/test/java/org/hibernate/dialect/Mocks.java
Method name: boolean alreadyInstrumented(ClassFile) Method name: boolean canThrowSQLException(Method)
Number of AST nodes: 5 Number of AST nodes: 5
1
String[] intfs = classfile.getInterfaces();
1
final Class[] exceptions = method.getExceptionTypes();
2
		for ( int i = 0; i < intfs.length; i++ ) {
2
		for ( int i = 0; i < exceptions.length; i++ ) {
3
			if ( FieldHandled.class.getName().equals( intfs[i] ) ) {
3
			if ( SQLException.class.isAssignableFrom( exceptions[i] ) ) {
4
				return true;
4
				return true;
5
			}
5
			}
6
		}
6
		}
7
		return false;
7
		return false;
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.2
Clones locationClones are in different classes
Number of node comparisons1