File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryReturnProcessor.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Component.java | |||
Method name: ResultAliasContext process()
|
Method name: boolean[] getColumnInsertability()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | NativeSQLQueryNonScalarReturn rtn = ( NativeSQLQueryNonScalarReturn ) queryReturns[i];↵ | |||
2 | alias2Return.put( rtn.getAlias(), rtn );↵ | |||
3 | if ( rtn instanceof NativeSQLQueryJoinReturn↵ | 1 | Property prop = (Property) iter.next();↵ | |
2 | boolean[] chunk = prop.getValue().getColumnInsertability();↵ | |||
4 | ) { ↵ | 3 | if ( prop.isInsertable() ) {↵ | |
5 | NativeSQLQueryJoinReturn fetchReturn = ( NativeSQLQueryJoinReturn ) rtn;↵ | 4 | ↵ | |
6 | alias2OwnerAlias.put( fetchReturn.getAlias(), fetchReturn.getOwnerAlias() );↵ | |||
7 | } | 5 | System.arraycopy(chunk, 0, result, i, chunk.length);↵ | |
6 | }↵ | |||
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 13 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 11.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | NativeSQLQueryNonScalarReturn rtn = (NativeSQLQueryNonScalarReturn)queryReturns[i]; |
| | |||||||||||||
4 | alias2Return.put(rtn.getAlias(), rtn); | | ||||||||||||||
|
| 5 | Property prop = (Property)iter.next(); | |||||||||||||
| 6 | boolean[] chunk = prop.getValue().getColumnInsertability(); | ||||||||||||||
5 | if (rtn instanceof NativeSQLQueryJoinReturn) |
| 7 | if (prop.isInsertable()) | ||||||||||||
6 | NativeSQLQueryJoinReturn fetchReturn = (NativeSQLQueryJoinReturn)rtn; |
| | |||||||||||||
7 | alias2OwnerAlias.put(fetchReturn.getAlias(), fetchReturn.getOwnerAlias()); | | ||||||||||||||
| 8 | System.arraycopy(chunk, 0, result, i, chunk.length); | ||||||||||||||
| 9 | i += chunk.length; |
Row | Violation |
---|---|
1 | Unmatched statement NativeSQLQueryNonScalarReturn rtn=(NativeSQLQueryNonScalarReturn)queryReturns[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement Property prop=(Property)iter.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Expression rtn instanceof NativeSQLQueryJoinReturn cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression prop.isInsertable() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement NativeSQLQueryJoinReturn fetchReturn=(NativeSQLQueryJoinReturn)rtn; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |