File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/HqlSqlWalker.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/util/ASTUtil.java | |||
Method name: void postProcessInsert(AST)
|
Method name: void insertChild(AST, AST)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 3 | |||
1 | if ( idSelectExprNode != null ) {↵ | |||
2 | AST currentFirstSelectExprNode = selectClause.getFirstChild();↵ | 1 | AST n = parent.getFirstChild();↵ | |
3 | selectClause.setFirstChild( idSelectExprNode );↵ | 2 | parent.setFirstChild( ↵ | |
4 | idSelectExprNode.setNextSibling( currentFirstSelectExprNode );↵ | |||
5 | insertStatement.getIntoClause().prependIdColumnSpec();↵ | |||
6 | } | 3 | child );↵ | |
4 |
| |||
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 12 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15 | AST currentFirstSelectExprNode = selectClause.getFirstChild(); |
| 3 | AST n = parent.getFirstChild(); | |||||||||||||||||
16 | selectClause.setFirstChild(idSelectExprNode); |
| 4 | parent.setFirstChild(child); | |||||||||||||||||
17 | idSelectExprNode.setNextSibling(currentFirstSelectExprNode); |
| 5 | child.setNextSibling(n); | |||||||||||||||||
18 | insertStatement.getIntoClause().prependIdColumnSpec(); | |
Row | Violation |
---|---|
1 | Type org.hibernate.hql.ast.tree.SelectClause of variable selectClause does not match with type antlr.collections.AST of variable parent |
2 | Type org.hibernate.hql.ast.tree.SelectClause of variable selectClause does not match with type antlr.collections.AST of variable parent |