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: void deepCopy(Object[], Type[], boolean[], Object[], SessionImplementor)
|
Method name: Object[] assemble(Serializable[], Type[], SessionImplementor, Object)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if ( copy[i] ) {↵ | 1 | for ( int i = 0; i < types.length; i++ ) {↵ | |
2 | if ( values[i] == LazyPropertyInitializer.UNFETCHED_PROPERTY↵ | 2 | if ( row[i] == LazyPropertyInitializer.UNFETCHED_PROPERTY↵ | |
3 | || values[i] == BackrefPropertyAccessor.UNKNOWN ) {↵ | 3 | || row[i] == BackrefPropertyAccessor.UNKNOWN ) {↵ | |
4 | target[i] = values[i];↵ | 4 | assembled[i] = row[i];↵ | |
5 | }↵ | 5 | }↵ | |
6 | else {↵ | 6 | else {↵ | |
7 | target[i] = types[i].deepCopy( values[i], session.getEntityMode(), session↵ | 7 | assembled[i] = types[i].↵ | |
8 | .getFactory() );↵ | 8 | assemble( row[i], session, owner );↵ | |
9 | }↵ | 9 | }↵ | |
10 | } | 10 | } | |
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 | 11 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (values[i] == LazyPropertyInitializer.UNFETCHED_PROPERTY || values[i] == BackrefPropertyAccessor.UNKNOWN) |
| 3 | if (row[i] == LazyPropertyInitializer.UNFETCHED_PROPERTY || row[i] == BackrefPropertyAccessor.UNKNOWN) | |||||||||||||||||||||
|
| 4 | assembled[i] = row[i]; | ||||||||||||||||||||||
4 | target[i] = values[i]; |
| | ||||||||||||||||||||||
else | | ||||||||||||||||||||||||
|
| 5 | assembled[i] = types[i].assemble(row[i], session, owner); | ||||||||||||||||||||||
5 | target[i] = types[i].deepCopy(values[i], session.getEntityMode(), session.getFactory()); |
| |
Row | Violation |
---|---|
1 | Type java.lang.Object[] of variable values does not match with type java.io.Serializable[] of variable row |
2 | Type java.lang.Object[] of variable values does not match with type java.io.Serializable[] of variable row |
3 | Unmatched statement assembled[i]=row[i]; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement target[i]=values[i]; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement assembled[i]=types[i].assemble(row[i],session,owner); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Unmatched statement target[i]=types[i].deepCopy(values[i],session.getEntityMode(),session.getFactory()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |