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: 6 | Number of AST nodes: 6 | |||
1 | Object[] copied = new Object[original.length];↵ | 1 | Object[] copied = new Object[original.length];↵ | |
2 | for ( int i = 0; i < types.length; i++ ) {↵ | 2 | for ( int i = 0; i < types.length; i++ ) {↵ | |
3 | if ( original[i] == LazyPropertyInitializer.UNFETCHED_PROPERTY↵ | 3 | if ( original[i] == LazyPropertyInitializer.UNFETCHED_PROPERTY↵ | |
4 | || original[i] == BackrefPropertyAccessor.UNKNOWN ) {↵ | 4 | || original[i] == BackrefPropertyAccessor.UNKNOWN ) {↵ | |
5 | copied[i] = target[i];↵ | 5 | copied[i] = target[i];↵ | |
6 | }↵ | 6 | }↵ | |
7 | else {↵ | 7 | else {↵ | |
8 | copied[i] = types[i].replace( original[i], target[i], session, owner, copyCache );↵ | 8 | copied[i] = types[i].replace( original[i], target[i], session, owner, copyCache, foreignKeyDirection );↵ | |
9 | }↵ | 9 | }↵ | |
10 | }↵ | 10 | }↵ | |
11 | return copied; | 11 |
| |
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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
Number of mapped statements | 6 |
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.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Object[] copied = new Object[original.length]; | 1 | Object[] copied = new Object[original.length]; | |||||||||||||
2 | for (int i = 0; i < types.length; i++) | 2 | for (int i = 0; i < types.length; i++) | |||||||||||||
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); | ||||||||||||
6 | return copied; | 6 | return copied; |
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 |