if ( value==null && method.getParameterTypes()[0].isPrimitive() ) { throw new PropertyAccessException( npe, "Null value was assigned to a property of primitive type", true, clazz, propertyName ); } else { throw new PropertyAccessException( npe, "NullPointerException occurred while calling", true, clazz, propertyName ); }
if(value == null && field.getType().isPrimitive()) { throw new PropertyAccessException( e, "Null value was assigned to a property of primitive type", true, clazz, name ); } else { throw new PropertyAccessException(e, "could not set a field value by reflection", true, clazz, name); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/property/BasicPropertyAccessor.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/property/DirectPropertyAccessor.java
Method name: void set(Object, Object, SessionFactoryImplementor) Method name: void set(Object, Object, SessionFactoryImplementor)
Number of AST nodes: 3 Number of AST nodes: 3
1
if ( value==null && method.getParameterTypes()[0].isPrimitive() ) {
1
if(value == null && field.getType().isPrimitive()) {
2
					throw new PropertyAccessException(
2
					throw new PropertyAccessException(
3
							npe, 
3
							e, 
4
							"Null value was assigned to a property of primitive type", 
4
							"Null value was assigned to a property of primitive type", 
5
							true, 
5
							true, 
6
							clazz, 
6
							clazz, 
7
							propertyName
7
							name
8
						);
8
						);
9
				}
9
					
10
				else {
10
				} else {
11
					throw new PropertyAccessException(
11
					throw new PropertyAccessException(
12
							npe, 
13
							"NullPointerException occurred while calling", 
14
							true, 
15
							clazz, 
16
							propertyName
17
						);
12
e, "could not set a field value by reflection", true, clazz, name);
18
				}
13
				}
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.0
Clones locationClones are in different classes
Number of node comparisons0
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements0
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeUnknown type
    Mapped Statements
    ID Statement ID Statement
    Precondition Violations (0)
    Row Violation