throw new PropertyAccessException(
npe,
"Null value was assigned to a property of primitive type",
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: 1
|
|
Number of AST nodes: 3
|
|
| | | 1 | if(value == null && field.getType().isPrimitive()) {↵
|
1 | throw new PropertyAccessException(↵ | | 2 | throw new PropertyAccessException(↵
|
2 | npe, ↵ | | 3 | e, ↵
|
3 | "Null value was assigned to a property of primitive type", ↵ | | 4 | "Null value was assigned to a property of primitive type", ↵
|
4 | true, ↵ | | 5 | true, ↵
|
5 | clazz, ↵ | | 6 | clazz, ↵
|
6 | propertyN↵ | | 7 | name↵
|
| | | 8 | ); ↵
|
| | | 9 | } else {↵
|
7 | ame↵ | | 10 | throw new PropertyAccessException(e, "could not set a field value by reflection", true, clazz, name);↵
|
8 | ); | | 11 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 0 |