File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/type/TypeFactory.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/type/TypeFactory.java | |||
Method name: Object[] replace(Object[], Object[], Type[], SessionImplementor, Object, Map)
|
Method name: Object[] replace(Object[], Object[], Type[], SessionImplementor, Object, Map, ForeignKeyDirection)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if ( original[i] == LazyPropertyInitializer.UNFETCHED_PROPERTY↵ | 1 | if ( original[i] == LazyPropertyInitializer.UNFETCHED_PROPERTY↵ | |
2 | || original[i] == BackrefPropertyAccessor.UNKNOWN ) {↵ | 2 | || original[i] == BackrefPropertyAccessor.UNKNOWN ) {↵ | |
3 | copied[i] = target[i];↵ | 3 | copied[i] = target[i];↵ | |
4 | }↵ | 4 | }↵ | |
5 | else {↵ | 5 | else {↵ | |
6 | copied[i] = types[i].replace( original[i], target[i], session, owner, copyCache );↵ | 6 | copied[i] = types[i].replace( original[i], target[i], session, owner, copyCache, foreignKeyDirection );↵ | |
7 | } | 7 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (original[i] == LazyPropertyInitializer.UNFETCHED_PROPERTY || original[i] == BackrefPropertyAccessor.UNKNOWN) | 3 | if (original[i] == LazyPropertyInitializer.UNFETCHED_PROPERTY || original[i] == BackrefPropertyAccessor.UNKNOWN) | |||||||||||||
4 | copied[i] = target[i]; | 4 | copied[i] = target[i]; | |||||||||||||
else | else | |||||||||||||||
5 | copied[i] = types[i].replace(original[i], target[i], session, owner, copyCache); |
| 5 | copied[i] = types[i].replace(original[i], target[i], session, owner, copyCache, foreignKeyDirection); |
Row | Violation |
---|---|
1 | Expression types[i].replace(original[i],target[i],session,owner,copyCache) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression types[i].replace(original[i],target[i],session,owner,copyCache,foreignKeyDirection) cannot be parameterized, because it has dependencies to/from statements that will be extracted |